aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2025-10-05 14:36:19 -0400
committerDon Williams <don.e.williams@gmail.com>2025-10-05 14:36:19 -0400
commit5c41160260900398b8f9440edf0c735946187e90 (patch)
tree25de05a1c376dd2294adb7bafa84797a833ef38f /config/hypr
parent0c5e7e9de06cc7e786974a3ee5b8e7bda517d219 (diff)
feat(hyprsunset): add Hyprsunset toggle script, SUPER+N keybind, and Waybar nightlight button across all layouts; include in status and vertical power groups
Diffstat (limited to 'config/hypr')
-rw-r--r--config/hypr/UserConfigs/UserKeybinds.conf4
-rwxr-xr-xconfig/hypr/scripts/Hyprsunset.sh77
2 files changed, 81 insertions, 0 deletions
diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf
index 2f0e808f..d8a1d52e 100644
--- a/config/hypr/UserConfigs/UserKeybinds.conf
+++ b/config/hypr/UserConfigs/UserKeybinds.conf
@@ -29,6 +29,7 @@ bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh # help / cheat sheet
bind = $mainMod ALT, R, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofi
bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh # emoji menu
bind = $mainMod, S, exec, $scriptsDir/RofiSearch.sh # Google search using rofi
+bind = $mainMod SHIFT, S, exec, rofi -show windows # list/switch apps using rofi
bind = $mainMod ALT, O, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings
bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/OFF
bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwindle Layout
@@ -55,6 +56,9 @@ bind = $mainMod CTRL ALT, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show wayb
bind = $mainMod CTRL, B, exec, $scriptsDir/WaybarStyles.sh # Waybar Styles Menu
bind = $mainMod ALT, B, exec, $scriptsDir/WaybarLayout.sh # Waybar Layout Menu
+# Night light toggle (Hyprsunset)
+bind = $mainMod, N, exec, $scriptsDir/Hyprsunset.sh toggle
+
# FEATURES / EXTRAS (UserScripts)
bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music using rofi
bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to apply
diff --git a/config/hypr/scripts/Hyprsunset.sh b/config/hypr/scripts/Hyprsunset.sh
new file mode 100755
index 00000000..68e5fab8
--- /dev/null
+++ b/config/hypr/scripts/Hyprsunset.sh
@@ -0,0 +1,77 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# Hyprsunset toggle + Waybar status helper
+# Phase 1: manual toggle only (no scheduling)
+# Icons:
+# - Off: bright sun
+# - On: sunset icon if available, otherwise a blue sun
+#
+# Customize via env vars:
+# HYPERSUNSET_TEMP default 4500 (K)
+# HYPERSUNSET_ICON_MODE sunset|blue (default: sunset)
+
+STATE_FILE="$HOME/.cache/.hyprsunset_state"
+TARGET_TEMP="${HYPERSUNSET_TEMP:-4500}"
+ICON_MODE="${HYPERSUNSET_ICON_MODE:-sunset}"
+
+ensure_state() {
+ [[ -f "$STATE_FILE" ]] || echo "off" > "$STATE_FILE"
+}
+
+# Render icons using pango markup to allow colorization
+icon_off() {
+ # bright sun when not activated
+ printf "<span foreground='gold'></span>"
+}
+
+icon_on() {
+ case "$ICON_MODE" in
+ sunset)
+ printf "<span foreground='orange'></span>"
+ ;;
+ blue)
+ printf "<span foreground='deepskyblue'></span>"
+ ;;
+ *)
+ printf "<span foreground='orange'></span>"
+ ;;
+ esac
+}
+
+cmd_toggle() {
+ ensure_state
+ state="$(cat "$STATE_FILE" || echo off)"
+ if [[ "$state" == "on" ]]; then
+ if command -v hyprsunset >/dev/null 2>&1; then
+ hyprsunset -r || true
+ fi
+ echo off > "$STATE_FILE"
+ else
+ if command -v hyprsunset >/dev/null 2>&1; then
+ hyprsunset -t "$TARGET_TEMP" || true
+ fi
+ echo on > "$STATE_FILE"
+ fi
+}
+
+cmd_status() {
+ ensure_state
+ state="$(cat "$STATE_FILE" || echo off)"
+ if [[ "$state" == "on" ]]; then
+ txt="$(icon_on)"
+ cls="on"
+ tip="Night light on @ ${TARGET_TEMP}K"
+ else
+ txt="$(icon_off)"
+ cls="off"
+ tip="Night light off"
+ fi
+ printf '{"text":"%s","class":"%s","tooltip":"%s"}\n' "$txt" "$cls" "$tip"
+}
+
+case "${1:-}" in
+ toggle) cmd_toggle ;;
+ status) cmd_status ;;
+ *) echo "usage: $0 [toggle|status]" >&2; exit 2 ;;
+ esac
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage