From d488d7e5011e36ef4ee1e8f67fd7eab3c7c40b53 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 12 Aug 2024 21:18:21 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 51 ++++++++++++++++++++++++---------------- accounts/gkleen@sif/hyprland.nix | 11 +++++---- flake.lock | 8 +++---- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index b66db697..85699bd4 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -359,7 +359,7 @@ in { output = "eDP-1"; modules-left = [ "hyprland/workspaces" ]; modules-center = [ "hyprland/window" ]; - modules-right = [ "custom/weather" "clock" "privacy" "tray" "backlight" "battery" "idle_inhibitor" ]; + modules-right = [ "custom/weather" "clock" "privacy" "tray" "pulseaudio" "backlight" "battery" "idle_inhibitor" ]; "custom/weather" = { format = "{}"; @@ -419,25 +419,22 @@ in { format = "{icon}"; format-icons = { activated = "󰈈"; deactivated = "󰈉"; }; }; - backlight = let - brightnessNotify = '' - max=$(brightnessctl m -m) - curr=$(brightnessctl g -m) - perc=$((curr * 100 / max)) - pgrep dunstify || dunstify -u low -a brightness "Brightness ''${perc}" "" -h int:value:''${perc} - ''; - in { + backlight = { format = "{icon}"; tooltip-format = "{percent}%"; format-icons = ["󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠"]; - on-scroll-up = pkgs.writeShellScript "brightness-up" '' - brightnessctl s +1 - ${brightnessNotify} - ''; - on-scroll-down = pkgs.writeShellScript "brightness-down" '' - brightnessctl s 1- - ${brightnessNotify} - ''; + on-scroll-up = "lightctl -d up"; + on-scroll-down = "lightctl -d down"; + }; + pulseaudio = { + format = "{icon}"; + tooltip-format = "{volume}% {desc}"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + format-muted = "󰝟"; + ignored-sinks = ["Easy Effects Sink"]; + on-scroll-up = "volumectl -d -u up"; + on-scroll-down = "volumectl -d -u down"; + on-click = "volumectl -d toggle-mute"; }; } { @@ -521,7 +518,7 @@ in { #tray { margin: 0 2px; } - #battery, #idle_inhibitor, #backlight { + #battery, #idle_inhibitor, #backlight, #pulseaudio { color: @grey; margin: 0 5px 0 2px; } @@ -629,7 +626,10 @@ in { services = { dunst = { settings = import ./dunst-settings.nix inputs; - iconTheme = cfg.gtk.iconTheme; + iconTheme = { + package = pkgs.paper-icon-theme; + name = "Paper"; + }; enable = true; }; emacs = { @@ -654,7 +654,7 @@ in { }; # status-notifier-watcher.enable = true; xembed-sni-proxy.enable = true; - pasystray.enable = true; + pasystray.enable = false; udiskie = { enable = true; automount = false; @@ -772,6 +772,17 @@ in { ]; }; poweralertd.enable = true; + avizo = { + enable = true; + settings.default = { + time = "1.0"; + background = "rgba(0, 0, 0, 0.8)"; + border-color = "rgba(0, 0, 0, 1)"; + bar-fg-color = "rgba(160, 160, 160, 1)"; + bar-bg-color = "rgba(32, 32, 32, 0.96)"; + # y-offset = "0.25"; + }; + }; }; home.pointerCursor = { diff --git a/accounts/gkleen@sif/hyprland.nix b/accounts/gkleen@sif/hyprland.nix index 6bdc8358..252b8351 100644 --- a/accounts/gkleen@sif/hyprland.nix +++ b/accounts/gkleen@sif/hyprland.nix @@ -190,11 +190,12 @@ "$mainMod ALT, E, exec, emacsclient -c" - ", XF86MonBrightnessUp, exec, brightnessctl s +5%" - ", XF86MonBrightnessDown, exec, brightnessctl s 5%-" - ", XF86AudioRaiseVolume, exec, pamixer -i 2" - ", XF86AudioLowerVolume, exec, pamixer -d 2" - ", XF86AudioMute, exec, pamixer -t" + ", XF86MonBrightnessUp, exec, lightctl -d up" + ", XF86MonBrightnessDown, exec, lightctl -d down" + ", XF86AudioRaiseVolume, exec, volumectl -d -u up" + ", XF86AudioLowerVolume, exec, volumectl -d -u down" + ", XF86AudioMute, exec, volumectl -d toggle-mute" + ", XF86AudioMicMute, exec, volumectl -d -m toggle-mute" ", Print, exec, ${pkgs.writeShellScript "screenshot" '' export PATH="${lib.makeBinPath (with pkgs; [ grim slurp wl-clipboard-rs coreutils ])}:$PATH" diff --git a/flake.lock b/flake.lock index 8f9ac46d..a8746d7d 100644 --- a/flake.lock +++ b/flake.lock @@ -618,11 +618,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1722813957, - "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", - "owner": "NixOS", + "lastModified": 1723480307, + "narHash": "sha256-tdUwQVPJYI8YEzt7vtJirnIOZWLeLRMyR3bfzIHz4cU=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", + "rev": "33c8b1a7202d4c22d74f4db73666e9a868069d2c", "type": "github" }, "original": { -- cgit v1.2.3