From 0dbb31bad96a6ab09ba18c8979d9e01ee0d618ef Mon Sep 17 00:00:00 2001 From: KP64 Date: Tue, 24 Dec 2024 14:30:36 +0100 Subject: [PATCH] chore: Update hyprpanel --- desktop/hypr/hyprpanel.nix | 253 ++++++++++++++++++------------------- flake.lock | 110 +++++++++++----- 2 files changed, 202 insertions(+), 161 deletions(-) diff --git a/desktop/hypr/hyprpanel.nix b/desktop/hypr/hyprpanel.nix index abb159d..9db00b6 100644 --- a/desktop/hypr/hyprpanel.nix +++ b/desktop/hypr/hyprpanel.nix @@ -18,7 +18,7 @@ let foreground = "#${colors.base05}"; hyprpanel-reload = pkgs.writers.writeBashBin "hyprpanel-reload" '' - [ $(pgrep "ags") ] && pkill ags + [ $(pgrep "hyprpanel") ] && pkill hyprpanel hyprctl dispatch exec hyprpanel ''; in @@ -28,142 +28,141 @@ in config = lib.mkIf cfg.enable { home-manager.users.${username} = { wayland.windowManager.hyprland.settings.exec-once = [ "hyprpanel" ]; - home = { - packages = [ - inputs.hyprpanel.packages.${pkgs.system}.default - hyprpanel-reload - ]; - # TODO: Right now weather Key doesn't work with sops-nix. - # Wait for Hyprpanel to provide support i.e. an option that expect a path. - file.".cache/ags/hyprpanel/options.json".text = - let - stylixOnly = lib.optionalString config.isStylixEnabled '' - "theme.bar.transparent": true, + home.packages = [ + inputs.hyprpanel.packages.${pkgs.system}.default + hyprpanel-reload + ]; - "theme.bar.buttons.workspaces.hover": "${accent-alt}", - "theme.bar.buttons.workspaces.active": "${accent}", - "theme.bar.buttons.workspaces.available": "${accent-alt}", - "theme.bar.buttons.workspaces.occupied": "${accent}", + # TODO: Right now weather Key doesn't work with sops-nix. + # Wait for Hyprpanel to provide support i.e. an option that expect a path. + xdg.configFile."hyprpanel/config.json".text = + let + stylixOnly = lib.optionalString config.isStylixEnabled '' + "theme.bar.transparent": true, - "theme.bar.menus.monochrome": true, - "theme.bar.menus.background": "${background}", - "theme.bar.menus.cards": "${background-alt}", - "theme.bar.menus.label": "${foreground}", - "theme.bar.menus.text": "${foreground}", - "theme.bar.menus.border.color": "${accent}", - "theme.bar.menus.popover.text": "${foreground}", - "theme.bar.menus.popover.background": "${background-alt}", - "theme.bar.menus.listitems.active": "${accent}", - "theme.bar.menus.icons.active": "${accent}", - "theme.bar.menus.switch.enabled":"${accent}", - "theme.bar.menus.check_radio_button.active": "${accent}", - "theme.bar.menus.buttons.default": "${accent}", - "theme.bar.menus.buttons.active": "${accent}", - "theme.bar.menus.iconbuttons.active": "${accent}", - "theme.bar.menus.progressbar.foreground": "${accent}", - "theme.bar.menus.slider.primary": "${accent}", - "theme.bar.menus.tooltip.background": "${background-alt}", - "theme.bar.menus.tooltip.text": "${foreground}", - "theme.bar.menus.dropdownmenu.background":"${background-alt}", - "theme.bar.menus.dropdownmenu.text": "${foreground}", - "theme.bar.buttons.style": "default", - "theme.bar.buttons.monochrome": true, - "theme.bar.buttons.text": "${foreground}", - "theme.bar.buttons.icon": "${accent}", - "theme.bar.buttons.notifications.background": "${background-alt}", - "theme.bar.buttons.hover": "${background}", - "theme.bar.buttons.notifications.hover": "${background}", - "theme.bar.buttons.notifications.total": "${accent}", - "theme.bar.buttons.notifications.icon": "${accent}", - "theme.notification.background": "${background-alt}", - "theme.notification.actions.background": "${accent}", - "theme.notification.actions.text": "${foreground}", - "theme.notification.label": "${accent}", - "theme.notification.border": "${background-alt}", - "theme.notification.text": "${foreground}", - "theme.notification.labelicon": "${accent}", - "theme.osd.bar_color": "${accent}", - "theme.osd.bar_overflow_color": "${accent-alt}", - "theme.osd.icon": "${background}", - "theme.osd.icon_container": "${accent}", - "theme.osd.label": "${accent}", - "theme.osd.bar_container": "${background-alt}", - "theme.bar.menus.menu.media.background.color": "${background-alt}", - "theme.bar.menus.menu.media.card.color": "${background-alt}", - "theme.bar.menus.menu.media.card.tint": 90, - ''; - in - '' - { - ${stylixOnly} + "theme.bar.buttons.workspaces.hover": "${accent-alt}", + "theme.bar.buttons.workspaces.active": "${accent}", + "theme.bar.buttons.workspaces.available": "${accent-alt}", + "theme.bar.buttons.workspaces.occupied": "${accent}", - "wallpaper.enable": false, - "hyprpanel.restartCommand": "hyprpanel -q; hyprpanel", + "theme.bar.menus.monochrome": true, + "theme.bar.menus.background": "${background}", + "theme.bar.menus.cards": "${background-alt}", + "theme.bar.menus.label": "${foreground}", + "theme.bar.menus.text": "${foreground}", + "theme.bar.menus.border.color": "${accent}", + "theme.bar.menus.popover.text": "${foreground}", + "theme.bar.menus.popover.background": "${background-alt}", + "theme.bar.menus.listitems.active": "${accent}", + "theme.bar.menus.icons.active": "${accent}", + "theme.bar.menus.switch.enabled":"${accent}", + "theme.bar.menus.check_radio_button.active": "${accent}", + "theme.bar.menus.buttons.default": "${accent}", + "theme.bar.menus.buttons.active": "${accent}", + "theme.bar.menus.iconbuttons.active": "${accent}", + "theme.bar.menus.progressbar.foreground": "${accent}", + "theme.bar.menus.slider.primary": "${accent}", + "theme.bar.menus.tooltip.background": "${background-alt}", + "theme.bar.menus.tooltip.text": "${foreground}", + "theme.bar.menus.dropdownmenu.background":"${background-alt}", + "theme.bar.menus.dropdownmenu.text": "${foreground}", + "theme.bar.buttons.style": "default", + "theme.bar.buttons.monochrome": true, + "theme.bar.buttons.text": "${foreground}", + "theme.bar.buttons.icon": "${accent}", + "theme.bar.buttons.notifications.background": "${background-alt}", + "theme.bar.buttons.hover": "${background}", + "theme.bar.buttons.notifications.hover": "${background}", + "theme.bar.buttons.notifications.total": "${accent}", + "theme.bar.buttons.notifications.icon": "${accent}", + "theme.notification.background": "${background-alt}", + "theme.notification.actions.background": "${accent}", + "theme.notification.actions.text": "${foreground}", + "theme.notification.label": "${accent}", + "theme.notification.border": "${background-alt}", + "theme.notification.text": "${foreground}", + "theme.notification.labelicon": "${accent}", + "theme.osd.bar_color": "${accent}", + "theme.osd.bar_overflow_color": "${accent-alt}", + "theme.osd.icon": "${background}", + "theme.osd.icon_container": "${accent}", + "theme.osd.label": "${accent}", + "theme.osd.bar_container": "${background-alt}", + "theme.bar.menus.menu.media.background.color": "${background-alt}", + "theme.bar.menus.menu.media.card.color": "${background-alt}", + "theme.bar.menus.menu.media.card.tint": 90, + ''; + in + '' + { + ${stylixOnly} - "bar.media.show_active_only": true, - "bar.customModules.updates.pollingInterval": 1440000, - "bar.windowtitle.label": false, - "bar.launcher.icon": "", - "bar.layouts": { - "*": { - "left": [ - "dashboard", - "workspaces" - ], - "middle": [ "media" ], - "right": [ - "network", - "volume", - "bluetooth", - "systray", - "clock", - "hyprsunset", - "notifications" - ] - } - }, + "wallpaper.enable": false, + "hyprpanel.restartCommand": "hyprpanel -q; hyprpanel", - "bar.workspaces.show_numbered": true, - "bar.workspaces.workspaces": ${toString config.maxWorkspaceCount}, - "bar.workspaces.monitorSpecific": true, + "bar.media.show_active_only": true, + "bar.customModules.updates.pollingInterval": 1440000, + "bar.windowtitle.label": false, + "bar.launcher.icon": "", + "bar.layouts": { + "*": { + "left": [ + "dashboard", + "workspaces" + ], + "middle": [ "media" ], + "right": [ + "network", + "volume", + "bluetooth", + "systray", + "clock", + "hyprsunset", + "notifications" + ] + } + }, - "menus.clock.weather.location": "", - "menus.clock.weather.key": "", - "menus.clock.weather.unit": "metric", + "bar.workspaces.show_numbered": true, + "bar.workspaces.workspaces": ${toString config.maxWorkspaceCount}, + "bar.workspaces.monitorSpecific": true, - "menus.dashboard.shortcuts.left.shortcut1.icon": "", - "menus.dashboard.shortcuts.left.shortcut1.command": "firefox", - "menus.dashboard.shortcuts.left.shortcut1.tooltip": "Firefox", - "menus.dashboard.shortcuts.left.shortcut2.icon": "", - "menus.dashboard.shortcuts.left.shortcut2.command": "spotify", - "menus.dashboard.shortcuts.left.shortcut2.tooltip": "Spotify", - "menus.dashboard.shortcuts.left.shortcut3.icon": "", - "menus.dashboard.shortcuts.left.shortcut3.command": "vesktop", - "menus.dashboard.shortcuts.left.shortcut3.tooltip": "Vesktop", + "menus.clock.weather.location": "", + "menus.clock.weather.key": "", + "menus.clock.weather.unit": "metric", - "menus.dashboard.shortcuts.right.shortcut1.icon": "", - "menus.dashboard.shortcuts.right.shortcut1.command": "hyprpicker -a", - "menus.dashboard.shortcuts.right.shortcut1.tooltip": "Color Picker", - "menus.dashboard.shortcuts.right.shortcut3.icon": "󰄀", - "menus.dashboard.shortcuts.right.shortcut3.command": "grimblast --freeze --notify copysave area", - "menus.dashboard.shortcuts.right.shortcut3.tooltip": "Screenshot", + "menus.dashboard.shortcuts.left.shortcut1.icon": "", + "menus.dashboard.shortcuts.left.shortcut1.command": "firefox", + "menus.dashboard.shortcuts.left.shortcut1.tooltip": "Firefox", + "menus.dashboard.shortcuts.left.shortcut2.icon": "", + "menus.dashboard.shortcuts.left.shortcut2.command": "spotify", + "menus.dashboard.shortcuts.left.shortcut2.tooltip": "Spotify", + "menus.dashboard.shortcuts.left.shortcut3.icon": "", + "menus.dashboard.shortcuts.left.shortcut3.command": "vesktop", + "menus.dashboard.shortcuts.left.shortcut3.tooltip": "Vesktop", - "menus.dashboard.directories.left.directory1.label": "󰉍 Downloads", - "menus.dashboard.directories.left.directory1.command": "bash -c \"thunar $HOME/Downloads/\"", - "menus.dashboard.directories.left.directory2.label": "󰉏 Pictures", - "menus.dashboard.directories.left.directory2.command": "bash -c \"thunar $HOME/Pictures/\"", - "menus.dashboard.directories.left.directory3.label": "󱧶 Documents", - "menus.dashboard.directories.left.directory3.command": "bash -c \"thunar $HOME/Documents/\"", - "menus.dashboard.directories.right.directory1.label": "󱂵 Home", - "menus.dashboard.directories.right.directory1.command": "bash -c \"thunar $HOME/\"", - "menus.dashboard.directories.right.directory2.label": "󰚝 Projects", - "menus.dashboard.directories.right.directory2.command": "bash -c \"thunar $HOME/dev/\"", - "menus.dashboard.directories.right.directory3.label": " Config", - "menus.dashboard.directories.right.directory3.command": "bash -c \"thunar $HOME/.config/\"" - } - ''; - }; + "menus.dashboard.shortcuts.right.shortcut1.icon": "", + "menus.dashboard.shortcuts.right.shortcut1.command": "hyprpicker -a", + "menus.dashboard.shortcuts.right.shortcut1.tooltip": "Color Picker", + "menus.dashboard.shortcuts.right.shortcut3.icon": "󰄀", + "menus.dashboard.shortcuts.right.shortcut3.command": "grimblast --freeze --notify copysave area", + "menus.dashboard.shortcuts.right.shortcut3.tooltip": "Screenshot", + + "menus.dashboard.directories.left.directory1.label": "󰉍 Downloads", + "menus.dashboard.directories.left.directory1.command": "bash -c \"thunar $HOME/Downloads/\"", + "menus.dashboard.directories.left.directory2.label": "󰉏 Pictures", + "menus.dashboard.directories.left.directory2.command": "bash -c \"thunar $HOME/Pictures/\"", + "menus.dashboard.directories.left.directory3.label": "󱧶 Documents", + "menus.dashboard.directories.left.directory3.command": "bash -c \"thunar $HOME/Documents/\"", + "menus.dashboard.directories.right.directory1.label": "󱂵 Home", + "menus.dashboard.directories.right.directory1.command": "bash -c \"thunar $HOME/\"", + "menus.dashboard.directories.right.directory2.label": "󰚝 Projects", + "menus.dashboard.directories.right.directory2.command": "bash -c \"thunar $HOME/dev/\"", + "menus.dashboard.directories.right.directory3.label": " Config", + "menus.dashboard.directories.right.directory3.command": "bash -c \"thunar $HOME/.config/\"" + } + ''; }; }; } diff --git a/flake.lock b/flake.lock index f250581..151d09b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,19 +2,19 @@ "nodes": { "ags": { "inputs": { - "nixpkgs": "nixpkgs_2", - "systems": "systems_2" + "astal": "astal", + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1728326430, - "narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=", - "owner": "Aylur", + "lastModified": 1734091628, + "narHash": "sha256-8O3i8zESjHVsGzyXb8gEpLztvANq3Ot5bwo60YKJc7k=", + "owner": "aylur", "repo": "ags", - "rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d", + "rev": "27cd93147aba09142fa585fd16f13c56268b696c", "type": "github" }, "original": { - "owner": "Aylur", + "owner": "aylur", "repo": "ags", "type": "github" } @@ -52,6 +52,46 @@ "type": "github" } }, + "astal": { + "inputs": { + "nixpkgs": [ + "hyprpanel", + "ags", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733520119, + "narHash": "sha256-6K07ZJTnFu1xASBCMtVc9cFTbBEauwSc7gGBmjLkLSk=", + "owner": "aylur", + "repo": "astal", + "rev": "4c19d8d06fa25cc6389f37abe8839b4d8be5c0d6", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, + "astal_2": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1734814417, + "narHash": "sha256-R+tLGIxlaqsOmV52TdXHP0u33q5PdJ77gtiUPK5BbMg=", + "owner": "aylur", + "repo": "astal", + "rev": "3468763d51d389c67ec7b1a390ffa8a5328bddb6", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -815,16 +855,17 @@ "hyprpanel": { "inputs": { "ags": "ags", + "astal": "astal_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1733062031, - "narHash": "sha256-cPm3IukRcKZqTgmjL9kh3ZYGoXBD8elaTQ3TFo+W67Q=", + "lastModified": 1735039971, + "narHash": "sha256-FHmOmCkOidAghxIhzx+tVHUbEARoFsRBupfcHK4f9do=", "owner": "Jas-SinghFSU", "repo": "HyprPanel", - "rev": "955eed6c60a3ea5d6b0b1b8b7086cffbae984277", + "rev": "65140db40cdd09ac492dbd2ad6d584e372311b01", "type": "github" }, "original": { @@ -1557,21 +1598,37 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1725634671, - "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", - "owner": "NixOS", + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_3": { + "locked": { + "lastModified": 1734424634, + "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1733759999, "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", @@ -1587,7 +1644,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1728193676, "narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=", @@ -1725,7 +1782,7 @@ "inputs": { "libcamera-src": "libcamera-src", "libpisp-src": "libpisp-src", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "rpi-bluez-firmware-src": "rpi-bluez-firmware-src", "rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src", "rpi-firmware-src": "rpi-firmware-src", @@ -1784,7 +1841,7 @@ "nix-vscode-extensions": "nix-vscode-extensions", "nixcord": "nixcord", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable_3", "nur": "nur", "potato-fox": "potato-fox", @@ -1792,7 +1849,7 @@ "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", "stylix": "stylix", - "systems": "systems_3", + "systems": "systems_2", "treefmt-nix": "treefmt-nix" } }, @@ -2018,21 +2075,6 @@ } }, "systems_2": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",