forked from Shinonome/dots-hyprland
replace wlsunset with gammastep
wlsunset doesn't work w/o manually passing the latitude and longitude. gammastep can retrieve geolocation from geoclue so it works out of the box for everyone.
This commit is contained in:
@@ -78,7 +78,7 @@ export const HyprToggleIcon = async (icon, name, hyprlandConfigValue, props = {}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ModuleNightLight = (props = {}) => Widget.Button({ // TODO: Make this work
|
export const ModuleNightLight = (props = {}) => Widget.Button({
|
||||||
attribute: {
|
attribute: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
@@ -87,13 +87,13 @@ export const ModuleNightLight = (props = {}) => Widget.Button({ // TODO: Make th
|
|||||||
onClicked: (self) => {
|
onClicked: (self) => {
|
||||||
self.attribute.enabled = !self.attribute.enabled;
|
self.attribute.enabled = !self.attribute.enabled;
|
||||||
self.toggleClassName('sidebar-button-active', self.attribute.enabled);
|
self.toggleClassName('sidebar-button-active', self.attribute.enabled);
|
||||||
if (self.attribute.enabled) Utils.execAsync(['wlsunset', '-t', '4500']).catch(print)
|
if (self.attribute.enabled) Utils.execAsync('gammastep').catch(print)
|
||||||
else Utils.execAsync('pkill wlsunset').catch(print);
|
else Utils.execAsync('pkill gammastep').catch(print);
|
||||||
},
|
},
|
||||||
child: MaterialIcon('nightlight', 'norm'),
|
child: MaterialIcon('nightlight', 'norm'),
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
setupCursorHover(self);
|
setupCursorHover(self);
|
||||||
self.attribute.enabled = !!exec('pidof wlsunset');
|
self.attribute.enabled = !!exec('pidof gammastep');
|
||||||
self.toggleClassName('sidebar-button-active', self.attribute.enabled);
|
self.toggleClassName('sidebar-button-active', self.attribute.enabled);
|
||||||
},
|
},
|
||||||
...props,
|
...props,
|
||||||
@@ -235,6 +235,3 @@ export const ModulePowerIcon = (props = {}) => Widget.Button({
|
|||||||
setupCursorHover(button);
|
setupCursorHover(button);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# Bar, wallpaper
|
# Bar, wallpaper
|
||||||
exec-once = swww-daemon --format xrgb
|
exec-once = swww-daemon --format xrgb
|
||||||
|
exec-once = /usr/lib/geoclue-2.0/demos/agent
|
||||||
exec-once = ags &
|
exec-once = ags &
|
||||||
|
|
||||||
# Input method
|
# Input method
|
||||||
@@ -19,5 +20,3 @@ exec-once = wl-paste --type image --watch cliphist store
|
|||||||
|
|
||||||
# Cursor
|
# Cursor
|
||||||
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
|
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ pavucontrol wireplumber libdbusmenu-gtk3 playerctl swww
|
|||||||
webp-pixbuf-loader gtk-layer-shell gtk3 gtksourceview3 gobject-introspection upower yad ydotool
|
webp-pixbuf-loader gtk-layer-shell gtk3 gtksourceview3 gobject-introspection upower yad ydotool
|
||||||
|
|
||||||
### Gnome
|
### Gnome
|
||||||
polkit-gnome gnome-keyring gnome-control-center blueberry networkmanager brightnessctl wlsunset gnome-bluetooth-3.0
|
polkit-gnome gnome-keyring gnome-control-center blueberry networkmanager brightnessctl gammastep gnome-bluetooth-3.0
|
||||||
|
|
||||||
### Widgets
|
### Widgets
|
||||||
python-pywayland python-psutil hypridle-git hyprlock-git wlogout wl-clipboard hyprpicker-git anyrun-git
|
python-pywayland python-psutil hypridle-git hyprlock-git wlogout wl-clipboard hyprpicker-git anyrun-git
|
||||||
|
|||||||
Reference in New Issue
Block a user