From bbaa9686c9f41d850bbf213dffaa67233e612e3d Mon Sep 17 00:00:00 2001 From: shinya Date: Fri, 31 Jan 2025 17:16:06 +0100 Subject: [PATCH] cleanup, swaync, qutebrowser and waybar fix --- nixos/home/apps/hacking.nix | 1 + nixos/home/apps/programming.nix | 2 -- nixos/home/desktop/hyprland/hyprland.nix | 9 ++++++- nixos/home/desktop/hyprland/waybar.nix | 25 +++++++++++++++++-- .../packages/applications/qutebrowser.nix | 1 + nixos/home/packages/style.nix | 2 ++ 6 files changed, 35 insertions(+), 5 deletions(-) diff --git a/nixos/home/apps/hacking.nix b/nixos/home/apps/hacking.nix index 3ac0171..fc11f24 100644 --- a/nixos/home/apps/hacking.nix +++ b/nixos/home/apps/hacking.nix @@ -24,6 +24,7 @@ android-udev-rules postman gdb + xh ]; }; } diff --git a/nixos/home/apps/programming.nix b/nixos/home/apps/programming.nix index c000c5c..ee90ccd 100644 --- a/nixos/home/apps/programming.nix +++ b/nixos/home/apps/programming.nix @@ -2,8 +2,6 @@ pkgs, lib, config, - inputs, - system, ... }: { options = { diff --git a/nixos/home/desktop/hyprland/hyprland.nix b/nixos/home/desktop/hyprland/hyprland.nix index 88d70e8..27c8614 100644 --- a/nixos/home/desktop/hyprland/hyprland.nix +++ b/nixos/home/desktop/hyprland/hyprland.nix @@ -42,7 +42,14 @@ # Services for the Hyprland module services.network-manager-applet.enable = true; - services.dunst.enable = true; + #services.dunst.enable = true; + services.swaync = { + enable = true; + settings = { + fit-to-screen = false; + control-center-height = 200; + }; + }; # Home session variables home.sessionVariables = { diff --git a/nixos/home/desktop/hyprland/waybar.nix b/nixos/home/desktop/hyprland/waybar.nix index 6a788eb..75fa1f9 100644 --- a/nixos/home/desktop/hyprland/waybar.nix +++ b/nixos/home/desktop/hyprland/waybar.nix @@ -31,7 +31,7 @@ ]; modules-left = ["custom/padd" "custom/l_end" "cpu" "memory" "custom/r_end" "custom/l_end" "idle_inhibitor" "clock" "custom/r_end" "" "custom/padd"]; modules-center = ["custom/padd" "" "custom/l_end" "hyprland/workspaces" "hyprland/window" "custom/r_end" "custom/padd"]; - modules-right = ["custom/padd" "custom/l_end" "backlight" "network" "bluetooth" "pulseaudio" "pulseaudio#microphone" "custom/r_end" "custom/l_end" "tray" "battery" "custom/r_end" "custom/l_end" "custom/cliphist" "custom/power" "custom/r_end" "custom/padd"]; + modules-right = ["custom/padd" "custom/l_end" "backlight" "network" "bluetooth" "pulseaudio" "pulseaudio#microphone" "custom/r_end" "custom/l_end" "tray" "battery" "custom/r_end" "custom/l_end" "custom/notification" "custom/cliphist" "custom/power" "custom/r_end" "custom/padd"]; "hyprland/workspaces" = { disable-scroll = true; @@ -243,6 +243,27 @@ tooltip = true; }; + "custom/notification" = { + tooltip = false; + format = "{} {icon}"; + "format-icons" = { + notification = "󱅫"; + none = ""; + "dnd-notification" = " "; + "dnd-none" = "󰂛"; + "inhibited-notification" = " "; + "inhibited-none" = ""; + "dnd-inhibited-notification" = " "; + "dnd-inhibited-none" = " "; + }; + "return-type" = "json"; + "exec-if" = "which swaync-client"; + exec = "swaync-client -swb"; + "on-click" = "sleep 0.1 && swaync-client -t -sw"; + "on-click-right" = "sleep 0.1 && swaync-client -d -sw"; + escape = true; + }; + "custom/l_end" = { format = " "; interval = "once"; @@ -404,7 +425,7 @@ #memory, #mpris, #network, - #custom-notifications, + #custom-notification, #custom-power, #pulseaudio, #custom-spotify, diff --git a/nixos/home/packages/applications/qutebrowser.nix b/nixos/home/packages/applications/qutebrowser.nix index 2c342d4..d360a12 100644 --- a/nixos/home/packages/applications/qutebrowser.nix +++ b/nixos/home/packages/applications/qutebrowser.nix @@ -208,6 +208,7 @@ in config.set('content.javascript.enabled', True, 'qute://*/*') + c.editor.command = ['${pkgs.kitty}/bin/kitty', '-e', 'nvim', '{}'] c.tabs.favicons.scale = 1.0 c.tabs.last_close = 'close' c.tabs.position = 'top' diff --git a/nixos/home/packages/style.nix b/nixos/home/packages/style.nix index 1a2e56c..628935d 100644 --- a/nixos/home/packages/style.nix +++ b/nixos/home/packages/style.nix @@ -19,6 +19,7 @@ bat.enable = lib.mkDefault true; btop.enable = lib.mkDefault true; fzf.enable = lib.mkDefault true; + swaync.enable = true; tmux.enable = if config.program.tmux.enable @@ -32,6 +33,7 @@ kde.enable = true; gtk.enable = true; + waybar = { enable = true; enableCenterBackColors = false;