This commit is contained in:
Hadi 2024-06-28 16:32:52 +02:00
parent 921c359693
commit 06f5e03e66
6 changed files with 13 additions and 5 deletions

View File

@ -39,6 +39,8 @@ Caffeine is a simple script that toggles hypridle (disable suspend & screenlock)
Blue light filter, using wlsunset
- `night-shift` # Toggle night shift
- `night-shift-status` # Return active/inactive
- `night-shift-on`
- `night-shift-off`

View File

@ -14,6 +14,7 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] Qutebrowser
- [~] Bitwarden integration (I need this.)
- [ ] Custom command bar
- [+] Waybar
- [ ] Caffeine status on click

View File

@ -207,6 +207,8 @@ in {
"dark"; # Enable dark mode for websites that support it
};
statusbar.show = "in-mode";
fonts = { default_family = "${config.var.theme.font}"; };
completion = {
@ -330,6 +332,7 @@ in {
config.unbind("gt")
c.tabs.padding = {"bottom": 6, "left": 7, "right": 7, "top": 6}
c.statusbar.padding = {"bottom": 6, "left": 7, "right": 7, "top": 6}
config.load_autoconfig(True)
'';

View File

@ -1,7 +1,7 @@
{ pkgs, ... }:
let
caffeine-status = pkgs.writeShellScriptBin "caffeine-status" ''
[[ -f /tmp/caffeine ]] && echo "active" || echo "inactive"
[[ -f /tmp/caffeine ]] && echo "1" || echo "0"
'';
caffeine = pkgs.writeShellScriptBin "caffeine" ''
@ -19,7 +19,7 @@ let
caffeine-status-icon = pkgs.writeShellScriptBin "caffeine-status-icon" ''
status=$(caffeine-status)
if [[ $status == "active" ]]; then
if [[ $status == "1" ]]; then
echo "󰅶"
else
echo "󰾪"

View File

@ -15,7 +15,7 @@ let
notif "night-shift" "$message"
'';
night-shift-toggle = pkgs.writeShellScriptBin "night-shift-toggle" ''
night-shift = pkgs.writeShellScriptBin "night-shift" ''
if pgrep wlsunset; then
night-shift-off
else
@ -43,7 +43,7 @@ in {
home.packages = [
night-shift-on
night-shift-off
night-shift-toggle
night-shift
night-shift-status
night-shift-status-icon
];

View File

@ -102,7 +102,7 @@
"headphone" = "";
"default" = [ "󰖀" "󰕾" "" ];
};
"on-click" = "pamixer -t";
"on-click" = "sound-toggle";
"scroll-step" = 1;
};
@ -137,6 +137,7 @@
max-length = 5;
interval = 10;
exec = "caffeine-status-icon";
"on-click" = "caffeine";
# exec-if = "pgrep spotify";
# return-type = "";
};
@ -145,6 +146,7 @@
max-length = 5;
interval = 10;
exec = "night-shift-status-icon";
"on-click" = "night-shift";
};
backlight = {
device = "nvidia_0";