Merge branch 'main' into gammastep

This commit is contained in:
end-4
2024-05-03 21:36:13 +07:00
committed by GitHub
26 changed files with 186 additions and 56 deletions
@@ -38,6 +38,16 @@ let configOptions = {
'warnTitles': ["Low battery", "Very low battery", 'Critical Battery'],
'warnMessages': ["Plug in the charger", "You there?", 'PLUG THE CHARGER ALREADY'],
},
'brightness': {
// Object of controller names for each monitor, either "brightnessctl" or "ddcutil" or "auto"
// 'default' one will be used if unspecified
// Examples
// 'eDP-1': "brightnessctl",
// 'DP-1': "ddcutil",
'controllers': {
'default': "auto",
},
},
'music': {
'preferredPlayer': "plasma-browser-integration",
},
@@ -159,4 +169,4 @@ function overrideConfigRecursive(userOverrides, configOptions = {}) {
overrideConfigRecursive(userOverrides, configOptions);
globalThis['userOptions'] = configOptions;
export default configOptions;
export default configOptions;
+1 -1
View File
@@ -46,7 +46,7 @@ export const Bar = async (monitor = 0) => {
const minHeight = styleContext.get_property('min-height', Gtk.StateFlags.NORMAL);
// execAsync(['bash', '-c', `hyprctl keyword monitor ,addreserved,${minHeight},0,0,0`]).catch(print);
},
startWidget: (await WindowTitle()),
startWidget: (await WindowTitle(monitor)),
centerWidget: Widget.Box({
className: 'spacing-h-4',
children: [
+4 -4
View File
@@ -39,16 +39,16 @@ const WindowTitle = async () => {
}
export default async () => {
export default async (monitor = 0) => {
const optionalWindowTitleInstance = await WindowTitle();
return Widget.EventBox({
onScrollUp: () => {
Indicator.popup(1); // Since the brightness and speaker are both on the same window
Brightness.screen_value += 0.05;
Brightness[monitor].screen_value += 0.05;
},
onScrollDown: () => {
Indicator.popup(1); // Since the brightness and speaker are both on the same window
Brightness.screen_value -= 0.05;
Brightness[monitor].screen_value -= 0.05;
},
onPrimaryClick: () => {
App.toggleWindow('sideleft');
@@ -75,4 +75,4 @@ export default async () => {
]
})
});
}
}
+1 -5
View File
@@ -5,11 +5,7 @@ const { Gravity } = imports.gi.Gdk;
const SysTrayItem = (item) => Button({
className: 'bar-systray-item',
child: Icon({
hpack: 'center',
icon: `${item.icon}`,
setup: (self) => self.hook(item, (self) => self.icon = item.icon),
}),
child: Icon({hpack: 'center'}).bind('icon', item, 'icon'),
setup: (self) => self
.hook(item, (self) => self.tooltipMarkup = item['tooltip-markup'])
,
@@ -71,6 +71,7 @@ export const keybindList = [[
"name": "Utilities",
"binds": [
{ "keys": ["PrtSc"], "action": "Screenshot >> clipboard" },
{ "keys": ["Ctrl", "PrtSc"], "action": "Screenshot >> file + clipboard" },
{ "keys": ["󰖳", "Shift", "+", "S"], "action": "Screen snip >> clipboard" },
{ "keys": ["󰖳", "Shift", "+", "T"], "action": "Image to text >> clipboard" },
{ "keys": ["󰖳", "Shift", "+", "C"], "action": "Color picker" },
+1 -1
View File
@@ -86,7 +86,7 @@ export const sheetContent = ExpandingIconTabContainer({
export default (id) => PopupWindow({
name: `cheatsheet${id}`,
layer: 'overlay',
keymode: 'exclusive',
keymode: 'on-demand',
visible: false,
child: Widget.Box({
vertical: true,
@@ -49,16 +49,16 @@ const OsdValue = ({
});
}
export default () => {
export default (monitor = 0) => {
const brightnessIndicator = OsdValue({
name: 'Brightness',
extraClassName: 'osd-brightness',
extraProgressClassName: 'osd-brightness-progress',
labelSetup: (self) => self.hook(Brightness, self => {
self.label = `${Math.round(Brightness.screen_value * 100)}`;
labelSetup: (self) => self.hook(Brightness[monitor], self => {
self.label = `${Math.round(Brightness[monitor].screen_value * 100)}`;
}, 'notify::screen-value'),
progressSetup: (self) => self.hook(Brightness, (progress) => {
const updateValue = Brightness.screen_value;
progressSetup: (self) => self.hook(Brightness[monitor], (progress) => {
const updateValue = Brightness[monitor].screen_value;
progress.value = updateValue;
}, 'notify::screen-value'),
});
@@ -109,4 +109,4 @@ export default () => {
]
})
});
}
}
+1 -2
View File
@@ -22,7 +22,7 @@ export default (monitor = 0) => Widget.Window({
className: 'osd-window',
css: 'min-height: 2px;',
children: [
IndicatorValues(),
IndicatorValues(monitor),
MusicControls(),
NotificationPopups(),
ColorScheme(),
@@ -30,4 +30,3 @@ export default (monitor = 0) => Widget.Window({
})
}),
});
+1 -1
View File
@@ -5,7 +5,7 @@ import PopupWindow from '../.widgethacks/popupwindow.js';
export default (id = '') => PopupWindow({
name: `overview${id}`,
// exclusivity: 'ignore',
keymode: 'exclusive',
keymode: 'on-demand',
visible: false,
anchor: ['top'],
layer: 'overlay',
+1 -1
View File
@@ -5,7 +5,7 @@ import PopupWindow from '../.widgethacks/popupwindow.js';
export default (id = 0) => PopupWindow({ // On-screen keyboard
name: `session${id}`,
visible: false,
keymode: 'exclusive',
keymode: 'on-demand',
layer: 'overlay',
exclusivity: 'ignore',
anchor: ['top', 'bottom', 'left', 'right'],
+3 -2
View File
@@ -19,7 +19,8 @@ async function getImageViewerApp(preferredApp) {
.then((output) => {
if (output != '') return preferredApp;
else return 'xdg-open';
});
})
.catch(print);
}
const IMAGE_REVEAL_DELAY = 13; // Some wait for inits n other weird stuff
@@ -408,4 +409,4 @@ export const sendMessage = (text) => {
}
else WaifuService.fetch(text);
}
}
+1 -1
View File
@@ -2,7 +2,7 @@ import PopupWindow from '../.widgethacks/popupwindow.js';
import SidebarLeft from "./sideleft.js";
export default () => PopupWindow({
keymode: 'exclusive',
keymode: 'on-demand',
anchor: ['left', 'top', 'bottom'],
name: 'sideleft',
layer: 'overlay',
+1 -1
View File
@@ -40,7 +40,7 @@ const pinButton = Button({
sideleftContent.toggleClassName('sidebar-pinned', self.attribute.enabled);
if (self.attribute.enabled) {
sideleftWindow.exclusivity = 'exclusive';
sideleftWindow.exclusivity = 'on-demad';
}
else {
sideleftWindow.exclusivity = 'normal';
+1 -1
View File
@@ -2,7 +2,7 @@ import PopupWindow from '../.widgethacks/popupwindow.js';
import SidebarRight from "./sideright.js";
export default () => PopupWindow({
keymode: 'exclusive',
keymode: 'on-demand',
anchor: ['right', 'top', 'bottom'],
name: 'sideright',
layer: 'overlay',