From 6291136770ecda143f3ce92ce0654d1d01e26c8e Mon Sep 17 00:00:00 2001 From: William Date: Mon, 3 Feb 2025 18:08:06 -0300 Subject: [PATCH 1/6] this will eventually be the hyprland config. once hyprpanel has a vertical layout, imma bounce from plasma --- flake.lock | 66 ++++++++++ flake.nix | 6 + hosts/desktops/common/home-manager.nix | 4 +- hosts/desktops/common/packages.nix | 6 +- users/desktops/common/programs.nix | 165 +++++++++++++++++++++++++ 5 files changed, 244 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 1541b54..598fb4c 100644 --- a/flake.lock +++ b/flake.lock @@ -23,6 +23,50 @@ "type": "github" } }, + "ags": { + "inputs": { + "astal": "astal", + "nixpkgs": [ + "hyprpanel", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1736090999, + "narHash": "sha256-B5CJuHqfJrzPa7tObK0H9669/EClSHpa/P7B9EuvElU=", + "owner": "aylur", + "repo": "ags", + "rev": "5527c3c07d92c11e04e7fd99d58429493dba7e3c", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "ags", + "type": "github" + } + }, + "astal": { + "inputs": { + "nixpkgs": [ + "hyprpanel", + "ags", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735172721, + "narHash": "sha256-rtEAwGsHSppnkR3Qg3eRJ6Xh/F84IY9CrBBLzYabalY=", + "owner": "aylur", + "repo": "astal", + "rev": "6c84b64efc736e039a8a10774a4a1bf772c37aa2", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -418,6 +462,27 @@ "type": "github" } }, + "hyprpanel": { + "inputs": { + "ags": "ags", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737793455, + "narHash": "sha256-sVy0QU4fpZsUWj5B8t6jUNZHzVLC22+HYqcFG9pKPik=", + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", + "rev": "74065af3d2aa576e8b183d720033c3eece3deb70", + "type": "github" + }, + "original": { + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", + "type": "github" + } + }, "impermanence": { "locked": { "lastModified": 1737831083, @@ -582,6 +647,7 @@ "home-manager": "home-manager_2", "home-manager-stable": "home-manager-stable", "homepage": "homepage", + "hyprpanel": "hyprpanel", "impermanence": "impermanence", "nix-flatpak": "nix-flatpak", "nix-index-db": "nix-index-db", diff --git a/flake.nix b/flake.nix index 81e961a..1d1e861 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,10 @@ stylix.url = "github:danth/stylix"; + hyprpanel = { + url = "github:Jas-SinghFSU/HyprPanel"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -68,6 +72,7 @@ nix-minecraft, nixos-generators, stylix, + hyprpanel, ... }: { @@ -89,6 +94,7 @@ nixpkgs.overlays = [ agenix.overlays.default self.overlays.custom + hyprpanel.overlay ]; } ]; diff --git a/hosts/desktops/common/home-manager.nix b/hosts/desktops/common/home-manager.nix index 6e88ad7..f605806 100644 --- a/hosts/desktops/common/home-manager.nix +++ b/hosts/desktops/common/home-manager.nix @@ -5,6 +5,8 @@ useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "bkp"; - users.user = import ../../../users/desktops/user.nix; + users.user = { + imports = [ ../../../users/desktops/user.nix ]; + }; }; } diff --git a/hosts/desktops/common/packages.nix b/hosts/desktops/common/packages.nix index 842e9a1..0a59658 100644 --- a/hosts/desktops/common/packages.nix +++ b/hosts/desktops/common/packages.nix @@ -1,4 +1,4 @@ -{ inputs, pkgs, ... }: +{ pkgs, ... }: let kdepkgs = with pkgs.kdePackages; [ ark @@ -30,7 +30,6 @@ in aspellDicts.en-computers aspellDicts.pt_BR bat - bitwarden-desktop clonehero deploy-rs distrobox @@ -38,6 +37,7 @@ in firefox freecad-wayland fzf + ghostty gimp heroic inkscape @@ -73,6 +73,7 @@ in steam-run tor-browser ungoogled-chromium + ulauncher unrar ventoy vesktop @@ -103,6 +104,7 @@ in kdeconnect.enable = true; partition-manager.enable = true; gamemode.enable = true; + hyprland.enable = true; nix-index-database.comma.enable = true; appimage = { enable = true; diff --git a/users/desktops/common/programs.nix b/users/desktops/common/programs.nix index f1e4665..80ea317 100644 --- a/users/desktops/common/programs.nix +++ b/users/desktops/common/programs.nix @@ -25,4 +25,169 @@ }; }; }; + + wayland.windowManager.hyprland = { + enable = true; + plugins = with pkgs.hyprlandPlugins; [ hyprscroller ]; + extraConfig = '' + ################ + ### MONITORS ### + ################ + monitor=,preferred,auto,auto + + ################# + ### AUTOSTART ### + ################# + exec-once = ulauncher --hide-window + exec-once = ${pkgs.hyprpanel}/bin/hyprpanel + env = XCURSOR_SIZE,24 + env = HYPRCURSOR_SIZE,24 + + ##################### + ### LOOK AND FEEL ### + ##################### + general { + gaps_in = 5 + gaps_out = 20 + border_size = 2 + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + resize_on_border = true + allow_tearing = false + layout = scroller + } + plugin { + scroller { + column_default_width = onethird + focuswrap = false + column_widths = onethird onehalf twothirds + center_row_if_space_available = true + } + } + decoration { + rounding = 10 + rounding_power = 2 + dim_inactive = true + dim_strength = 0.3 + shadow { + enabled = true + range = 4 + render_power = 3 + } + blur { + enabled = true + size = 8 + passes = 1 + vibrancy = 0.1696 + } + } + animations { + enabled = yes, please :) + bezier = easeOutQuint,0.23,1,0.32,1 + bezier = easeInOutCubic,0.65,0.05,0.36,1 + bezier = linear,0,0,1,1 + bezier = almostLinear,0.5,0.5,0.75,1.0 + bezier = quick,0.15,0,0.1,1 + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + } + misc { + force_default_wallpaper = 0 + disable_hyprland_logo = true + } + + ############# + ### INPUT ### + ############# + input { + kb_layout = us + kb_variant = altgr-intl + follow_mouse = 1 + sensitivity = 0 + accel_profile = flat + natural_scroll = true + touchpad { + natural_scroll = true + clickfinger_behavior = true + } + } + + ################### + ### KEYBINDINGS ### + ################### + $mainMod = SUPER + $terminal = ghostty + $menu = ulauncher-toggle + # APP SHORTCUTS + bind = ALT, SPACE, exec, $menu + bind = $mainMod, RETURN, exec, $terminal + # SESSION MANAGEMENT + bind = CTRL ALT, DELETE, exit, + bind = $mainMod CTRL, mouse_down, workspace, e+1 + bind = $mainMod CTRL, mouse_up, workspace, e-1 + bind = $mainMod CTRL, j, workspace, e+1 + bind = $mainMod CTRL, k, workspace, e-1 + bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ + bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- + bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ + bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- + bindl = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next + bindl = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl play-pause + bindl = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause + bindl = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous + # WINDOW MANAGEMENT + bind = ALT, F4, killactive, + bind = $mainMod, space, togglefloating, + bind = $mainMod, f, fullscreen + bindm = $mainMod, mouse:272, movewindow + bindm = $mainMod, mouse:273, resizewindow + bind = SUPER, h, movefocus, l + bind = SUPER, l, movefocus, r + bind = SUPER, k, movefocus, u + bind = SUPER, j, movefocus, d + bind = $mainMod CTRL, h, movewindow, l + bind = $mainMod CTRL, l, movewindow, r + bind = $mainMod CTRL, k, movewindow, u + bind = $mainMod CTRL, j, movewindow, d + bind = $mainMod, bracketleft, scroller:setmode, row + bind = $mainMod, bracketright, scroller:setmode, col + bind = $mainMod, slash, scroller:jump, + bind = $mainMod, r, scroller:cyclewidth, next + bind = $mainMod CTRL, r, scroller:cyclewidth, prev + bind = $mainMod, p, scroller:pin, + bind = $mainMod, c, scroller:alignwindow, center + + #################### + ### WINDOW RULES ### + #################### + windowrulev2 = suppressevent maximize, class:.* + windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 + # ulauncher + windowrule = float, ulauncher + windowrule = pin, ulancher + windowrule = noborder, ulauncher + windowrule = noshadow, ulauncher + windowrule = nomaxsize, ulauncher + windowrule = noblur, ulauncher + windowrulev2 = animation slide top, class:^(ulauncher)$ + # firefox + windowrulev2 = plugin:scroller:columnwidth onehalf, class:(firefox) + ''; + }; } From 01589b30ad1043d424674bf61685d36d19c80e61 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 5 Feb 2025 00:24:19 -0300 Subject: [PATCH 2/6] I'll com back to this every once in a while. I need a vertical panel --- flake.lock | 86 +------------ flake.nix | 10 +- hosts/desktops/common/home-manager.nix | 6 +- hosts/desktops/common/packages.nix | 2 +- users/desktops/common/default.nix | 1 + users/desktops/common/hyprland.nix | 167 +++++++++++++++++++++++++ users/desktops/common/programs.nix | 165 ------------------------ 7 files changed, 179 insertions(+), 258 deletions(-) create mode 100644 users/desktops/common/hyprland.nix diff --git a/flake.lock b/flake.lock index 598fb4c..3f2ffa9 100644 --- a/flake.lock +++ b/flake.lock @@ -23,50 +23,6 @@ "type": "github" } }, - "ags": { - "inputs": { - "astal": "astal", - "nixpkgs": [ - "hyprpanel", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1736090999, - "narHash": "sha256-B5CJuHqfJrzPa7tObK0H9669/EClSHpa/P7B9EuvElU=", - "owner": "aylur", - "repo": "ags", - "rev": "5527c3c07d92c11e04e7fd99d58429493dba7e3c", - "type": "github" - }, - "original": { - "owner": "aylur", - "repo": "ags", - "type": "github" - } - }, - "astal": { - "inputs": { - "nixpkgs": [ - "hyprpanel", - "ags", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1735172721, - "narHash": "sha256-rtEAwGsHSppnkR3Qg3eRJ6Xh/F84IY9CrBBLzYabalY=", - "owner": "aylur", - "repo": "astal", - "rev": "6c84b64efc736e039a8a10774a4a1bf772c37aa2", - "type": "github" - }, - "original": { - "owner": "aylur", - "repo": "astal", - "type": "github" - } - }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -462,27 +418,6 @@ "type": "github" } }, - "hyprpanel": { - "inputs": { - "ags": "ags", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1737793455, - "narHash": "sha256-sVy0QU4fpZsUWj5B8t6jUNZHzVLC22+HYqcFG9pKPik=", - "owner": "Jas-SinghFSU", - "repo": "HyprPanel", - "rev": "74065af3d2aa576e8b183d720033c3eece3deb70", - "type": "github" - }, - "original": { - "owner": "Jas-SinghFSU", - "repo": "HyprPanel", - "type": "github" - } - }, "impermanence": { "locked": { "lastModified": 1737831083, @@ -624,22 +559,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1736798957, - "narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "agenix": "agenix", @@ -647,7 +566,6 @@ "home-manager": "home-manager_2", "home-manager-stable": "home-manager-stable", "homepage": "homepage", - "hyprpanel": "hyprpanel", "impermanence": "impermanence", "nix-flatpak": "nix-flatpak", "nix-index-db": "nix-index-db", @@ -670,7 +588,9 @@ "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs-stable" + ], "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", diff --git a/flake.nix b/flake.nix index 1d1e861..56bb8cb 100644 --- a/flake.nix +++ b/flake.nix @@ -48,11 +48,9 @@ inputs.nixpkgs.follows = "nixpkgs-stable"; }; - stylix.url = "github:danth/stylix"; - - hyprpanel = { - url = "github:Jas-SinghFSU/HyprPanel"; - inputs.nixpkgs.follows = "nixpkgs"; + stylix = { + url = "github:danth/stylix"; + inputs.nixpkgs.follows = "nixpkgs-stable"; }; }; @@ -72,7 +70,6 @@ nix-minecraft, nixos-generators, stylix, - hyprpanel, ... }: { @@ -94,7 +91,6 @@ nixpkgs.overlays = [ agenix.overlays.default self.overlays.custom - hyprpanel.overlay ]; } ]; diff --git a/hosts/desktops/common/home-manager.nix b/hosts/desktops/common/home-manager.nix index f605806..89eceae 100644 --- a/hosts/desktops/common/home-manager.nix +++ b/hosts/desktops/common/home-manager.nix @@ -1,4 +1,4 @@ -{ ... }: +{ inputs, ... }: { home-manager = { @@ -6,7 +6,9 @@ useUserPackages = true; backupFileExtension = "bkp"; users.user = { - imports = [ ../../../users/desktops/user.nix ]; + imports = [ + ../../../users/desktops/user.nix + ]; }; }; } diff --git a/hosts/desktops/common/packages.nix b/hosts/desktops/common/packages.nix index 0a59658..6fb9738 100644 --- a/hosts/desktops/common/packages.nix +++ b/hosts/desktops/common/packages.nix @@ -73,7 +73,6 @@ in steam-run tor-browser ungoogled-chromium - ulauncher unrar ventoy vesktop @@ -122,6 +121,7 @@ in corefonts noto-fonts-cjk-sans roboto + nerd-fonts.jetbrains-mono ]; }; diff --git a/users/desktops/common/default.nix b/users/desktops/common/default.nix index 5ef9e0a..eb72910 100644 --- a/users/desktops/common/default.nix +++ b/users/desktops/common/default.nix @@ -3,5 +3,6 @@ { imports = [ ./programs.nix + ./hyprland.nix ]; } diff --git a/users/desktops/common/hyprland.nix b/users/desktops/common/hyprland.nix new file mode 100644 index 0000000..deecc3e --- /dev/null +++ b/users/desktops/common/hyprland.nix @@ -0,0 +1,167 @@ +{ pkgs, ... }: + +{ + wayland.windowManager.hyprland = { + enable = true; + plugins = with pkgs.hyprlandPlugins; [ hyprscroller ]; + extraConfig = '' + ################ + ### MONITORS ### + ################ + monitor=,preferred,auto,auto + + ################# + ### AUTOSTART ### + ################# + exec-once = ${pkgs.ulauncher}/bin/ulauncher --hide-window + exec-once = ${pkgs.swaynotificationcenter}/bin/swaync + exec-once = ${pkgs.ironbar}/bin/ironbar + env = XCURSOR_SIZE,24 + env = HYPRCURSOR_SIZE,24 + + ##################### + ### LOOK AND FEEL ### + ##################### + general { + gaps_in = 5 + gaps_out = 20 + border_size = 2 + resize_on_border = true + allow_tearing = false + layout = scroller + } + plugin { + scroller { + column_default_width = onethird + focuswrap = false + column_widths = onethird onehalf twothirds + center_row_if_space_available = true + } + } + decoration { + rounding = 10 + rounding_power = 2 + dim_inactive = true + dim_strength = 0.3 + shadow { + enabled = true + range = 4 + render_power = 3 + } + blur { + enabled = true + size = 8 + passes = 1 + vibrancy = 0.1696 + } + } + animations { + enabled = yes, please :) + bezier = easeOutQuint,0.23,1,0.32,1 + bezier = easeInOutCubic,0.65,0.05,0.36,1 + bezier = linear,0,0,1,1 + bezier = almostLinear,0.5,0.5,0.75,1.0 + bezier = quick,0.15,0,0.1,1 + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + } + misc { + force_default_wallpaper = 0 + disable_hyprland_logo = true + } + + ############# + ### INPUT ### + ############# + input { + kb_layout = us + kb_variant = altgr-intl + follow_mouse = 1 + sensitivity = 0 + accel_profile = flat + natural_scroll = true + touchpad { + natural_scroll = true + clickfinger_behavior = true + } + } + + ################### + ### KEYBINDINGS ### + ################### + $mainMod = SUPER + $terminal = ghostty + $menu = ${pkgs.ulauncher}/bin/ulauncher-toggle + # APP SHORTCUTS + bind = ALT, SPACE, exec, $menu + bind = $mainMod, RETURN, exec, $terminal + # SESSION MANAGEMENT + bind = CTRL ALT, DELETE, exit, + bind = $mainMod CTRL, mouse_down, workspace, e+1 + bind = $mainMod CTRL, mouse_up, workspace, e-1 + bind = $mainMod CTRL, j, workspace, e+1 + bind = $mainMod CTRL, k, workspace, e-1 + bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ + bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- + bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ + bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- + bindl = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next + bindl = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl play-pause + bindl = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause + bindl = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous + # WINDOW MANAGEMENT + bind = ALT, F4, killactive, + bind = $mainMod, space, togglefloating, + bind = $mainMod, f, fullscreen + bindm = $mainMod, mouse:272, movewindow + bindm = $mainMod, mouse:273, resizewindow + bind = SUPER, h, movefocus, l + bind = SUPER, l, movefocus, r + bind = SUPER, k, movefocus, u + bind = SUPER, j, movefocus, d + bind = $mainMod CTRL, h, movewindow, l + bind = $mainMod CTRL, l, movewindow, r + bind = $mainMod CTRL, k, movewindow, u + bind = $mainMod CTRL, j, movewindow, d + bind = $mainMod, bracketleft, scroller:setmode, row + bind = $mainMod, bracketright, scroller:setmode, col + bind = $mainMod, slash, scroller:jump, + bind = $mainMod, r, scroller:cyclewidth, next + bind = $mainMod CTRL, r, scroller:cyclewidth, prev + bind = $mainMod, p, scroller:pin, + bind = $mainMod, c, scroller:alignwindow, center + + #################### + ### WINDOW RULES ### + #################### + windowrulev2 = suppressevent maximize, class:.* + windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 + # ulauncher + windowrule = float, ulauncher + windowrule = pin, ulauncher + windowrule = noborder, ulauncher + windowrule = noshadow, ulauncher + windowrule = nomaxsize, ulauncher + windowrule = noblur, ulauncher + windowrulev2 = animation slide top, class:^(ulauncher)$ + # firefox + windowrulev2 = plugin:scroller:columnwidth onehalf, class:(firefox) + ''; + }; +} diff --git a/users/desktops/common/programs.nix b/users/desktops/common/programs.nix index 80ea317..f1e4665 100644 --- a/users/desktops/common/programs.nix +++ b/users/desktops/common/programs.nix @@ -25,169 +25,4 @@ }; }; }; - - wayland.windowManager.hyprland = { - enable = true; - plugins = with pkgs.hyprlandPlugins; [ hyprscroller ]; - extraConfig = '' - ################ - ### MONITORS ### - ################ - monitor=,preferred,auto,auto - - ################# - ### AUTOSTART ### - ################# - exec-once = ulauncher --hide-window - exec-once = ${pkgs.hyprpanel}/bin/hyprpanel - env = XCURSOR_SIZE,24 - env = HYPRCURSOR_SIZE,24 - - ##################### - ### LOOK AND FEEL ### - ##################### - general { - gaps_in = 5 - gaps_out = 20 - border_size = 2 - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) - resize_on_border = true - allow_tearing = false - layout = scroller - } - plugin { - scroller { - column_default_width = onethird - focuswrap = false - column_widths = onethird onehalf twothirds - center_row_if_space_available = true - } - } - decoration { - rounding = 10 - rounding_power = 2 - dim_inactive = true - dim_strength = 0.3 - shadow { - enabled = true - range = 4 - render_power = 3 - } - blur { - enabled = true - size = 8 - passes = 1 - vibrancy = 0.1696 - } - } - animations { - enabled = yes, please :) - bezier = easeOutQuint,0.23,1,0.32,1 - bezier = easeInOutCubic,0.65,0.05,0.36,1 - bezier = linear,0,0,1,1 - bezier = almostLinear,0.5,0.5,0.75,1.0 - bezier = quick,0.15,0,0.1,1 - animation = global, 1, 10, default - animation = border, 1, 5.39, easeOutQuint - animation = windows, 1, 4.79, easeOutQuint - animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% - animation = windowsOut, 1, 1.49, linear, popin 87% - animation = fadeIn, 1, 1.73, almostLinear - animation = fadeOut, 1, 1.46, almostLinear - animation = fade, 1, 3.03, quick - animation = layers, 1, 3.81, easeOutQuint - animation = layersIn, 1, 4, easeOutQuint, fade - animation = layersOut, 1, 1.5, linear, fade - animation = fadeLayersIn, 1, 1.79, almostLinear - animation = fadeLayersOut, 1, 1.39, almostLinear - animation = workspaces, 1, 1.94, almostLinear, fade - animation = workspacesIn, 1, 1.21, almostLinear, fade - animation = workspacesOut, 1, 1.94, almostLinear, fade - } - misc { - force_default_wallpaper = 0 - disable_hyprland_logo = true - } - - ############# - ### INPUT ### - ############# - input { - kb_layout = us - kb_variant = altgr-intl - follow_mouse = 1 - sensitivity = 0 - accel_profile = flat - natural_scroll = true - touchpad { - natural_scroll = true - clickfinger_behavior = true - } - } - - ################### - ### KEYBINDINGS ### - ################### - $mainMod = SUPER - $terminal = ghostty - $menu = ulauncher-toggle - # APP SHORTCUTS - bind = ALT, SPACE, exec, $menu - bind = $mainMod, RETURN, exec, $terminal - # SESSION MANAGEMENT - bind = CTRL ALT, DELETE, exit, - bind = $mainMod CTRL, mouse_down, workspace, e+1 - bind = $mainMod CTRL, mouse_up, workspace, e-1 - bind = $mainMod CTRL, j, workspace, e+1 - bind = $mainMod CTRL, k, workspace, e-1 - bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ - bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- - bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ - bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- - bindl = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next - bindl = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl play-pause - bindl = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause - bindl = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous - # WINDOW MANAGEMENT - bind = ALT, F4, killactive, - bind = $mainMod, space, togglefloating, - bind = $mainMod, f, fullscreen - bindm = $mainMod, mouse:272, movewindow - bindm = $mainMod, mouse:273, resizewindow - bind = SUPER, h, movefocus, l - bind = SUPER, l, movefocus, r - bind = SUPER, k, movefocus, u - bind = SUPER, j, movefocus, d - bind = $mainMod CTRL, h, movewindow, l - bind = $mainMod CTRL, l, movewindow, r - bind = $mainMod CTRL, k, movewindow, u - bind = $mainMod CTRL, j, movewindow, d - bind = $mainMod, bracketleft, scroller:setmode, row - bind = $mainMod, bracketright, scroller:setmode, col - bind = $mainMod, slash, scroller:jump, - bind = $mainMod, r, scroller:cyclewidth, next - bind = $mainMod CTRL, r, scroller:cyclewidth, prev - bind = $mainMod, p, scroller:pin, - bind = $mainMod, c, scroller:alignwindow, center - - #################### - ### WINDOW RULES ### - #################### - windowrulev2 = suppressevent maximize, class:.* - windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 - # ulauncher - windowrule = float, ulauncher - windowrule = pin, ulancher - windowrule = noborder, ulauncher - windowrule = noshadow, ulauncher - windowrule = nomaxsize, ulauncher - windowrule = noblur, ulauncher - windowrulev2 = animation slide top, class:^(ulauncher)$ - # firefox - windowrulev2 = plugin:scroller:columnwidth onehalf, class:(firefox) - ''; - }; } From 78b6eaf05cbe4d3ffe265366252fa038297ba048 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 5 Feb 2025 10:11:29 -0300 Subject: [PATCH 3/6] added packages to hyprland --- users/desktops/common/hyprland.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/users/desktops/common/hyprland.nix b/users/desktops/common/hyprland.nix index deecc3e..e4c19cf 100644 --- a/users/desktops/common/hyprland.nix +++ b/users/desktops/common/hyprland.nix @@ -13,9 +13,9 @@ ################# ### AUTOSTART ### ################# - exec-once = ${pkgs.ulauncher}/bin/ulauncher --hide-window - exec-once = ${pkgs.swaynotificationcenter}/bin/swaync - exec-once = ${pkgs.ironbar}/bin/ironbar + exec-once = ulauncher --hide-window + # exec-once = ${pkgs.swaynotificationcenter}/bin/swaync + # exec-once = ${pkgs.ironbar}/bin/ironbar env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 @@ -105,7 +105,7 @@ ################### $mainMod = SUPER $terminal = ghostty - $menu = ${pkgs.ulauncher}/bin/ulauncher-toggle + $menu = ulauncher-toggle # APP SHORTCUTS bind = ALT, SPACE, exec, $menu bind = $mainMod, RETURN, exec, $terminal @@ -164,4 +164,11 @@ windowrulev2 = plugin:scroller:columnwidth onehalf, class:(firefox) ''; }; + + home.packages = with pkgs; [ + hyprnome + playerctl + brightnessctl + ulauncher + ]; } From b602e3ec1b5fad5e49fc630ad1f117eabde1b2b6 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 5 Feb 2025 11:37:27 -0300 Subject: [PATCH 4/6] fast animations, some other changes --- users/desktops/common/hyprland.nix | 83 ++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 27 deletions(-) diff --git a/users/desktops/common/hyprland.nix b/users/desktops/common/hyprland.nix index e4c19cf..3b9c807 100644 --- a/users/desktops/common/hyprland.nix +++ b/users/desktops/common/hyprland.nix @@ -1,4 +1,29 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: + +let + heightfittr = pkgs.writeShellApplication { + name = "heightfittr"; + runtimeInputs = with pkgs; [ + socat + hyprland + ]; + text = '' + function handle { + case "$1" in + *openwindow*) + hyprctl dispatch scroller:fitheight all > /dev/null + ;; + *closewindow*) + hyprctl dispatch scroller:fitheight all > /dev/null + ;; + esac + } + socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do + handle "$line" + done + ''; + }; +in { wayland.windowManager.hyprland = { @@ -14,6 +39,7 @@ ### AUTOSTART ### ################# exec-once = ulauncher --hide-window + exec-once = ${lib.getExe heightfittr} # exec-once = ${pkgs.swaynotificationcenter}/bin/swaync # exec-once = ${pkgs.ironbar}/bin/ironbar env = XCURSOR_SIZE,24 @@ -30,6 +56,9 @@ allow_tearing = false layout = scroller } + misc { + font_family = Inter + } plugin { scroller { column_default_width = onethird @@ -62,22 +91,20 @@ bezier = linear,0,0,1,1 bezier = almostLinear,0.5,0.5,0.75,1.0 bezier = quick,0.15,0,0.1,1 - animation = global, 1, 10, default - animation = border, 1, 5.39, easeOutQuint - animation = windows, 1, 4.79, easeOutQuint - animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% - animation = windowsOut, 1, 1.49, linear, popin 87% - animation = fadeIn, 1, 1.73, almostLinear - animation = fadeOut, 1, 1.46, almostLinear - animation = fade, 1, 3.03, quick - animation = layers, 1, 3.81, easeOutQuint - animation = layersIn, 1, 4, easeOutQuint, fade - animation = layersOut, 1, 1.5, linear, fade - animation = fadeLayersIn, 1, 1.79, almostLinear - animation = fadeLayersOut, 1, 1.39, almostLinear - animation = workspaces, 1, 1.94, almostLinear, fade - animation = workspacesIn, 1, 1.21, almostLinear, fade - animation = workspacesOut, 1, 1.94, almostLinear, fade + animation = global, 1, 1, default + animation = border, 1, 1, easeOutQuint + animation = windows, 1, 1, easeOutQuint + animation = windowsIn, 1, 1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1, linear, popin 87% + animation = fadeIn, 1, 1, almostLinear + animation = fadeOut, 1, 1, almostLinear + animation = fade, 1, 1, quick + animation = layers, 1, 1, easeOutQuint + animation = layersIn, 1, 1, easeOutQuint, fade + animation = layersOut, 1, 1, linear, fade + animation = fadeLayersIn, 1, 1, almostLinear + animation = fadeLayersOut, 1, 1, almostLinear + animation = workspaces, 1, 1, almostLinear, slidevert } misc { force_default_wallpaper = 0 @@ -111,20 +138,22 @@ bind = $mainMod, RETURN, exec, $terminal # SESSION MANAGEMENT bind = CTRL ALT, DELETE, exit, - bind = $mainMod CTRL, mouse_down, workspace, e+1 - bind = $mainMod CTRL, mouse_up, workspace, e-1 - bind = $mainMod CTRL, j, workspace, e+1 - bind = $mainMod CTRL, k, workspace, e-1 + bind = $mainMod, mouse_up, exec, hyprnome + bind = $mainMod, mouse_down, exec, hyprnome --previous + bind = CTRL ALT, j, exec, hyprnome + bind = CTRL ALT, k, exec, hyprnome --previous + bind = $mainMod CTRL ALT, j, exec, hyprnome --move + bind = $mainMod CTRL ALT, k, exec, hyprnome --move --previous bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- - bindl = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next - bindl = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl play-pause - bindl = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause - bindl = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous + bindl = , XF86AudioNext, exec, playerctl next + bindl = , XF86AudioPause, exec, playerctl play-pause + bindl = , XF86AudioPlay, exec, playerctl play-pause + bindl = , XF86AudioPrev, exec, playerctl previous # WINDOW MANAGEMENT bind = ALT, F4, killactive, bind = $mainMod, space, togglefloating, @@ -140,12 +169,12 @@ bind = $mainMod CTRL, k, movewindow, u bind = $mainMod CTRL, j, movewindow, d bind = $mainMod, bracketleft, scroller:setmode, row - bind = $mainMod, bracketright, scroller:setmode, col - bind = $mainMod, slash, scroller:jump, + bind = $mainMod CTRL, bracketleft, scroller:setmode, col bind = $mainMod, r, scroller:cyclewidth, next bind = $mainMod CTRL, r, scroller:cyclewidth, prev bind = $mainMod, p, scroller:pin, bind = $mainMod, c, scroller:alignwindow, center + bind = $mainMod CTRL, f, scroller:fitsize, all #################### ### WINDOW RULES ### From 259a0b61186988bd20cd6fa4e103a45d5b151662 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 6 Feb 2025 00:49:23 -0300 Subject: [PATCH 5/6] Further steps to a usable hyprland session --- flake.lock | 111 ++++++++++++++++++++++--- flake.nix | 3 + hosts/desktops/common/home-manager.nix | 1 + hosts/desktops/common/stylix.nix | 4 +- users/desktops/common/hyprland.nix | 99 ++++++++++++++++++++-- 5 files changed, 201 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 3f2ffa9..a43637e 100644 --- a/flake.lock +++ b/flake.lock @@ -202,6 +202,24 @@ "inputs": { "systems": "systems_3" }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_4" + }, "locked": { "lastModified": 1681202837, "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", @@ -216,7 +234,7 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "inputs": { "systems": [ "stylix", @@ -382,6 +400,27 @@ } }, "home-manager_3": { + "inputs": { + "nixpkgs": [ + "mithrill-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1730837930, + "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_4": { "inputs": { "nixpkgs": [ "stylix", @@ -433,6 +472,26 @@ "type": "github" } }, + "mithrill-shell": { + "inputs": { + "flake-utils": "flake-utils", + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1736076994, + "narHash": "sha256-s7G+VqOI0Sv1DS6EFqFKw2Xlk/1h568tfZgHBsr/SKc=", + "owner": "andreashgk", + "repo": "mithril-shell", + "rev": "63e213e1f644de541d3f84050a474acd5bd1511a", + "type": "github" + }, + "original": { + "owner": "andreashgk", + "repo": "mithril-shell", + "type": "github" + } + }, "nix-flatpak": { "locked": { "lastModified": 1711997201, @@ -472,7 +531,7 @@ "nix-minecraft": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -529,11 +588,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1738410390, - "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", "type": "github" }, "original": { @@ -559,6 +618,22 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1738410390, + "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -567,11 +642,12 @@ "home-manager-stable": "home-manager-stable", "homepage": "homepage", "impermanence": "impermanence", + "mithrill-shell": "mithrill-shell", "nix-flatpak": "nix-flatpak", "nix-index-db": "nix-index-db", "nix-minecraft": "nix-minecraft", "nixos-generators": "nixos-generators", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable", "stylix": "stylix" } @@ -584,14 +660,14 @@ "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", + "home-manager": "home-manager_4", "nixpkgs": [ "nixpkgs-stable" ], - "systems": "systems_4", + "systems": "systems_5", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux", @@ -642,6 +718,21 @@ } }, "systems_3": { + "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_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -656,7 +747,7 @@ "type": "github" } }, - "systems_4": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index 56bb8cb..554a290 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,8 @@ url = "github:danth/stylix"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; + + mithrill-shell.url = "github:andreashgk/mithril-shell"; }; outputs = @@ -70,6 +72,7 @@ nix-minecraft, nixos-generators, stylix, + mithrill-shell, ... }: { diff --git a/hosts/desktops/common/home-manager.nix b/hosts/desktops/common/home-manager.nix index 89eceae..120f71c 100644 --- a/hosts/desktops/common/home-manager.nix +++ b/hosts/desktops/common/home-manager.nix @@ -8,6 +8,7 @@ users.user = { imports = [ ../../../users/desktops/user.nix + inputs.mithrill-shell.homeManagerModules.default ]; }; }; diff --git a/hosts/desktops/common/stylix.nix b/hosts/desktops/common/stylix.nix index 3c862db..f1760b1 100644 --- a/hosts/desktops/common/stylix.nix +++ b/hosts/desktops/common/stylix.nix @@ -4,8 +4,8 @@ stylix = { enable = true; image = pkgs.fetchurl { - url = "https://images.unsplash.com/photo-1701453831008-ea11046da960?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=nat-uN9OSpSsw4A-unsplash.jpg"; - sha256 = "sha256-89o5VYI4cMP/O33oCaHi61hUYmIWEdyr8uGf/b2DMUk="; + url = "https://w.wallhaven.cc/full/dp/wallhaven-dpwvl3.jpg"; + sha256 = "sha256-h9UeYj8jSRgSv8XL+zgds4KtooLlJ+IqwxZbQEXdCh4="; }; base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; cursor = { diff --git a/users/desktops/common/hyprland.nix b/users/desktops/common/hyprland.nix index 3b9c807..83465c1 100644 --- a/users/desktops/common/hyprland.nix +++ b/users/desktops/common/hyprland.nix @@ -23,6 +23,20 @@ let done ''; }; + + scrollermodetoggle = pkgs.writeShellApplication { + name = "scrollermodetoggle"; + runtimeInputs = with pkgs; [ hyprland ]; + text = '' + if [ -f "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/colmode" ]; then + rm "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/colmode" + hyprctl --batch 'dispatch scroller:setmode row; notify 2 1000 0 "Row Mode"' + else + touch "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/colmode" + hyprctl --batch 'dispatch scroller:setmode col; notify 2 1000 0 "Column Mode"' + fi + ''; + }; in { @@ -40,8 +54,6 @@ in ################# exec-once = ulauncher --hide-window exec-once = ${lib.getExe heightfittr} - # exec-once = ${pkgs.swaynotificationcenter}/bin/swaync - # exec-once = ${pkgs.ironbar}/bin/ironbar env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 @@ -154,6 +166,7 @@ in bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous + bind = CTRL ALT SHIFT, a, exec, bash /home/user/.local/bin/toggle-audio-output.sh # WINDOW MANAGEMENT bind = ALT, F4, killactive, bind = $mainMod, space, togglefloating, @@ -168,8 +181,7 @@ in bind = $mainMod CTRL, l, movewindow, r bind = $mainMod CTRL, k, movewindow, u bind = $mainMod CTRL, j, movewindow, d - bind = $mainMod, bracketleft, scroller:setmode, row - bind = $mainMod CTRL, bracketleft, scroller:setmode, col + bind = $mainMod, v, exec, ${lib.getExe scrollermodetoggle} bind = $mainMod, r, scroller:cyclewidth, next bind = $mainMod CTRL, r, scroller:cyclewidth, prev bind = $mainMod, p, scroller:pin, @@ -194,10 +206,87 @@ in ''; }; + services = { + # mithril-shell = { + # enable = true; + # integrations.hyprland.enable = true; + # settings = { + # animations.activeWorkspace = "smooth"; + # minWorkspaces = 2; + # lockCommand = "hyprlock"; + # }; + # }; + swaync = { + enable = true; + settings = { + positionX = "left"; + positionY = "top"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + cssPriority = "application"; + control-center-margin-top = 20; + control-center-margin-bottom = 20; + control-center-margin-right = 20; + control-center-margin-left = 20; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200; + timeout = 10; + timeout-low = 5; + timeout-critical = 0; + fit-to-screen = true; + relative-timestamps = true; + control-center-width = 500; + control-center-height = 600; + notification-window-width = 500; + keyboard-shortcuts = true; + image-visibility = "when-available"; + transition-time = 200; + hide-on-clear = false; + hide-on-action = true; + script-fail-notify = true; + widgets = [ + "inhibitors" + "title" + "dnd" + "notifications" + "mpris" + ]; + widget-config = { + inhibitors = { + text = "Inhibitors"; + button-text = "Clear All"; + clear-all-button = true; + }; + title = { + text = "Notifications"; + clear-all-button = true; + button-text = "Clear All"; + }; + dnd = { + text = "Do Not Disturb"; + }; + mpris = { + image-size = 96; + image-radius = 12; + }; + }; + }; + }; + }; + + programs = { + hyprlock.enable = true; + }; + home.packages = with pkgs; [ + brightnessctl hyprnome playerctl - brightnessctl + swaynotificationcenter ulauncher ]; } From c683fb2571e674a0571ec66fd770620cf68bcbde Mon Sep 17 00:00:00 2001 From: William Date: Thu, 6 Feb 2025 21:41:48 -0300 Subject: [PATCH 6/6] sticking to plasma for a little longer --- flake.lock | 140 ++++++++++++------------- flake.nix | 4 +- hosts/desktops/common/home-manager.nix | 2 +- users/desktops/common/hyprland.nix | 20 ++-- 4 files changed, 84 insertions(+), 82 deletions(-) diff --git a/flake.lock b/flake.lock index a43637e..e60ffe3 100644 --- a/flake.lock +++ b/flake.lock @@ -202,24 +202,6 @@ "inputs": { "systems": "systems_3" }, - "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_4" - }, "locked": { "lastModified": 1681202837, "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", @@ -234,7 +216,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_2": { "inputs": { "systems": [ "stylix", @@ -255,6 +237,24 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -402,16 +402,16 @@ "home-manager_3": { "inputs": { "nixpkgs": [ - "mithrill-shell", + "stylix", "nixpkgs" ] }, "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "lastModified": 1736785676, + "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", "type": "github" }, "original": { @@ -423,16 +423,16 @@ "home-manager_4": { "inputs": { "nixpkgs": [ - "stylix", + "tritanium-shell", "nixpkgs" ] }, "locked": { - "lastModified": 1736785676, - "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", + "lastModified": 1730837930, + "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", "owner": "nix-community", "repo": "home-manager", - "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", + "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", "type": "github" }, "original": { @@ -472,26 +472,6 @@ "type": "github" } }, - "mithrill-shell": { - "inputs": { - "flake-utils": "flake-utils", - "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1736076994, - "narHash": "sha256-s7G+VqOI0Sv1DS6EFqFKw2Xlk/1h568tfZgHBsr/SKc=", - "owner": "andreashgk", - "repo": "mithril-shell", - "rev": "63e213e1f644de541d3f84050a474acd5bd1511a", - "type": "github" - }, - "original": { - "owner": "andreashgk", - "repo": "mithril-shell", - "type": "github" - } - }, "nix-flatpak": { "locked": { "lastModified": 1711997201, @@ -531,7 +511,7 @@ "nix-minecraft": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ] @@ -588,11 +568,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "lastModified": 1738410390, + "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", "type": "github" }, "original": { @@ -620,11 +600,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1738410390, - "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", "type": "github" }, "original": { @@ -642,14 +622,14 @@ "home-manager-stable": "home-manager-stable", "homepage": "homepage", "impermanence": "impermanence", - "mithrill-shell": "mithrill-shell", "nix-flatpak": "nix-flatpak", "nix-index-db": "nix-index-db", "nix-minecraft": "nix-minecraft", "nixos-generators": "nixos-generators", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", - "stylix": "stylix" + "stylix": "stylix", + "tritanium-shell": "tritanium-shell" } }, "stylix": { @@ -660,14 +640,14 @@ "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_4", + "home-manager": "home-manager_3", "nixpkgs": [ "nixpkgs-stable" ], - "systems": "systems_5", + "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux", @@ -719,16 +699,16 @@ }, "systems_3": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -749,16 +729,16 @@ }, "systems_5": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -828,6 +808,26 @@ "type": "github" } }, + "tritanium-shell": { + "inputs": { + "flake-utils": "flake-utils_3", + "home-manager": "home-manager_4", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1738888826, + "narHash": "sha256-xjUMyq7fTidbTwVqKEZ16SZSKECNx7mVDFicQswuZh8=", + "owner": "baduhai", + "repo": "tritanium-shell", + "rev": "d788a288ffc49847849d691824c2f46999b9b864", + "type": "github" + }, + "original": { + "owner": "baduhai", + "repo": "tritanium-shell", + "type": "github" + } + }, "utils": { "inputs": { "systems": "systems_2" diff --git a/flake.nix b/flake.nix index 554a290..56c9561 100644 --- a/flake.nix +++ b/flake.nix @@ -53,7 +53,7 @@ inputs.nixpkgs.follows = "nixpkgs-stable"; }; - mithrill-shell.url = "github:andreashgk/mithril-shell"; + tritanium-shell.url = "github:baduhai/tritanium-shell"; }; outputs = @@ -72,7 +72,7 @@ nix-minecraft, nixos-generators, stylix, - mithrill-shell, + tritanium-shell, ... }: { diff --git a/hosts/desktops/common/home-manager.nix b/hosts/desktops/common/home-manager.nix index 120f71c..6046b3a 100644 --- a/hosts/desktops/common/home-manager.nix +++ b/hosts/desktops/common/home-manager.nix @@ -8,7 +8,7 @@ users.user = { imports = [ ../../../users/desktops/user.nix - inputs.mithrill-shell.homeManagerModules.default + inputs.tritanium-shell.homeManagerModules.default ]; }; }; diff --git a/users/desktops/common/hyprland.nix b/users/desktops/common/hyprland.nix index 83465c1..49bcd56 100644 --- a/users/desktops/common/hyprland.nix +++ b/users/desktops/common/hyprland.nix @@ -207,15 +207,17 @@ in }; services = { - # mithril-shell = { - # enable = true; - # integrations.hyprland.enable = true; - # settings = { - # animations.activeWorkspace = "smooth"; - # minWorkspaces = 2; - # lockCommand = "hyprlock"; - # }; - # }; + tritanium-shell = { + enable = true; + integrations.hyprland.enable = true; + settings = { + vertical = true; + animations.activeWorkspace = "smooth"; + minWorkspaces = 1; + lockCommand = "hyprlock"; + bar.modules.workspacesIndicator.reverseScrollDirection = true; + }; + }; swaync = { enable = true; settings = {