diff --git a/homes/x86_64-linux/julian@aspi/packages.nix b/homes/x86_64-linux/julian@aspi/packages.nix index ec97910..044388c 100644 --- a/homes/x86_64-linux/julian@aspi/packages.nix +++ b/homes/x86_64-linux/julian@aspi/packages.nix @@ -119,7 +119,6 @@ with pkgs; fdupes # find and delete duplicate files digikam dbeaver-bin - pavucontrol sqlite nomacs diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix index ce4621a..9a3d9fa 100644 --- a/modules/home/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -31,7 +31,7 @@ in enable = mkBoolOpt false "Enable or disable the hyprland window manager."; }; - # imports = [ (ib.mkIf inputs.hyprland.homeManagerModules.default) ]; + imports = [ inputs.hyprland.homeManagerModules.default ]; config = lib.mkIf cfg.enable { modules.desktop.addons = { @@ -98,51 +98,6 @@ in # }; # }; - # programs.waybar = { - # enable = true; - # systemd.enable = true; - # style = builtins.readFile ./style.css; - # settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json); - # # settings = { - # # mainBar = { - # # layer = "top"; - # # position = "bottom"; - # # height = 30; - # # output = [ - # # "eDP-1" - # # "HDMI-A-1" - # # ]; - # # modules-left = [ - # # "hyprland/workspaces" - # # "hyprland/submap" - # # ]; - # # modules-center = [ "hyprland/window" ]; - # # modules-right = [ - # # # "mpd" - # # # "idle_inhibitor" - # # "pulseaudio" - # # # "network" - # # "power-profiles-daemon" - # # "cpu" - # # "memory" - # # # "temperature" - # # # "backlight" - # # # "keyboard-state" - # # "battery" - # # # "battery#bat2" - # # "clock" - # # "tray" - # # ]; - - # # # "sway/workspaces" = { - # # # disable-scroll = true; - # # # all-outputs = true; - # # # }; - # # }; - # # }; - # }; - - # programs.wlogout.enable = true; # can be configured # services.hypridle.enable = true; # can be configured services.network-manager-applet.enable = true; diff --git a/modules/home/hyprland/waybar/config.json b/modules/home/hyprland/waybar/config.json new file mode 100644 index 0000000..853f5c2 --- /dev/null +++ b/modules/home/hyprland/waybar/config.json @@ -0,0 +1,97 @@ +{ + "layer": "top", + "position": "bottom", + "mode": "dock", + "exclusive": true, + "passtrough": false, + "height": 32, + + "modules-left": [ + "hyprland/workspaces" + ], + + "modules-center": [], + + "modules-right": ["idle_inhibitor", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"], + + "hyprland/window": { + "format": "{}" + }, + + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "disk": { + "interval": 30, + "format": "Free: {percentage_free}% ({free})", + "path": "/", + "unit": "GB" + }, + + "hyprland/workspaces": { + "on-scroll-up": "hyprctl dispatch workspace m+1", + "on-scroll-down": "hyprctl dispatch workspace m-1", + "all-outputs": false, + "on-click": "activate", + "format": "{icon}", + "format-icons": { + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "10": "10" + } + }, + "cpu": { + "format": " {usage}%" + }, + "memory": { + "format": " {}%" + }, + + "tray": { + "icon-size": 16, + "tooltip": false, + "spacing": 10 + }, + + "clock": { + "tooltip-format": "{calendar}", + "format": "{:%a %d.%m %H:%M:%S}", + "interval": 1 + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": "󰝟", + "format-icons": { + "headphone": "", + "default": ["", "", ""] + }, + "scroll-step": 5.0, + "max-volume": 200, + "on-click": "pulseaudio-popup", + "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + }, + + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}% ({time})", + "format-charging": " {capacity}% ({time})", + "format-plugged": " {capacity}% ({time})", + "format-full": "{icon} ", + "format-icons": ["", "", "", "", ""] + } +} diff --git a/modules/home/hyprland/waybar/config.jsonc b/modules/home/hyprland/waybar/config.jsonc deleted file mode 100644 index e018a75..0000000 --- a/modules/home/hyprland/waybar/config.jsonc +++ /dev/null @@ -1,80 +0,0 @@ -{ - "layer": "top", - "position": "top", - "mod": "dock", - "exclusive": true, - "passtrough": false, - "gtk-layer-shell": true, - "height": 32, - - "modules-left": [ - "hyprland/workspaces" - ], - - "modules-center": [], - - "modules-right": [ - "tray", - "network", - "battery", - "clock" - ], - - "hyprland/window": { - "format": "{}" - }, - - "hyprland/workspaces": { - "on-scroll-up": "hyprctl dispatch workspace e+1", - "on-scroll-down": "hyprctl dispatch workspace e-1", - "all-outputs": true, - "on-click": "activate", - "format": "{icon}", - "format-icons": { - "1": "1", - "2": "2", - "3": "3", - "4": "4", - "5": "5", - "6": "6", - "7": "7", - "8": "8", - "9": "9", - "10": "10" - } - }, - - "tray": { - "icon-size": 12, - "tooltip": false, - "spacing": 10 - }, - - "clock": { - "format": "{:%H:%M}", - }, - - "pulseaudio": { - "format": " {volume}%", - "tooltip": false, - "format-muted": " N/A", - "on-click": "pavucontrol &", - "scroll-step": 5 - }, - - "network": { - "format-wifi": " {essid} {signalStrength}%", - "format-ethernet": "󰈀", - "format-disconnected": "󰈂" - }, - - "battery": { - "states": { - "warning": 20, - "critical": 15 - }, - "format": "󰁹 {capacity}%", - "format-charging": "󰂄 {capacity}%", - "format-plugged": "󰂄 {capacity}%" - } -} diff --git a/modules/home/hyprland/waybar/default.nix b/modules/home/hyprland/waybar/default.nix index 53fda50..c151ff6 100644 --- a/modules/home/hyprland/waybar/default.nix +++ b/modules/home/hyprland/waybar/default.nix @@ -23,20 +23,12 @@ in programs.waybar = { enable = true; systemd.enable = true; - }; - - xdg.configFile."waybar/config.jsonc" = { - source = ./config.jsonc; - onChange = '' - ${pkgs.busybox}/bin/pkill -SIGUSR2 waybar - ''; - }; - xdg.configFile."waybar/style.css" = { - text = '' + settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json); + style = '' * { /* `otf-font-awesome` is required to be installed for icons */ font-family: JetBrainsMono Nerd Font; - font-size: 13px; + font-size: 14px; border-radius: 17px; } @@ -53,6 +45,8 @@ in #custom-spotify, #pulseaudio, #window, + #idle_inhibitor, + #cpu, #tray { padding: 5 15px; border-radius: 12px; @@ -188,7 +182,11 @@ in #tray menu { background-color: #${palette.base00}; - opacity: 0.8; + opacity: 1.0; + } + + #battery.warning { + color: #${palette.base08}; } #pulseaudio.muted { @@ -220,9 +218,6 @@ in border-radius: 17px; } ''; - onChange = '' - ${pkgs.busybox}/bin/pkill -SIGUSR2 waybar - ''; }; }; } diff --git a/packages/pulseaudio-popup/default.nix b/packages/pulseaudio-popup/default.nix index 3e3508f..896ccf0 100644 --- a/packages/pulseaudio-popup/default.nix +++ b/packages/pulseaudio-popup/default.nix @@ -21,6 +21,9 @@ pkgs.writeShellApplication { pulseaudio ]; + # Do not insert e.g. pipefail + bashOptions = [ ]; + text = '' HDMI_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink" LAPTOP_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink" diff --git a/systems/x86_64-linux/aspi/default.nix b/systems/x86_64-linux/aspi/default.nix index e989765..f474217 100644 --- a/systems/x86_64-linux/aspi/default.nix +++ b/systems/x86_64-linux/aspi/default.nix @@ -278,6 +278,7 @@ mc xorg.xhost kdePackages.qtwayland + pavucontrol frajul.pulseaudio-popup gparted-xhost # needs to be installed as system package so it can be actually opened ];