diff --git a/.config/waybar/config b/.config/waybar/config index 883e33b..ace832c 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -5,7 +5,7 @@ "modules-left": ["sway/workspaces", "sway/mode"], "modules-center": ["sway/window"], - "modules-right": ["tray", "pulseaudio", "network", "network#wireguard", "temperature", "custom/storage", "memory", "cpu", "backlight", "sway/language", "battery", "clock#date", "clock#time"], + "modules-right": ["tray", "custom/himalaya", "pulseaudio", "network", "network#wireguard", "temperature", "custom/storage", "memory", "cpu", "backlight", "sway/language", "battery", "clock#date", "clock#time"], "sway/workspaces": { "all-outputs": false, "format": "{name}", @@ -133,6 +133,12 @@ "interval": 40, "exec": "~/.config/waybar/modules/storage.sh" }, + "custom/himalaya": { + "exec": "tail -fn 1 /tmp/himalaya-counter-am | xargs -I {} sh -c 'if [ {} -gt 0 ]; then echo 📫; else echo; fi'", + "format": "{}", + "on-click": "kitty -1 --hold himalaya -a a_mirre", + "tooltip": false + }, "tray": { "icon-size": 18 }, diff --git a/.config/waybar/style.css b/.config/waybar/style.css index c2b2538..f6a9e9b 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -65,7 +65,7 @@ window#waybar.solo { color: #c9545d; } -#mode, #battery, #cpu, #memory, #pulseaudio, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail { +#mode, #battery, #cpu, #memory, #pulseaudio, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail, #custom-himalaya { margin: 0px 5px 0px 5px; min-width: 30px; } diff --git a/home-surtur.nix b/home-surtur.nix index 868a85c..f0c25cd 100644 --- a/home-surtur.nix +++ b/home-surtur.nix @@ -37,6 +37,7 @@ in { duf dua du-dust + himalaya b3sum cargo-watch zellij @@ -331,6 +332,61 @@ in { }; }; + himalaya-watch = { + Unit = { + Description = "Himalaya watcher"; + After = "network.target"; + }; + Service = { + ExecStart = "${pkgs.himalaya}/bin/himalaya watch -a a_mirre"; + Restart = "always"; + RestartSec = 10; + Environment = "RUST_LOG=debug"; + ReadWritePaths = "/tmp/himalaya-counter-am"; + ProtectHome = "true"; + ProtectSystem = "true"; + DevicePolicy = "closed"; + NoNewPrivileges = true; + LockPersonality = true; + InaccessiblePaths = [ + "-/lost+found" + "/dev/shm" + "-%h/.ssh" + ]; + # KeyringMode = "private"; + }; + Install = { + WantedBy = ["default.target"]; + }; + }; + + himalaya-notify = { + Unit = { + Description = "Himalaya new message notifier"; + After = "network.target"; + }; + Service = { + ExecStart = "${pkgs.himalaya}/bin/himalaya notify"; + Restart = "always"; + RestartSec = 10; + Environment = "RUST_LOG=debug"; + ProtectHome = "true"; + ProtectSystem = "true"; + DevicePolicy = "closed"; + NoNewPrivileges = true; + LockPersonality = true; + InaccessiblePaths = [ + "-/lost+found" + "/dev/shm" + "-%h/.ssh" + ]; + # KeyringMode = "private"; + }; + Install = { + WantedBy = ["default.target"]; + }; + }; + trackerMask = { Unit = {Description = "";};