Compare commits
4 commits
b73c93a31e
...
61f8b8127c
| Author | SHA1 | Date | |
|---|---|---|---|
| 61f8b8127c | |||
| d6acc728e9 | |||
| 8923862edc | |||
| c6c570dc1c |
7 changed files with 125 additions and 35 deletions
24
nixos/flake.lock
generated
24
nixos/flake.lock
generated
|
|
@ -62,11 +62,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760862643,
|
"lastModified": 1763334038,
|
||||||
"narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=",
|
"narHash": "sha256-LBVOyaH6NFzQ3X/c6vfMZ9k4SV2ofhpxeL9YnhHNJQQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c",
|
"rev": "4c8cdd5b1a630e8f72c9dd9bf582b1afb3127d2c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -77,11 +77,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760878510,
|
"lastModified": 1763283776,
|
||||||
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
|
"narHash": "sha256-Y7TDFPK4GlqrKrivOcsHG8xSGqQx3A6c+i7novT85Uk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67",
|
"rev": "50a96edd8d0db6cc8db57dab6bb6d6ee1f3dc49a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -174,11 +174,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760998189,
|
"lastModified": 1763417348,
|
||||||
"narHash": "sha256-ee2e1/AeGL5X8oy/HXsZQvZnae6XfEVdstGopKucYLY=",
|
"narHash": "sha256-n5xDOeNN+smocQp3EMIc11IzBlR9wvvTIJZeL0g33Fs=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "5a7d18b5c55642df5c432aadb757140edfeb70b3",
|
"rev": "3f66a7fb9626a9a9c077612ef10a0ce396286c7d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -265,11 +265,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761105987,
|
"lastModified": 1763352549,
|
||||||
"narHash": "sha256-d01CGcdNlsqIn4ncGCWHM0Velnii/Ggef1iybQvEOfc=",
|
"narHash": "sha256-hzLnXm0v1snDENpF3KvUQBO8XOAh45qg+y4D46K3rz8=",
|
||||||
"owner": "youwen5",
|
"owner": "youwen5",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "e7d9fefd8665be5d4c77466140f21a15f6d29e93",
|
"rev": "5d002fcacbc5423090f2bba19818adda471fe0c8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.waybar.enable = true;
|
programs.waybar.enable = true;
|
||||||
|
|
||||||
|
services.atd.enable = true; # Command scheduler
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Script to disable for an hour or immediately continue wlsunset. 'Toggle'
|
|
||||||
|
|
||||||
# Check if wlsunset is still running
|
|
||||||
pid=$(pgrep wlsunset)
|
|
||||||
|
|
||||||
if [[ -z ${pid} ]] ; then
|
|
||||||
# Start wlsunset right away.
|
|
||||||
wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 &
|
|
||||||
else
|
|
||||||
# Currently stop wlsunset but restart in an hour.
|
|
||||||
kill ${pid}
|
|
||||||
notify-send 'Stopping sunset' 'Restarting in an hour'
|
|
||||||
at now +1 hours -f "${0}"
|
|
||||||
fi
|
|
||||||
52
scripts/toggle-nightlight.sh
Executable file
52
scripts/toggle-nightlight.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Script to disable for an hour or immediately continue wlsunset. 'Toggle'
|
||||||
|
|
||||||
|
# Queue for at, check man page for options
|
||||||
|
ATQUEUE='T'
|
||||||
|
|
||||||
|
# Get current state
|
||||||
|
pid=$(pgrep wlsunset)
|
||||||
|
|
||||||
|
while getopts ":g" option; do
|
||||||
|
case "${option}" in
|
||||||
|
g)
|
||||||
|
if [[ -z "${pid}" ]]; then
|
||||||
|
state='active'
|
||||||
|
tooltip='Turn off nightlight'
|
||||||
|
class='activated'
|
||||||
|
else
|
||||||
|
state='inactive'
|
||||||
|
tooltip='Turn on nightlight'
|
||||||
|
class='none'
|
||||||
|
fi
|
||||||
|
printf '{"alt": "%s", "tooltip": "%s", "class": "%s" }' \
|
||||||
|
"${state}" "${tooltip}" "${class}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo 'Invalid option'
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Toggle
|
||||||
|
if [[ -z ${pid} ]] ; then
|
||||||
|
# Clear queue
|
||||||
|
for job in $(at -l -q "${ATQUEUE}" | cut -f1); do
|
||||||
|
at -r "${job}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$( command -v wlsunset )" ]; then
|
||||||
|
notify-send 'Starting nightlight'
|
||||||
|
wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 &
|
||||||
|
else
|
||||||
|
notify-send 'Nightlight is not available'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Currently stop wlsunset but restart in an hour.
|
||||||
|
kill ${pid}
|
||||||
|
notify-send 'Stopping nightlight' 'Restarting in an hour'
|
||||||
|
at now +1 hours -f "${0}" -q "${ATQUEUE}"
|
||||||
|
fi
|
||||||
|
|
@ -51,6 +51,7 @@
|
||||||
"privacy",
|
"privacy",
|
||||||
"tray",
|
"tray",
|
||||||
"group/control-center",
|
"group/control-center",
|
||||||
|
"group/display",
|
||||||
"group/network",
|
"group/network",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
"group/power",
|
"group/power",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,15 @@
|
||||||
{
|
{
|
||||||
|
"backlight": {
|
||||||
|
"device": "intel_backlight",
|
||||||
|
"format": "{percent}% {icon}",
|
||||||
|
"format-icons": [
|
||||||
|
"\uf111", /* */
|
||||||
|
"\uf185" /* */
|
||||||
|
],
|
||||||
|
"on-click": "brightnessctl -sq set 0",
|
||||||
|
"on-click-right": "wl-mirror $(hyprctl monitors -j | jq --raw-output '.[] | select(.focused) | .name')"
|
||||||
|
},
|
||||||
|
|
||||||
"battery": {
|
"battery": {
|
||||||
"format": "{capacity}% {icon}",
|
"format": "{capacity}% {icon}",
|
||||||
"format-alt": "{time} {icon}",
|
"format-alt": "{time} {icon}",
|
||||||
|
|
@ -71,6 +82,12 @@
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"custom/display": {
|
||||||
|
"format": "\ue163", /* */
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "wdisplays"
|
||||||
|
},
|
||||||
|
|
||||||
"custom/meta": {
|
"custom/meta": {
|
||||||
"format": "\uf17c", /* */
|
"format": "\uf17c", /* */
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
|
|
@ -134,6 +151,19 @@
|
||||||
"tooltip": true
|
"tooltip": true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"custom/toggle-nightlight": {
|
||||||
|
"exec": "bash ${SCRIPT_DIR}/toggle-nightlight.sh -g",
|
||||||
|
"interval": 60,
|
||||||
|
"return-type": "json",
|
||||||
|
"on-click": "bash ${SCRIPT_DIR}/toggle-nightlight.sh",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"active": "\uf186", /* */
|
||||||
|
"inactive": "\uf0eb" /* */
|
||||||
|
},
|
||||||
|
"tooltip": true
|
||||||
|
},
|
||||||
|
|
||||||
"custom/toggle-notifications": {
|
"custom/toggle-notifications": {
|
||||||
"exec": "bash ${SCRIPT_DIR}/toggle-notifications.sh -g",
|
"exec": "bash ${SCRIPT_DIR}/toggle-notifications.sh -g",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
|
|
@ -163,12 +193,31 @@
|
||||||
"group/control-center": {
|
"group/control-center": {
|
||||||
"orientation": "inherit",
|
"orientation": "inherit",
|
||||||
"modules": [
|
"modules": [
|
||||||
|
/* Preview */
|
||||||
"custom/control-center",
|
"custom/control-center",
|
||||||
|
/* Left-most */
|
||||||
"group/language",
|
"group/language",
|
||||||
/* "hyprland/language", "sway/language", */
|
"custom/toggle-notifications"
|
||||||
"custom/toggle-notifications",
|
/* Right-most */
|
||||||
|
],
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 500,
|
||||||
|
"transition-left-to-right": false,
|
||||||
|
"children-class": "drawer-child"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"group/display": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"modules": [
|
||||||
|
/* Preview */
|
||||||
|
"custom/display",
|
||||||
|
/* Most-left */
|
||||||
|
"idle_inhibitor",
|
||||||
|
"custom/toggle-nightlight",
|
||||||
"custom/toggle-light-dark",
|
"custom/toggle-light-dark",
|
||||||
"bluetooth"
|
"backlight"
|
||||||
|
/* Most-right */
|
||||||
],
|
],
|
||||||
"drawer": {
|
"drawer": {
|
||||||
"transition-duration": 500,
|
"transition-duration": 500,
|
||||||
|
|
@ -199,6 +248,7 @@
|
||||||
/* Preview */
|
/* Preview */
|
||||||
"network",
|
"network",
|
||||||
/* Most-left */
|
/* Most-left */
|
||||||
|
"bluetooth",
|
||||||
"custom/toggle-tailscale"
|
"custom/toggle-tailscale"
|
||||||
/* Most-right */
|
/* Most-right */
|
||||||
],
|
],
|
||||||
|
|
@ -220,8 +270,7 @@
|
||||||
"custom/system-hibernate",
|
"custom/system-hibernate",
|
||||||
"custom/system-sleep",
|
"custom/system-sleep",
|
||||||
"custom/system-lock",
|
"custom/system-lock",
|
||||||
"power-profiles-daemon",
|
"power-profiles-daemon"
|
||||||
"idle_inhibitor"
|
|
||||||
/* Most-right */
|
/* Most-right */
|
||||||
],
|
],
|
||||||
"drawer": {
|
"drawer": {
|
||||||
|
|
|
||||||
|
|
@ -82,12 +82,13 @@ window#waybar {
|
||||||
#privacy,
|
#privacy,
|
||||||
#privacy-item,
|
#privacy-item,
|
||||||
#privacy-item.screenshare,
|
#privacy-item.screenshare,
|
||||||
#privacy-item.audio-in {
|
#privacy-item.audio-in,
|
||||||
|
#privacy-item.audio-out {
|
||||||
background-color: @safety;
|
background-color: @safety;
|
||||||
}
|
}
|
||||||
|
|
||||||
#privacy-item.screenshare {
|
#privacy-item {
|
||||||
background-color: #000000;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pulseaudio.muted {
|
#pulseaudio.muted {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue