From ec20e5b30ea3d7f18fe21be3506988b5583dc214 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Thu, 22 Aug 2024 10:49:52 -0500 Subject: [PATCH] hyprland drawer changes and updates --- .gitignore | 3 +- flake.lock | 54 +++++++++---------- hosts/desktop/hyprland/config.nix | 2 + .../desktop/hyprland/config/hypr/default.nix | 19 ++++--- .../hyprland/config/nwg-drawer/drawer.css | 34 ++++++++++++ .../hyprland/config/nwg-panel/excluded-dirs | 0 .../config/nwg-panel/preferred-apps.json | 8 +++ .../desktop/hyprland/config/wofi/default.nix | 2 +- hosts/desktop/hyprland/environment.nix | 2 +- result | 1 - 10 files changed, 86 insertions(+), 39 deletions(-) create mode 100644 hosts/desktop/hyprland/config/nwg-drawer/drawer.css create mode 100644 hosts/desktop/hyprland/config/nwg-panel/excluded-dirs create mode 100644 hosts/desktop/hyprland/config/nwg-panel/preferred-apps.json delete mode 120000 result diff --git a/.gitignore b/.gitignore index 9d369fd..85d7596 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ hosts/nas/*.conf -hosts/nas/*.users \ No newline at end of file +hosts/nas/*.users +result \ No newline at end of file diff --git a/flake.lock b/flake.lock index 4f78839..539a241 100644 --- a/flake.lock +++ b/flake.lock @@ -53,11 +53,11 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1724179929, - "narHash": "sha256-71OTuLbwQ7f9tYn2gOikv2+wA8snkBA2+ozqS9BfptI=", + "lastModified": 1724260845, + "narHash": "sha256-ufNcCna8sact/lkKNWNl8HwNMrKq42KN+izK/vPvxhk=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "a1a11c4bcc8df500b3e11857d02f457b67342779", + "rev": "62ad1fce12be4bca6133c14a376cb36a3323fc85", "type": "github" }, "original": { @@ -89,11 +89,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1724118408, - "narHash": "sha256-nSKfqpr8RZDWkWi0FfvVrabOmnryVxYDayMa3Hz847c=", + "lastModified": 1724290496, + "narHash": "sha256-tiXzvSFSBwAC2HtbBDePZWs112K9dynlfQOHzU7XyHE=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "04a0f18cf0a4f1499d8abec419bd92e87cb05157", + "rev": "0175cd90ce3ee1a8fd30a30354be105f82688f66", "type": "github" }, "original": { @@ -173,11 +173,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1724135364, - "narHash": "sha256-DuPnJXOeigXK8xQdP6BBc6MqJ9p4TzvNUqSrB2P1GQ4=", + "lastModified": 1724221791, + "narHash": "sha256-mKX67QPnUybOopVph/LhOV1G/H4EvPxDIfSmbufrVdA=", "owner": "nix-community", "repo": "fenix", - "rev": "b6a1c29a8f460af63f66cad2b5acf3b78867603e", + "rev": "e88b38a5a3834e039d413a88f8150a75ef6453ef", "type": "github" }, "original": { @@ -559,11 +559,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1723859949, - "narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=", + "lastModified": 1724299755, + "narHash": "sha256-P5zMA17kD9tqiqMuNXwupkM7buM3gMNtoZ1VuJTRDE4=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "076b9a905af8a52b866c8db068d6da475839d97b", + "rev": "a8968d88e5a537b0491f68ce910749cd870bdbef", "type": "github" }, "original": { @@ -703,11 +703,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1723938990, - "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=", + "lastModified": 1724098845, + "narHash": "sha256-D5HwjQw/02fuXbR4LCTo64koglP2j99hkDR79/3yLOE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890", + "rev": "f1bad50880bae73ff2d82fafc22010b4fc097a9c", "type": "github" }, "original": { @@ -735,11 +735,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1723938990, - "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=", + "lastModified": 1724242322, + "narHash": "sha256-HMpK7hNjhEk4z5SFg5UtxEio9OWFocHdaQzCfW1pE7w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890", + "rev": "224042e9a3039291f22f4f2ded12af95a616cca0", "type": "github" }, "original": { @@ -767,11 +767,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1723991338, - "narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a3354191c0d7144db9756a74755672387b702ba", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", "type": "github" }, "original": { @@ -1035,11 +1035,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1724088625, - "narHash": "sha256-vgSBWgUKRyT0ZRZYj43GZkZzPEKgNodCuX/uofqlPsc=", + "lastModified": 1724153119, + "narHash": "sha256-WxpvDJDttkINkXmUA/W5o11lwLPYhATAgu0QUAacZ2g=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "979e3b54f70f6f231c117a5d628b98106e5c7d31", + "rev": "3723e5910c14f0ffbd13de474b8a8fcc74db04ce", "type": "github" }, "original": { @@ -1057,11 +1057,11 @@ ] }, "locked": { - "lastModified": 1724034091, - "narHash": "sha256-b1g7w0sw+MDAhUAeCoX1vlTghsqcDZkxr+k9OZmxPa8=", + "lastModified": 1724206841, + "narHash": "sha256-L8dKaX4T3k+TR2fEHCfGbH4UXdspovz/pj87iai9qmc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "c7d36e0947826e0751a5214ffe82533fbc909bc0", + "rev": "45e98fbd62c32e5927e952d2833fa1ba4fb35a61", "type": "github" }, "original": { diff --git a/hosts/desktop/hyprland/config.nix b/hosts/desktop/hyprland/config.nix index b82c19f..ba441bf 100644 --- a/hosts/desktop/hyprland/config.nix +++ b/hosts/desktop/hyprland/config.nix @@ -7,5 +7,7 @@ in ".config/wlogout".source = "${configDir}/wlogout"; # ".config/waybar/scripts".source = "${configDir}/waybar/scripts"; ".config/btop/themes/catppuccin_macchiato.theme".source = "${configDir}/btop/themes/catppuccin_macchiato.theme"; + ".config/nwg-drawer".source = "${configDir}/nwg-drawer"; + ".config/nwg-panel".source = "${configDir}/nwg-panel"; }; } diff --git a/hosts/desktop/hyprland/config/hypr/default.nix b/hosts/desktop/hyprland/config/hypr/default.nix index ccf28e1..17bf0b0 100644 --- a/hosts/desktop/hyprland/config/hypr/default.nix +++ b/hosts/desktop/hyprland/config/hypr/default.nix @@ -34,7 +34,7 @@ "$mod, M, exec, wlogout --protocol layer-shell" "$mod, E, exec, nautilus" "$mod, V, togglefloating, " - "$mod, D, exec, wofi --show drun" + "$mod, D, exec, nwg-drawer -fm nautilus -term kitty" "$mod, P, pseudo, "# dwindle "$mod, S, togglesplit, "# dwindle "$mod SHIFT, Q, exec, hyprlock" @@ -89,6 +89,8 @@ # Move/resize windows with mod + LMB/RMB and dragging "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" + # middle mouse will grab a window, mod + middle mouse will close it + ", mouse:274, movewindow" ]; bindel =[ @@ -165,8 +167,9 @@ }; workspace = [ - "name: discord, monitor:DP-2, default:true" - "name: steam, monitor:DP-2, default:false" + "name:firefox, monitor:DP-2, default:false, special, firefox" + "name:discord, monitor:DP-2, default:true, special, vesktop, spotify" + "name:steam, monitor:DP-2, default:false, special, steam" ]; windowrule = [ @@ -228,12 +231,12 @@ # Code # "pin, class:^(code)$,title:^(Save As)$" "float, class:^(code)$,title:^(Save As)$" + "float, class:^(xdg-desktop-portal-gtk)$,title:^(Open Workspace from File)$" # Game Tearing??? https://wiki.hyprland.org/Configuring/Tearing/ "immediate, class:gamescope" ]; - input = { kb_layout = "us"; @@ -259,10 +262,10 @@ exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = nwg-look -a - exec-once = [workspace name:discord silent] firefox - exec-once = [workspace name:discord silent] vesktop - exec-once = [workspace name:discord silent] spotify - exec-once = [workspace name:steam silent] steam + exec-once = [silent] firefox + exec-once = [silent] vesktop + exec-once = [silent] spotify + exec-once = [silent] steam ''; }; } \ No newline at end of file diff --git a/hosts/desktop/hyprland/config/nwg-drawer/drawer.css b/hosts/desktop/hyprland/config/nwg-drawer/drawer.css new file mode 100644 index 0000000..a893075 --- /dev/null +++ b/hosts/desktop/hyprland/config/nwg-drawer/drawer.css @@ -0,0 +1,34 @@ +window { + background-color: rgba (36, 47, 79, 0.95); + color: #eeeeee +} + +/* search entry */ +entry { + background-color: rgba (0, 0, 0, 0.2) +} + +button, image { + background: none; + border: none +} + +button:hover { + background-color: rgba (255, 255, 255, 0.1) +} + +/* in case you wanted to give category buttons a different look */ +#category-button { + margin: 0 10px 0 10px +} + +#pinned-box { + padding-bottom: 5px; + border-bottom: 1px dotted gray +} + +#files-box { + padding: 5px; + border: 1px dotted gray; + border-radius: 15px +} \ No newline at end of file diff --git a/hosts/desktop/hyprland/config/nwg-panel/excluded-dirs b/hosts/desktop/hyprland/config/nwg-panel/excluded-dirs new file mode 100644 index 0000000..e69de29 diff --git a/hosts/desktop/hyprland/config/nwg-panel/preferred-apps.json b/hosts/desktop/hyprland/config/nwg-panel/preferred-apps.json new file mode 100644 index 0000000..224a65e --- /dev/null +++ b/hosts/desktop/hyprland/config/nwg-panel/preferred-apps.json @@ -0,0 +1,8 @@ +{ + "\\.pdf$": "firefox", + "\\.svg$": "inkscape", + "\\.(jpg|png|tiff|gif)$": "swayimg", + "\\.(mp3|ogg|flac|wav|wma)$": "audacious", + "\\.(avi|mp4|mkv|mov|wav)$": "mpv", + "\\.(doc|docx|xls|xlsx)$": "libreoffice" +} \ No newline at end of file diff --git a/hosts/desktop/hyprland/config/wofi/default.nix b/hosts/desktop/hyprland/config/wofi/default.nix index aca11bb..08abc1b 100644 --- a/hosts/desktop/hyprland/config/wofi/default.nix +++ b/hosts/desktop/hyprland/config/wofi/default.nix @@ -1,6 +1,6 @@ { programs.wofi = { - enable = true; + enable = false; style = '' @define-color rosewater #f4dbd6; @define-color rosewater-rgb rgb(244, 219, 214); diff --git a/hosts/desktop/hyprland/environment.nix b/hosts/desktop/hyprland/environment.nix index eeda520..457acd7 100644 --- a/hosts/desktop/hyprland/environment.nix +++ b/hosts/desktop/hyprland/environment.nix @@ -33,6 +33,7 @@ in meson nautilus networkmanagerapplet + nwg-drawer nwg-look pamixer papirus-folders @@ -52,7 +53,6 @@ in wl-clipboard wlogout wlroots - wofi xdg-desktop-portal-hyprland xdg-desktop-portal-gtk xdg-desktop-portal-wlr diff --git a/result b/result deleted file mode 120000 index fba7efa..0000000 --- a/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/9sz0d13mzbbi4ri2ndl5sjpnjhs1k6bv-darwin-installer \ No newline at end of file