From 19ee044f299155c36f66f10e7b8fd4ec44b8851f Mon Sep 17 00:00:00 2001 From: Krosh Date: Sat, 22 Nov 2025 04:15:29 +0300 Subject: [PATCH] add hyprpanel config --- home-manager/flake.lock | 12 +- home-manager/modules/hypr/hypr.nix | 14 +-- home-manager/modules/hypr/hypridle.nix | 5 +- .../modules/hypr/hyprland/keybinds.nix | 2 +- home-manager/modules/hypr/hyprpanel.json | 116 ++++++++++++++++++ 5 files changed, 132 insertions(+), 17 deletions(-) create mode 100644 home-manager/modules/hypr/hyprpanel.json diff --git a/home-manager/flake.lock b/home-manager/flake.lock index 10bd312..b00cc73 100644 --- a/home-manager/flake.lock +++ b/home-manager/flake.lock @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1763334038, - "narHash": "sha256-LBVOyaH6NFzQ3X/c6vfMZ9k4SV2ofhpxeL9YnhHNJQQ=", + "lastModified": 1763622513, + "narHash": "sha256-1jQnuyu82FpiSxowrF/iFK6Toh9BYprfDqfs4BB+19M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4c8cdd5b1a630e8f72c9dd9bf582b1afb3127d2c", + "rev": "c58bc7f5459328e4afac201c5c4feb7c818d604b", "type": "github" }, "original": { @@ -54,11 +54,11 @@ ] }, "locked": { - "lastModified": 1763521945, - "narHash": "sha256-Zcrafbe4niRJMbzaVOwg7+iedJhwBFttre2DpyCC6qA=", + "lastModified": 1763663426, + "narHash": "sha256-txr1cH5j+b14jYGvE0BQE/6OgSyHQqGoeeEFlJz7Q8o=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "24d7381b9231c23daceec5d372cc28e877f7785d", + "rev": "34fd0de7cea96cab0307cf07aa5723b60fd775ef", "type": "github" }, "original": { diff --git a/home-manager/modules/hypr/hypr.nix b/home-manager/modules/hypr/hypr.nix index 85dc9cc..77c460a 100644 --- a/home-manager/modules/hypr/hypr.nix +++ b/home-manager/modules/hypr/hypr.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: # TODO: # - configure comands like hyprpaper, waybar, etc. @@ -27,10 +27,15 @@ ]; programs.hyprpanel = { enable = true; - systemd.enable = true; + settings = builtins.fromJSON (builtins.readFile ./hyprpanel.json); }; programs.fuzzel.enable = true; + home.file.".config/hypr/scripts" = { + source = ./scripts; + recursive = true; + }; + wayland.windowManager.hyprland = { enable = true; plugins = [ pkgs.hyprlandPlugins.hyprexpo ]; @@ -216,9 +221,4 @@ }; }; - home.file.".config/hypr/scripts" = { - source = ./scripts; - recursive = true; - }; - } diff --git a/home-manager/modules/hypr/hypridle.nix b/home-manager/modules/hypr/hypridle.nix index 06344f8..cb00e94 100644 --- a/home-manager/modules/hypr/hypridle.nix +++ b/home-manager/modules/hypr/hypridle.nix @@ -10,7 +10,6 @@ general = { lock_cmd = lock_cmd; before_sleep_cmd = "loginctl lock-session"; - after_sleep_cmd = "hyprctl dispatch global quickshell:lockFocus"; inhibit_sleep = 3; }; @@ -21,8 +20,8 @@ } { timeout = 600; # 10 mins - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; + # on-timeout = "hyprctl dispatch dpms off"; + # on-resume = "hyprctl dispatch dpms on"; } { timeout = 900; # 15 mins diff --git a/home-manager/modules/hypr/hyprland/keybinds.nix b/home-manager/modules/hypr/hyprland/keybinds.nix index e9c34a7..0414c30 100644 --- a/home-manager/modules/hypr/hyprland/keybinds.nix +++ b/home-manager/modules/hypr/hyprland/keybinds.nix @@ -57,7 +57,7 @@ '' ${super}, Return, exec, ~/.config/hypr/scripts/launch_first_available.sh "kitty" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm"'' - "${super}, T, exec, Telegram" + "${super}, T, exec, telegram-desktop" '' ${super}, E, exec, ~/.config/hypr/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" "kitty -1 fish -c yazi"'' '' diff --git a/home-manager/modules/hypr/hyprpanel.json b/home-manager/modules/hypr/hyprpanel.json new file mode 100644 index 0000000..52ec653 --- /dev/null +++ b/home-manager/modules/hypr/hyprpanel.json @@ -0,0 +1,116 @@ +{ + "bar.customModules.storage.paths": [ + "/" + ], + "theme.font.size": "1.0rem", + "theme.font.weight": 300, + "theme.bar.floating": false, + "menus.transition": "crossfade", + "theme.bar.menus.enableShadow": false, + "scalingPriority": "both", + "bar.autoHide": "never", + "theme.bar.buttons.enableBorders": false, + "bar.launcher.autoDetectIcon": true, + "theme.bar.buttons.dashboard.enableBorder": false, + "bar.workspaces.show_icons": false, + "bar.workspaces.monitorSpecific": false, + "bar.workspaces.show_numbered": false, + "bar.workspaces.showWsIcons": true, + "bar.workspaces.showApplicationIcons": true, + "bar.workspaces.showAllActive": true, + "bar.workspaces.numbered_active_indicator": "highlight", + "bar.workspaces.spacing": 1.5, + "bar.volume.scrollUp": "hyprpanel vol -5", + "bar.volume.scrollDown": "hyprpanel vol +5", + "bar.network.showWifiInfo": true, + "bar.network.truncation_size": 13, + "bar.network.label": false, + "bar.bluetooth.label": false, + "theme.bar.buttons.systray.enableBorder": false, + "menus.clock.time.military": true, + "menus.clock.time.hideSeconds": false, + "bar.clock.format": "%a %d %H:%M", + "bar.media.format": "\"{title}\" by {artist}", + "bar.media.show_active_only": true, + "bar.layouts": { + "0": { + "left": [ + "dashboard", + "workspaces", + "separator", + "windowtitle" + ], + "middle": [ + "media" + ], + "right": [ + "volume", + "network", + "bluetooth", + "battery", + "separator", + "systray", + "kbinput", + "clock", + "notifications" + ] + }, + "1": { + "left": [ + "dashboard", + "workspaces", + "windowtitle" + ], + "middle": [ + "media" + ], + "right": [ + "volume", + "clock", + "notifications" + ] + }, + "2": { + "left": [ + "dashboard", + "workspaces", + "windowtitle" + ], + "middle": [ + "media" + ], + "right": [ + "volume", + "clock", + "notifications" + ] + } + }, + "theme.bar.buttons.modules.kbLayout.enableBorder": true, + "theme.bar.transparent": true, + "theme.bar.buttons.background_opacity": 45, + "theme.bar.menus.opacity": 90, + "theme.matugen": false, + "wallpaper.pywal": true, + "wallpaper.image": "/home/krosh/Pictures/wallpaper.png", + "theme.bar.border.width": "0.15em", + "theme.bar.buttons.padding_x": "0.7rem", + "theme.bar.outer_spacing": "0.4em", + "theme.bar.buttons.radius": "0.6em", + "menus.dashboard.powermenu.avatar.image": "/home/krosh/Pictures/avatar.png", + "menus.dashboard.shortcuts.left.shortcut1.tooltip": "", + "menus.dashboard.shortcuts.left.shortcut1.command": "", + "menus.dashboard.shortcuts.left.shortcut1.icon": "", + "menus.dashboard.shortcuts.left.shortcut2.command": "spotify", + "menus.dashboard.shortcuts.left.shortcut3.icon": "", + "menus.dashboard.shortcuts.left.shortcut3.command": "", + "menus.dashboard.shortcuts.left.shortcut3.tooltip": "", + "menus.dashboard.shortcuts.left.shortcut4.command": "fuzzel", + "menus.dashboard.directories.left.directory3.command": "", + "menus.dashboard.directories.left.directory3.label": "", + "menus.dashboard.directories.left.directory2.command": "bash -c \"xdg-open $HOME/\"", + "menus.dashboard.directories.left.directory2.label": "󱂵 Home", + "menus.dashboard.directories.right.directory3.label": "", + "menus.dashboard.directories.right.directory3.command": "", + "menus.dashboard.directories.enabled": false +} \ No newline at end of file