From 06f5e03e66bcb988d96d4764a321a0aab7055177 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:32:52 +0200 Subject: [PATCH] Update --- docs/SCRIPTS.md | 2 ++ docs/TODO.md | 1 + home/programs/qutebrowser/default.nix | 3 +++ home/scripts/caffeine/default.nix | 4 ++-- home/scripts/night-shift/default.nix | 4 ++-- home/system/waybar/default.nix | 4 +++- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/SCRIPTS.md b/docs/SCRIPTS.md index 59eb5b9..7094373 100644 --- a/docs/SCRIPTS.md +++ b/docs/SCRIPTS.md @@ -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` diff --git a/docs/TODO.md b/docs/TODO.md index dcf3c10..e8b5b3e 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -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 diff --git a/home/programs/qutebrowser/default.nix b/home/programs/qutebrowser/default.nix index a4e889f..513eecf 100644 --- a/home/programs/qutebrowser/default.nix +++ b/home/programs/qutebrowser/default.nix @@ -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) ''; diff --git a/home/scripts/caffeine/default.nix b/home/scripts/caffeine/default.nix index e589e21..f9ff343 100644 --- a/home/scripts/caffeine/default.nix +++ b/home/scripts/caffeine/default.nix @@ -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 "󰾪" diff --git a/home/scripts/night-shift/default.nix b/home/scripts/night-shift/default.nix index fce0b52..ea9b251 100644 --- a/home/scripts/night-shift/default.nix +++ b/home/scripts/night-shift/default.nix @@ -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 ]; diff --git a/home/system/waybar/default.nix b/home/system/waybar/default.nix index 17d7488..9ee6129 100644 --- a/home/system/waybar/default.nix +++ b/home/system/waybar/default.nix @@ -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";