forked from Shinonome/dots-hyprland
Merge branch 'illogical-impulse' into illogical-impulse
This commit is contained in:
@@ -144,7 +144,6 @@ export default () => {
|
||||
})
|
||||
const systemResources = BarGroup({
|
||||
child: Box({
|
||||
className: 'spacing-h-10',
|
||||
children: [
|
||||
BarResource('RAM Usage', 'memory', `free | awk '/^Mem/ {printf("%.2f\\n", ($3/$2) * 100)}'`),
|
||||
Revealer({
|
||||
@@ -152,7 +151,7 @@ export default () => {
|
||||
transition: 'slide_left',
|
||||
transitionDuration: 200,
|
||||
child: Box({
|
||||
className: 'spacing-h-10',
|
||||
className: 'spacing-h-10 margin-left-10',
|
||||
children: [
|
||||
BarResource('Swap Usage', 'swap_horiz', `free | awk '/^Swap/ {if ($2 > 0) printf("%.2f\\n", ($3/$2) * 100); else print "0";}'`),
|
||||
BarResource('CPU Usage', 'settings_motion_mode', `top -bn1 | grep Cpu | awk '{print $2}'`),
|
||||
@@ -180,4 +179,4 @@ export default () => {
|
||||
]
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,6 @@ const switchToRelativeWorkspace = async (self, num) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default () => Widget.EventBox({
|
||||
onScrollUp: (self) => switchToRelativeWorkspace(self, -1),
|
||||
onScrollDown: (self) => switchToRelativeWorkspace(self, +1),
|
||||
|
||||
@@ -365,6 +365,7 @@ export default () => MarginRevealer({
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
child.destroy();
|
||||
child = null;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,14 @@ export default () => Box({
|
||||
attribute: {
|
||||
'map': new Map(),
|
||||
'dismiss': (box, id, force = false) => {
|
||||
if (!id || !box.attribute.map.has(id) || box.attribute.map.get(id).attribute.hovered && !force)
|
||||
if (!id || !box.attribute.map.has(id))
|
||||
return;
|
||||
const notifWidget = box.attribute.map.get(id);
|
||||
if (notifWidget == null || notifWidget.attribute.hovered && !force)
|
||||
return; // cuz already destroyed
|
||||
|
||||
const notif = box.attribute.map.get(id);
|
||||
notif.revealChild = false;
|
||||
notif.attribute.destroyWithAnims();
|
||||
notifWidget.revealChild = false;
|
||||
notifWidget.attribute.destroyWithAnims();
|
||||
box.attribute.map.delete(id);
|
||||
},
|
||||
'notify': (box, id) => {
|
||||
@@ -32,8 +34,6 @@ export default () => Box({
|
||||
box.attribute.map.set(id, newNotif);
|
||||
box.pack_end(box.attribute.map.get(id), false, false, 0);
|
||||
box.show_all();
|
||||
|
||||
// box.children = Array.from(box.attribute.map.values()).reverse();
|
||||
},
|
||||
},
|
||||
setup: (self) => self
|
||||
|
||||
@@ -273,10 +273,12 @@ const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) =>
|
||||
kids.forEach(kid => kid.clear());
|
||||
for (let i = 0; i < allClients.length; i++) {
|
||||
const client = allClients[i];
|
||||
if (offset + startWorkspace <= client.workspace.id && client.workspace.id <= offset + startWorkspace + workspaces) {
|
||||
if (offset + startWorkspace <= client.workspace.id &&
|
||||
client.workspace.id <= offset + startWorkspace + workspaces) {
|
||||
const screenCoords = box.attribute.monitorMap[client.monitor];
|
||||
kids[client.workspace.id - (offset + startWorkspace)]
|
||||
.set(client, screenCoords);
|
||||
?.set(client, screenCoords);
|
||||
|
||||
}
|
||||
}
|
||||
kids.forEach(kid => kid.show());
|
||||
|
||||
@@ -13,13 +13,7 @@ import Gemini from '../../services/gemini.js';
|
||||
import { geminiView, geminiCommands, sendMessage as geminiSendMessage, geminiTabIcon } from './apis/gemini.js';
|
||||
import { chatGPTView, chatGPTCommands, sendMessage as chatGPTSendMessage, chatGPTTabIcon } from './apis/chatgpt.js';
|
||||
import { waifuView, waifuCommands, sendMessage as waifuSendMessage, waifuTabIcon } from './apis/waifu.js';
|
||||
class AgsTextView extends AgsWidget(Gtk.TextView, "AgsTextView") {
|
||||
static { AgsWidget.register(this, {}); }
|
||||
constructor(params) {
|
||||
super(params);
|
||||
}
|
||||
}
|
||||
const TextView = Widget.createCtor(AgsTextView);
|
||||
const TextView = Widget.subclass(Gtk.TextView, "AgsTextView");
|
||||
|
||||
|
||||
const EXPAND_INPUT_THRESHOLD = 30;
|
||||
|
||||
@@ -85,7 +85,8 @@ export default (props) => {
|
||||
self.toggleClassName('notif-listaction-btn-enabled', Notifications.dnd);
|
||||
});
|
||||
const clearButton = ListActionButton('clear_all', 'Clear', () => {
|
||||
notificationList.get_children().forEach(ch => ch.destroy());
|
||||
// Manual destruction is not necessary
|
||||
// since Notifications.clear() sends destroy signals to every notif
|
||||
Notifications.clear();
|
||||
});
|
||||
const listTitle = Box({
|
||||
|
||||
Reference in New Issue
Block a user