swww img ~/Bilder/Wallpapers/default.jpg &
fi
+if [[ ! $(pidof wl-gammarelay-rs) ]]; then
+ "$HOME"/.cargo/bin/wl-gammarelay-rs > /dev/null 2>&1 &
+ logger 'gammarelay started'
+ "$HOME"/.config/hypr/scripts/gammarelay-autotemp.py &
+ logger 'gammarelay-autotemp started'
+fi
+
openrgb -p simple.orp &
kcr create -c main -s default & # kakoune default server
--- /dev/null
+#!/bin/python
+
+import datetime as dt
+import time
+import subprocess
+
+## Tested parameter space:
+# dusk_time < 3600 + dawn_time
+# 3600 < dusk_time
+
+temp_day = 6500
+temp_night = 3800
+dawn_time = 9 * 3600 # 9am
+dusk_time = 19 * 3600 # 19pm
+
+while True:
+ temp = temp_day
+ now = dt.datetime.now()
+ curr_time = int(
+ (now - now.replace(hour=0, minute=0, second=0, microsecond=0)).total_seconds()
+ )
+ if dawn_time - 3600 < curr_time < dawn_time:
+ temp = (dawn_time - curr_time) * (temp_night - temp_day) / 3600 + temp_day
+ if dusk_time - 3600 < curr_time < dusk_time:
+ temp = (dusk_time - curr_time) * (temp_day - temp_night) / 3600 + temp_night
+ print("check")
+ if dusk_time < curr_time or curr_time < dawn_time:
+ temp = temp_night
+ temp = int(temp)
+ subprocess.run(
+ f"busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q {temp}",
+ shell=True,
+ )
+ time.sleep(1)
--- /dev/null
+#!/bin/bash
+
+# The human eye is more sensitive to contrast at high than at low
+# levels of intensity. Thus, contast at high levels of intensity is
+# lost if the display is inverted. This script compensates for this by
+# gamma correction. The value of γ=0.6 is not based on any theory;
+# adjust it to your liking.
+
+dbus="rs.wl-gammarelay / rs.wl.gammarelay"
+
+if [ "$(busctl --user get-property $dbus Inverted)" = "b false" ]; then
+ busctl --user set-property $dbus Inverted b true
+ busctl --user set-property $dbus Gamma d 0.6
+else
+ busctl --user set-property $dbus Inverted b false
+ busctl --user set-property $dbus Gamma d 1.0
+fi
+//# kak: filetype=json:ts=4:iw=4
{
"layer": "top", // Waybar at top layer
"position": "bottom", // Waybar position (top|bottom|left|right)
// "width": 1280, // Waybar width
"spacing": -8, // Gaps between modules (4px)
// Choose the order of the modules
- "modules-left": ["hyprland/workspaces", "mpd"],
+ "modules-left": ["hyprland/workspaces", "custom/spacer", "custom/gammarelay-temperature", "custom/gammarelay-gamma", "custom/gammarelay-brightness", "mpd"],
"modules-center": ["hyprland/window"],
"margin": "0",
"modules-right": ["keyboard-state", "cpu", "memory", "temperature#temp2", "temperature", "pulseaudio", "clock", "tray", "idle_inhibitor", "custom/wallpaper", "custom/powermenu"],
"clock": {
- // "timezone": "America/New_York",
+ "timezone": "Europe/Berlin",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"idle_inhibitor": {
- "format": "{icon}",
+ "format": " {icon} ",
"format-icons": {
"activated": "",
"deactivated": ""
"tooltip": false,
"interval": "once",
},
+
+ "custom/spacer": {
+ "format": " ",
+ "tooltip": false,
+ },
+
+ "custom/gammarelay-temperature": {
+ "format": " {}",
+ "exec": "wl-gammarelay-rs watch {t}",
+ "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n +100",
+ "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100",
+ "interval": "2"
+ },
+ "custom/gammarelay-brightness": {
+ "format": " {}%",
+ "exec": "wl-gammarelay-rs watch {bp}",
+ "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateBrightness d +0.02",
+ "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateBrightness d -0.02",
+ "interval": "2"
+ },
+ "custom/gammarelay-gamma": {
+ "format": "𝛄 {}%",
+ "exec": "wl-gammarelay-rs watch {g}",
+ "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateGamma d +0.02",
+ "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateGamma d -0.02",
+ "interval": "2"
+ },
+
}
-# kak: filetype=json:ts=2:iw=2
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
+ padding: 0 8px;
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces {
- padding: 0 10px;
+ padding: 0 8px;
background-image: linear-gradient(0deg, rgba(228,169,68, 0.9), rgba(228,169,68, 0.6), rgba(59, 64, 69, 0.5));
border-bottom: 3px solid rgba(100, 114, 125, 1);
color: #181818;
#mpd {
- padding: 0 24px;
+ padding: 0 16px;
margin: 0 4px;
color: #eff0f1;
font-family: "IBM Plex Serif";
#clock {
padding-left: 16px;
- padding-right: 32px;
margin: 0 4px;
}
-#idle_inhibitor {
+#custom-spacer {
+ padding: 0 0px;
+ margin: 0 1px;
+}
+
+
+#idle_inhibitor,
+#custom-powermenu,
+#custom-wallpaper {
padding: 0 8px;
margin: 0 4px;
color: #181818;
background-image: linear-gradient(0deg, rgba(228,169,68, 0.9), rgba(228,169,68, 0.6), rgba(59, 64, 69, 0.5));
border-bottom: 3px solid rgba(100, 114, 125, 1);
}
-#custom-powermenu,
-#custom-wallpaper {
- padding: 0 8px;
- padding-right: 0px;
+
+
+#custom-gammarelay-temperature,
+#custom-gammarelay-gamma,
+#custom-gammarelay-brightness {
+ padding: 0 16px;
margin: 0 4px;
color: #181818;
- background-image: linear-gradient(0deg, rgba(228,169,68, 0.9), rgba(228,169,68, 0.6), rgba(59, 64, 69, 0.5));
+ background-image: linear-gradient(0deg, rgba(124,184,143, 0.9), rgba(124,184,143, 0.6), rgba(59, 64, 69, 0.5));
border-bottom: 3px solid rgba(100, 114, 125, 1);
}
+
#tray {
padding: 0 16px;
margin: 0 4px;