]> Freerunner's - dotfiles.git/commitdiff
waybar: migrate wayland-generic gamma control to hyprsunset
authorAndre Ramnitz <tux.rising@gmail.com>
Thu, 26 Jun 2025 00:26:51 +0000 (02:26 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Thu, 26 Jun 2025 00:26:51 +0000 (02:26 +0200)
dot-config/waybar/config.jsonc
dot-config/waybar/style.css

index 6cad62d59f0f389cf59a5450645aef11b1b1ce56..384dbcd6ab5755e25e9e2c10049fa7ca5bf101a8 100644 (file)
     "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateGamma d -0.02",
     "interval": "2"
   },
+  "custom/hyprsunset-temp": {
+        "format": "<span size='12pt'>󰽥</span> {}K",
+        "on-click": "~/.config/hypr/scripts/hyprsunset.sh temperature 4500 toggle",
+        "on-click-right": "~/.config/hypr/scripts/hyprsunset.sh temperature 6500",
+        "on-scroll-up": "~/.config/hypr/scripts/hyprsunset.sh temperature +500",
+        "on-scroll-down": "~/.config/hypr/scripts/hyprsunset.sh temperature -500",
+        "exec": "~/.config/hypr/scripts/hyprsunset.sh temperature",
+        "exec-on-event": false,
+        "exec-if": "pidof hyprsunset",
+        "interval": "once",
+        "tooltip": false,
+        "signal": 4,
+    },
+    "custom/hyprsunset-gamma": {
+        "format": "<span size='12pt'></span> {}%",
+        "on-click": "~/.config/hypr/scripts/hyprsunset.sh gamma 70 toggle",
+        "on-click-right": "~/.config/hypr/scripts/hyprsunset.sh gamma 100",
+        "on-scroll-up": "~/.config/hypr/scripts/hyprsunset.sh gamma +10",
+        "on-scroll-down": "~/.config/hypr/scripts/hyprsunset.sh gamma -10",
+        "exec": "~/.config/hypr/scripts/hyprsunset.sh gamma",
+        "exec-on-event": false,
+        "exec-if": "pidof hyprsunset",
+        "interval": "once",
+        "tooltip": false,
+        "signal": 3,
+    },
   "group/trayclock": {
     "orientation": "horizontal",
     "modules": [
     "orientation": "horizontal",
     "modules": [
       "idle_inhibitor",
-      "group/gammarelay",
+      "group/hyprsunset",
       "hyprland/language"
     ]
   },
       "custom/gammarelay-gamma"
     ]
   },
+  "group/hyprsunset": {
+    "orientation": "inherit",
+    "drawer": {
+      "click-to-reveal": false,
+      "transition-duration": 500,
+      "children-class": "not-gammarelay",
+      "transition-left-to-right": false
+    },
+    "modules": [
+      "custom/hyprsunset-temp",
+      "custom/hyprsunset-gamma"
+    ]
+  },
   "group/temps": {
     "orientation": "inherit",
     "drawer": {
index 2396bc613d928dd6a2749365c7ca7567f6e9d59a..7b3a6e7a6b707dc7d00bab54d4afae6520e50cfc 100644 (file)
@@ -383,6 +383,8 @@ window#waybar {
     border-radius: 8px 0px 0px 8px;
 }
 
+#custom-hyprsunset-temp,
+#custom-hyprsunset-gamma,
 #custom-gammarelay-temperature,
 #custom-gammarelay-gamma,
 #custom-gammarelay-brightness {