From e14ab1ddf1c86ab7522288724acc51d5a22062e3 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 15 Aug 2024 16:09:28 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 34 ++++++------ accounts/gkleen@sif/systemd.nix | 16 ++++++ overlays/nerdfonts.nix | 2 +- overlays/wttrbar/icons.patch | 115 ++++++++++++++++++++++------------------ 4 files changed, 95 insertions(+), 72 deletions(-) diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index e3267fc7..e85f816d 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -311,7 +311,7 @@ in { "(.*) - Mozilla Thunderbird" = "$1"; "(.*) - mpv" = "$1"; }; - iconSize = 14; + iconSize = 11; in [ { layer = "top"; @@ -326,7 +326,7 @@ in { format = "{}"; tooltip = true; interval = 3600; - exec = "${lib.getExe pkgs.wttrbar} --hide-conditions --custom-indicator \"{ICON} {FeelsLikeC}°\""; + exec = "${lib.getExe pkgs.wttrbar} --hide-conditions --custom-indicator \"{ICON} {FeelsLikeC}°\""; return-type = "json"; }; "custom/keymap" = { @@ -371,7 +371,7 @@ in { "hyprland/window" = { separate-outputs = true; icon = true; - icon-size = iconSize; + icon-size = 14; rewrite = windowRewrites; }; clock = { @@ -394,7 +394,8 @@ in { }; }; battery = { - format = "{icon}"; + format = "{icon}"; + icon-size = iconSize - 2; states = { warning = 30; critical = 15; }; format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; format-charging = "󰂄"; @@ -408,25 +409,26 @@ in { spacing = 1; }; privacy = { - icon-spacing = 6; - icon-size = 11; + icon-spacing = 7; + icon-size = iconSize; modules = [ { type = "screenshare"; } { type = "audio-in"; } ]; }; idle_inhibitor = { - format = "{icon}"; - icon-size = 16; + format = "{icon}"; + icon-size = iconSize; format-icons = { activated = "󰈈"; deactivated = "󰈉"; }; }; backlight = { - format = "{icon}"; + format = "{icon}"; + icon-size = iconSize; tooltip-format = "{percent}%"; format-icons = ["󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠"]; on-scroll-up = "lightctl -d up"; on-scroll-down = "lightctl -d down"; }; pulseaudio = { - format = "{icon}"; - icon-size = 16; + format = "{icon}"; + icon-size = iconSize; tooltip-format = "{volume}% {desc}"; format-icons = ["󰕿" "󰖀" "󰕾"]; format-muted = "󰝟"; @@ -451,7 +453,7 @@ in { "hyprland/window" = { separate-outputs = true; icon = true; - icon-size = iconSize; + icon-size = 14; rewrite = windowRewrites; }; clock = { @@ -514,17 +516,14 @@ in { } #tray { - margin: 0 2px; + margin: 0; } #battery, #idle_inhibitor, #backlight, #pulseaudio { color: @grey; } - #battery, #pulseaudio { + #battery, #pulseaudio, #backlight, #idle_inhibitor { margin: 0 5px 0 2px; } - #backlight { - margin: 0 9px 0 3px; - } #battery.discharging { color: @white; } @@ -543,7 +542,6 @@ in { #idle_inhibitor { padding-top: 1px; - margin: 0 9px 0 2px; } #privacy { diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index 92404b61..be016b09 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -188,6 +188,22 @@ in { RuntimeDirectory = "swayidle"; }; }; + psi-notify = { + Install = { + WantedBy = ["graphical-session.target"]; + }; + Unit = { + Requires = ["graphical-session-pre.target"]; + After = ["graphical-session-pre.target"]; + }; + Service = { + ExecStart = lib.getExe pkgs.psi-notify; + ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; + Type = "notify"; + Restart = "always"; + WatchdogSec = "2s"; + }; + }; } // listToAttrs (map ({host, port}: nameValuePair "proxy-to-autossh-socks@${toString port}" { Unit = { Requires = ["autossh-socks@${host}:${toString (port + 1)}.service" "proxy-to-autossh-socks@${toString port}.socket"]; diff --git a/overlays/nerdfonts.nix b/overlays/nerdfonts.nix index 2b73bad3..3e5ac9a2 100644 --- a/overlays/nerdfonts.nix +++ b/overlays/nerdfonts.nix @@ -1,5 +1,5 @@ { prev, ... }: { nerdfonts = prev.nerdfonts.override { - fonts = ["FiraMono" "FiraCode"]; + fonts = ["FiraMono" "FiraCode" "NerdFontsSymbolsOnly"]; }; } diff --git a/overlays/wttrbar/icons.patch b/overlays/wttrbar/icons.patch index 9382ee88..e7e721c8 100644 --- a/overlays/wttrbar/icons.patch +++ b/overlays/wttrbar/icons.patch @@ -1,5 +1,5 @@ diff --git a/src/constants.rs b/src/constants.rs -index 81b1926..36e26ac 100644 +index 81b1926..3619d8f 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,64 +1,52 @@ @@ -64,59 +64,59 @@ index 81b1926..36e26ac 100644 - (425, "🌨️"), - (428, "🌨️"), - (431, "🌨️"), -+ (113, ""), -+ (116, ""), -+ (119, ""), -+ (122, ""), -+ (143, ""), -+ (176, ""), -+ (179, ""), -+ (182, ""), -+ (185, ""), -+ (200, ""), -+ (227, ""), -+ (230, ""), -+ (248, ""), -+ (260, ""), -+ (263, ""), -+ (266, ""), -+ (281, ""), -+ (284, ""), -+ (293, ""), -+ (296, ""), -+ (299, ""), -+ (302, ""), -+ (305, ""), -+ (308, ""), -+ (311, ""), -+ (314, ""), -+ (317, ""), -+ (320, ""), -+ (323, ""), -+ (326, ""), -+ (329, ""), -+ (332, ""), -+ (335, ""), -+ (338, ""), -+ (350, ""), -+ (353, ""), -+ (356, ""), -+ (359, ""), -+ (362, ""), -+ (365, ""), -+ (368, ""), -+ (371, ""), -+ (374, ""), -+ (377, ""), -+ (386, ""), -+ (389, ""), -+ (392, ""), -+ (395, ""), ++ (113, ""), ++ (116, ""), ++ (119, ""), ++ (122, ""), ++ (143, ""), ++ (176, ""), ++ (179, ""), ++ (182, ""), ++ (185, ""), ++ (200, ""), ++ (227, ""), ++ (230, ""), ++ (248, ""), ++ (260, ""), ++ (263, ""), ++ (266, ""), ++ (281, ""), ++ (284, ""), ++ (293, ""), ++ (296, ""), ++ (299, ""), ++ (302, ""), ++ (305, ""), ++ (308, ""), ++ (311, ""), ++ (314, ""), ++ (317, ""), ++ (320, ""), ++ (323, ""), ++ (326, ""), ++ (329, ""), ++ (332, ""), ++ (335, ""), ++ (338, ""), ++ (350, ""), ++ (353, ""), ++ (356, ""), ++ (359, ""), ++ (362, ""), ++ (365, ""), ++ (368, ""), ++ (371, ""), ++ (374, ""), ++ (377, ""), ++ (386, ""), ++ (389, ""), ++ (392, ""), ++ (395, ""), ]; pub const ICON_PLACEHOLDER: &str = "{ICON}"; diff --git a/src/main.rs b/src/main.rs -index 6ac4654..8f9ed6a 100644 +index 6ac4654..1b84207 100644 --- a/src/main.rs +++ b/src/main.rs @@ -175,20 +175,20 @@ fn main() { @@ -124,14 +124,14 @@ index 6ac4654..8f9ed6a 100644 if args.fahrenheit { tooltip += &format!( - "⬆️ {}° ⬇️ {}° ", -+ "󰸃 {}° 󰸂 {}° ", ++ "󰸃 {}° 󰸂 {}° ", day["maxtempF"].as_str().unwrap(), day["mintempF"].as_str().unwrap(), ); } else { tooltip += &format!( - "⬆️ {}° ⬇️ {}° ", -+ "󰸃 {}° 󰸂 {}° ", ++ "󰸃 {}° 󰸂 {}° ", day["maxtempC"].as_str().unwrap(), day["mintempC"].as_str().unwrap(), ); @@ -139,7 +139,16 @@ index 6ac4654..8f9ed6a 100644 tooltip += &format!( - "🌅 {} 🌇 {}\n", -+ " {}  {}\n", ++ " {} {}\n", format_ampm_time(day, "sunrise", args.ampm), format_ampm_time(day, "sunset", args.ampm), ); +@@ -207,7 +207,7 @@ fn main() { + } + + let mut tooltip_line = format!( +- "{} {} {} {}", ++ "{} {}{} {}", + format_time(hour["time"].as_str().unwrap(), args.ampm), + WEATHER_CODES + .iter() -- cgit v1.2.3