Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dotfiles/.config/hypr/conf/keybindings/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ bind = $mainMod CTRL, T, exec, ~/.config/waybar/themeswitcher.sh
bind = $mainMod CTRL, S, exec, flatpak run com.ml4w.settings # Open ML4W Dotfiles Settings app
bind = $mainMod ALT, G, exec, $HYPRSCRIPTS/gamemode.sh # Toggle game mode
bind = $mainMod CTRL, L, exec, ~/.config/hypr/scripts/power.sh lock # Start wlogout
bind = $mainMod CTRL, N, exec, ~/.config/hypr/scripts/hyprsunset-toggle.sh # Toggle hyprsunset

# Workspaces
bind = $mainMod, 1, workspace, 1 # Open workspace 1
Expand Down
6 changes: 6 additions & 0 deletions dotfiles/.config/hypr/hyprsunset.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Makes hyprsunset do nothing to the screen by default
# Without this, the default applies some tint to the monitor
profile {
time = 00:00
identity = true
}
29 changes: 29 additions & 0 deletions dotfiles/.config/hypr/scripts/hyprsunset-toggle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Default temperature values
ON_TEMP=4000
OFF_TEMP=6000

# Ensure hyprsunset is running
if ! pgrep -x hyprsunset >/dev/null; then
setsid uwsm app -- hyprsunset &
sleep 1 # Give it time to register
fi

# Query the current temperature
CURRENT_TEMP=$(hyprctl hyprsunset temperature 2>/dev/null | grep -oE '[0-9]+')

# Restart Waybar if nightlight module exists
if grep -q '"custom/nightlight"' ~/.config/waybar/modules.json; then
pkill -x waybar
setsid ~/.config/waybar/launch.sh >/dev/null 2>&1 &
fi

# Toggle between ON_TEMP and OFF_TEMP
if [[ "$CURRENT_TEMP" == "$OFF_TEMP" ]]; then
hyprctl hyprsunset temperature "$ON_TEMP"
notify-send " Nightlight screen temperature"
else
hyprctl hyprsunset temperature "$OFF_TEMP"
notify-send " Daylight screen temperature"
fi
43 changes: 0 additions & 43 deletions dotfiles/.config/hypr/shaders/blue-light-filter-25.glsl

This file was deleted.

43 changes: 0 additions & 43 deletions dotfiles/.config/hypr/shaders/blue-light-filter-50.glsl

This file was deleted.

43 changes: 0 additions & 43 deletions dotfiles/.config/hypr/shaders/blue-light-filter-75.glsl

This file was deleted.

8 changes: 0 additions & 8 deletions dotfiles/.config/hypr/shaders/invert-colors.glsl

This file was deleted.

17 changes: 16 additions & 1 deletion dotfiles/.config/waybar/modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,21 @@
"on-click": "~/.config/hypr/scripts/hypridle.sh toggle"
},

// Hyprsunset
"custom/hyprsunset": {
"exec": "temp=$(hyprctl hyprsunset temperature 2>/dev/null || echo '6000'); echo \"{\\\"alt\\\": \\\"$temp\\\"}\"",
"return-type": "json",
"format": "{icon}",
"format-icons": {
"4000": "",
"default": ""
},
"escape": true,
"tooltip-format": "Nightlight",
"interval": "once",
"on-click": "~/.config/hypr/scripts/hyprsunset-toggle.sh"
},

// Keyboard State
"keyboard-state": {
"numlock": true,
Expand Down Expand Up @@ -277,7 +292,7 @@
"custom/tools",
"custom/cliphist",
"custom/hypridle",
"custom/hyprshade"
"custom/hyprsunset"
]
},

Expand Down
1 change: 1 addition & 0 deletions setup/pkgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ hyprland=(
"hypridle"
"hyprpicker"
"xdg-desktop-portal-hyprland"
"hyprsunset"
)

apps=(
Expand Down