From efd7fd542e760de7d86da56c4700d1e0914409a4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 7 Mar 2025 13:13:58 +0200 Subject: [PATCH] git hyprland --- flake.lock | 440 ++++++++++++++++++++- flake.nix | 2 + modules/home/desktop/hyprland/default.nix | 263 ++++++------ modules/home/desktop/niri/default.nix | 2 +- modules/home/programs/shell/oh-my-posh.nix | 11 +- modules/nixos/desktop/hyprland.nix | 13 +- 6 files changed, 590 insertions(+), 141 deletions(-) diff --git a/flake.lock b/flake.lock index 9bbfa27..b20bfb9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,38 @@ { "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1739298463, + "narHash": "sha256-oAFv9jKwwA7d7384d2LeywDSgwhvb3ZnrwbfoWPhXsI=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "f239e5aadd6d23c48e085c2de3397e2058e54d16", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -152,6 +185,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1717312683, @@ -167,7 +216,7 @@ "type": "github" } }, - "flake-compat_2": { + "flake-compat_3": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -241,7 +290,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1731533236, @@ -259,7 +308,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -277,7 +326,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1731533236, @@ -351,7 +400,7 @@ "stylix", "flake-compat" ], - "gitignore": "gitignore", + "gitignore": "gitignore_2", "nixpkgs": [ "stylix", "nixpkgs" @@ -372,6 +421,28 @@ } }, "gitignore": { + "inputs": { + "nixpkgs": [ + "hyprland", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { "inputs": { "nixpkgs": [ "stylix", @@ -472,6 +543,267 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1738664950, + "narHash": "sha256-xIeGNM+iivwVHkv9tHwOqoUP5dDrtees34bbFKKMZYs=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "7c6d165e1eb9045a996551eb9f121b6d1b30adc3", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1739049071, + "narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hyprland-protocols": "hyprland-protocols", + "hyprland-qtutils": "hyprland-qtutils", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks", + "systems": "systems_2", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1741218628, + "narHash": "sha256-Z+jPT8nijCV1EzCZ5XkLr8x82WPCX/GKk8OKg8Kr+s4=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "243376078655f304b01e5097c59108745bbb9da9", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1738422629, + "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprland-qt-support": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprland-qtutils", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "hyprland-qtutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-qtutils", + "systems" + ] + }, + "locked": { + "lastModified": 1737634706, + "narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=", + "owner": "hyprwm", + "repo": "hyprland-qt-support", + "rev": "8810df502cdee755993cb803eba7b23f189db795", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qt-support", + "type": "github" + } + }, + "hyprland-qtutils": { + "inputs": { + "hyprland-qt-support": "hyprland-qt-support", + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-qtutils", + "hyprlang", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1739048983, + "narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=", + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1739048914, + "narHash": "sha256-vd5rJBTmp2w7SDgfv23Zcd84ktI5eDA7e5UBzx+pKrU=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a7334904d591f38757c46fbe2ab68651877d9099", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1739891528, + "narHash": "sha256-h8HOCZ/rw2Buzku+GKF77VXxrGjCSOQkLhptiEKMYg0=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "61a5382f4b1ab578064d470b1b3d3f0df396b8ba", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1739049028, + "narHash": "sha256-RleJp7LYbr6s+M1xgbmhtBs+fYa3ZdIiF7+QalJ4D1g=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "04146df74a8d5ec0b579657307be01f1e241125f", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "ixx": { "inputs": { "flake-utils": [ @@ -657,7 +989,7 @@ }, "nixos-cosmic": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable" }, @@ -821,11 +1153,35 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737465171, + "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "blueprint": "blueprint", "chaotic": "chaotic", "home-manager": "home-manager_2", + "hyprland": "hyprland", "lix": "lix", "mysecrets": "mysecrets", "neve": "neve", @@ -883,14 +1239,14 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_4", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_4", "nur": "nur", - "systems": "systems_5", + "systems": "systems_6", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -928,16 +1284,16 @@ }, "systems_2": { "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" } }, @@ -987,6 +1343,21 @@ } }, "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_7": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1110,7 +1481,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1740555016, @@ -1125,6 +1496,47 @@ "repo": "walker", "type": "github" } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1737634991, + "narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c6e8233..8abdf62 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,8 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland.url = "github:hyprwm/Hyprland"; + hyprland.inputs.nixpkgs.follows = "nixpkgs"; neve = { url = "git+https://gitea.linerds.us/unexplrd/Neve"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index c4b1c87..f30d8b9 100644 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -1,4 +1,5 @@ { + perSystem, osConfig, config, pkgs, @@ -8,6 +9,7 @@ cfg = config.desktop.hyprland; hostname = osConfig.networking.hostName; cursor_size = toString config.stylix.cursor.size; + colors = config.lib.stylix.colors; keyboard = if hostname == "eldrid" then "chromeos" @@ -20,6 +22,8 @@ in { lib.mkEnableOption "enable hyprland desktop"; }; config = lib.mkIf cfg.enable { + stylix.targets.waybar.enable = false; + stylix.targets.hyprland.enable = false; wayland.windowManager.hyprland = { enable = true; systemd = { @@ -28,12 +32,13 @@ in { "--all" ]; }; - package = pkgs.hyprland; - plugins = with pkgs.hyprlandPlugins; [ - # hyprspace - # hy3 - hyprscroller - ]; + package = perSystem.hyprland.hyprland; + portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland; + # plugins = with pkgs.hyprlandPlugins; [ + # hyprspace + # hy3 + # hyprscroller + # ]; settings = { input = { kb_layout = "us,ua"; @@ -72,14 +77,11 @@ in { "desc:Chimei Innolux Corporation 0x1406, preferred, 1920x0, 1.2" ]; env = [ - # "EDITOR,hx" "ELECTRON_OZONE_PLATFORM_HINT,auto" "QT_QPA_PLATFORM,wayland" "QT_QPA_PLATFORMTHEME,gtk3" "XCURSOR_SIZE,${cursor_size}" - #"GTK_THEME,adw-gtk3" "GSK_RENDERER,ngl" - # "DISPLAY,:123" ]; decoration = { shadow.enabled = false; @@ -107,8 +109,6 @@ in { "windows, 1, 3, easeOutExpo, popin 80%" "layers, 1, 2, easeOutExpo, fade" ]; - #group = { - # }; plugin = [ { overview = { @@ -144,15 +144,15 @@ in { text_center = true; text_font = "${config.stylix.fonts.sansSerif.name}"; - "col.active" = "0xff${config.lib.stylix.colors.base00}"; - "col.inactive" = "0xff${config.lib.stylix.colors.base00}"; - "col.urgent" = "0xff${config.lib.stylix.colors.base00}"; - "col.active.text" = "0xff${config.lib.stylix.colors.base0D}"; - "col.inactive.text" = "0xff${config.lib.stylix.colors.base05}"; - "col.urgent.text" = "0xff${config.lib.stylix.colors.base09}"; - "col.active.border" = "0xff${config.lib.stylix.colors.base00}"; - "col.inactive.border" = "0xff${config.lib.stylix.colors.base00}"; - "col.urgent.border" = "0xff${config.lib.stylix.colors.base00}"; + "col.active" = "0xff${colors.base00}"; + "col.inactive" = "0xff${colors.base00}"; + "col.urgent" = "0xff${colors.base00}"; + "col.active.text" = "0xff${colors.base0D}"; + "col.inactive.text" = "0xff${colors.base05}"; + "col.urgent.text" = "0xff${colors.base09}"; + "col.active.border" = "0xff${colors.base00}"; + "col.inactive.border" = "0xff${colors.base00}"; + "col.urgent.border" = "0xff${colors.base00}"; }; }; } @@ -163,14 +163,14 @@ in { gesture_scroll_fingers = 3; gesture_overview_fingers = 3; jump_labels_font = "${config.stylix.fonts.sansSerif.name}"; - jump_labels_color = "0xff${config.lib.stylix.colors.base0A}"; + jump_labels_color = "0xff${colors.base0A}"; }; } ]; dwindle = { force_split = 2; - default_split_ratio = 1.4; + default_split_ratio = 1.2; }; master = { mfact = 0.6; @@ -194,27 +194,31 @@ in { "$clipboardManager" = "copyq menu"; general = { + "col.active_border" = "0xff${colors.base0D}"; + "col.inactive_border" = "0xff${colors.base03}"; gaps_in = 4; gaps_out = 8; border_size = 3; allow_tearing = true; - layout = "scroller"; + layout = "dwindle"; + }; + group = { + "col.border_active" = "0xff${colors.base0D}"; + "col.border_inactive" = "0xff${colors.base03}"; + "col.border_locked_active" = "0xff${colors.base0A}"; + "col.border_locked_inactive" = "0xff${colors.base0F}"; + groupbar = { + height = 24; + rounding = 6; + gradient_rounding = 8; + font_size = 24; + gradients = true; + font_family = "${config.stylix.fonts.sansSerif.name}"; + "text_color" = "0xff${colors.base00}"; + "col.active" = "0xff${colors.base0D}"; + "col.inactive" = "0xff${colors.base03}"; + }; }; - - # group = { - # groupbar = lib.mkDefault { - # height = 24; - # font_size = 14; - # font_family = "${config.stylix.fonts.sansSerif.name}"; - - # "col.active" = "0xff${config.lib.stylix.colors.base00}"; - # "col.inactive" = "0xff${config.lib.stylix.colors.base00}"; - # # "col.urgent" = "0xff${config.lib.stylix.colors.base00}"; - # "col.text.active" = "0xff${config.lib.stylix.colors.base0D}"; - # "col.text.inactive" = "0xff${config.lib.stylix.colors.base05}"; - # # "col.text.urgent" = "0xff${config.lib.stylix.colors.base09}"; - # }; - # }; # bindn = [", mouse:272, hy3:focustab, mouse"]; bind = [ @@ -226,24 +230,26 @@ in { "$modCtrl, G, togglefloating" "$mod, G, pin" - "$mod, Z, scroller:setmode, row" - "$mod, X, scroller:setmode, column" - "$mod, M, scroller:fitwidth, active" - "$mod, H, scroller:setwidth, 1" - "$mod, C, scroller:cyclewidth, next" - "$modShift, C, scroller:cycleheight, next" - "$modShift, M, scroller:fitheight, active" - "$modShift, H, scroller:setheight, onehalf" - "$mod, comma, scroller:admitwindow, l" - "$mod, period, scroller:admitwindow, r" - "$modCtrl, comma, scroller:expelwindow, l" - "$modCtrl, period, scroller:expelwindow, r" - "$mod, backspace, scroller:toggleoverview" - "$modCtrl, backspace, scroller:jump" + # "$mod, Z, scroller:setmode, row" + # "$mod, X, scroller:setmode, column" + # "$mod, M, scroller:fitwidth, active" + # "$mod, H, scroller:setwidth, 1" + # "$mod, C, scroller:cyclewidth, next" + # "$modShift, C, scroller:cycleheight, next" + # "$modShift, M, scroller:fitheight, active" + # "$modShift, H, scroller:setheight, onehalf" + # "$mod, comma, scroller:admitwindow, l" + # "$mod, period, scroller:admitwindow, r" + # "$modCtrl, comma, scroller:expelwindow, l" + # "$modCtrl, period, scroller:expelwindow, r" + # "$mod, backspace, scroller:toggleoverview" + # "$modCtrl, backspace, scroller:jump" - # "$mod,T, togglegroup" - # "$mod, period, changegroupactive, f" - # "$mod, comma, changegroupactive, b" + "$mod, T, togglegroup" + "$mod, period, changegroupactive, f" + "$mod, comma, changegroupactive, b" + "$modCtrl, period, movewindoworgroup, r" + "$modCtrl, comma, movewindoworgroup, l" # "$mod, S, hy3:changegroup, opposite" # "$mod, T, hy3:changegroup, toggletab" # "$mod, S, hy3:changegroup, opposite" @@ -254,39 +260,46 @@ in { # "$mod, Tab, overview:toggle" # "$mod, Tab, hyprexpo:expo, toggle" + "$mod, Tab, cyclenext," + "$modShift, Tab, cyclenext, prev" + "$mod, Tab, bringactivetotop," + + "$modShift, U, focusurgentorlast" "$modCtrl, L, exec, $screenLocker" "$modCtrl, B, exec, $webBrowser" "$modCtrl, V, exec, $clipboardManager" + "$modCtrl, K, focuswindow, title:(Meet:.*)" # ", Print, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -o -r -c '\#\#00000000')\" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ${xdgPictures}/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png" - ", Print, exec, hyprshot -z -m region -o ${config.xdg.userDirs.pictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" - "CTRL, Print, exec, hyprshot -z -m window -o ${config.xdg.userDirs.pictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" - "SHIFT, Print, exec, hyprshot -z -m output -o ${config.xdg.userDirs.pictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" + ", Print, exec, hyprshot -z -m region -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" + "CTRL, Print, exec, hyprshot -z -m window -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" + "SHIFT, Print, exec, hyprshot -z -m output -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" ## navigation - "$mod, $left, scroller:movefocus, l" - "$mod, $down, scroller:movefocus, d" - "$mod, $up, scroller:movefocus, u" - "$mod, $right, scroller:movefocus, r" + "$mod, $left, movefocus, l" + "$mod, $down, movefocus, d" + "$mod, $up, movefocus, u" + "$mod, $right, movefocus, r" "$modShift, $left, workspace, e-1" "$modShift, $right, workspace, e+1" - "$mod, left, scroller:movefocus, l" - "$mod, up, scroller:movefocus, u" - "$mod, down, scroller:movefocus, d" - "$mod, right, scroller:movefocus, r" + "$mod, left, movefocus, l" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + "$mod, right, movefocus, r" + "$modShift, W, focuscurrentorlast" + "$mod, mouse_down, workspace, e-1" + "$mod, mouse_up, workspace, e+1" "$modShift, left, workspace, e-1" "$modShift, right, workspace, e+1" - "$modShift, down, focusmonitor, e+1" - "$modShift, up, focusmonitor, e-1" - "$modCtrl, $left, scroller:movewindow, l" - "$modCtrl, $down, scroller:movewindow, d" - "$modCtrl, $up, scroller:movewindow, u" - "$modCtrl, $right, scroller:movewindow, r" - "$modCtrl, left, scroller:movewindow, l" - "$modCtrl, up, scroller:movewindow, u" - "$modCtrl, down, scroller:movewindow, d" - "$modCtrl, right, scroller:movewindow, r" + "$modCtrl, $left, movewindow, l" + "$modCtrl, $down, movewindow, d" + "$modCtrl, $up, movewindow, u" + "$modCtrl, $right, movewindow, r" + "$modCtrl, left, movewindow, l" + "$modCtrl, up, movewindow, u" + "$modCtrl, down, movewindow, d" + "$modCtrl, right, movewindow, r" # workspaces "$mod, 1, workspace, 1" "$mod, 2, workspace, 2" @@ -444,20 +457,20 @@ in { # "workspace name:game, class:" ]; }; - # extraConfig = '' - # bind = $modShift, R, submap, resize - # submap = resize - # binde = , right, resizeactive, 10 0 - # binde = , left, resizeactive, -10 0 - # binde = , up, resizeactive, 0 -10 - # binde = , down, resizeactive, 0 10 - # binde = , $right, resizeactive, 10 0 - # binde = , $left, resizeactive, -10 0 - # binde = , $up, resizeactive, 0 -10 - # binde = , $down, resizeactive, 0 10 - # bind = , escape, submap, reset - # submap = reset - # ''; + extraConfig = '' + bind = $modShift, R, submap, resize + submap = resize + binde = , right, resizeactive, 10 0 + binde = , left, resizeactive, -10 0 + binde = , up, resizeactive, 0 -10 + binde = , down, resizeactive, 0 10 + binde = , $right, resizeactive, 10 0 + binde = , $left, resizeactive, -10 0 + binde = , $up, resizeactive, 0 -10 + binde = , $down, resizeactive, 0 10 + bind = , escape, submap, reset + submap = reset + ''; }; services = { hyprpaper.enable = true; @@ -509,7 +522,6 @@ in { icon-theme = "${config.gtk.iconTheme.name}"; }; }; - stylix.targets.waybar.enable = false; programs.waybar = { enable = true; systemd = { @@ -715,22 +727,22 @@ in { }; }; style = '' - @define-color base00 #${config.lib.stylix.colors.base00}; - @define-color base01 #${config.lib.stylix.colors.base01}; - @define-color base02 #${config.lib.stylix.colors.base02}; - @define-color base03 #${config.lib.stylix.colors.base03}; - @define-color base04 #${config.lib.stylix.colors.base04}; - @define-color base05 #${config.lib.stylix.colors.base05}; - @define-color base06 #${config.lib.stylix.colors.base06}; - @define-color base07 #${config.lib.stylix.colors.base07}; - @define-color base08 #${config.lib.stylix.colors.base08}; - @define-color base09 #${config.lib.stylix.colors.base09}; - @define-color base0A #${config.lib.stylix.colors.base0A}; - @define-color base0B #${config.lib.stylix.colors.base0B}; - @define-color base0C #${config.lib.stylix.colors.base0C}; - @define-color base0D #${config.lib.stylix.colors.base0D}; - @define-color base0E #${config.lib.stylix.colors.base0E}; - @define-color base0F #${config.lib.stylix.colors.base0F}; + @define-color base00 #${colors.base00}; + @define-color base01 #${colors.base01}; + @define-color base02 #${colors.base02}; + @define-color base03 #${colors.base03}; + @define-color base04 #${colors.base04}; + @define-color base05 #${colors.base05}; + @define-color base06 #${colors.base06}; + @define-color base07 #${colors.base07}; + @define-color base08 #${colors.base08}; + @define-color base09 #${colors.base09}; + @define-color base0A #${colors.base0A}; + @define-color base0B #${colors.base0B}; + @define-color base0C #${colors.base0C}; + @define-color base0D #${colors.base0D}; + @define-color base0E #${colors.base0E}; + @define-color base0F #${colors.base0F}; * { font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; font-weight: 500; @@ -1189,11 +1201,11 @@ in { dots_center = true; fade_on_empty = false; font_family = "${config.stylix.fonts.serif.name}"; - font_color = "rgb(${config.lib.stylix.colors.base05})"; - inner_color = "rgb(${config.lib.stylix.colors.base00})"; - outer_color = "rgb(${config.lib.stylix.colors.base0D})"; - check_color = "rgb(${config.lib.stylix.colors.base0A})"; - fail_color = "rgb(${config.lib.stylix.colors.base08})"; + font_color = "rgb(${colors.base05})"; + inner_color = "rgb(${colors.base00})"; + outer_color = "rgb(${colors.base0D})"; + check_color = "rgb(${colors.base0A})"; + fail_color = "rgb(${colors.base08})"; placeholder_text = "locked..."; fail_text = "wrong"; #placeholder_text = '\'Password...'\'; @@ -1205,8 +1217,8 @@ in { rounding = 12; #border_size = 3; size = "274, 50"; - color = "rgb(${config.lib.stylix.colors.base00})"; - border_color = "rgb(${config.lib.stylix.colors.base0D})"; + color = "rgb(${colors.base00})"; + border_color = "rgb(${colors.base0D})"; position = "0, 60"; halign = "center"; valign = "center"; @@ -1215,8 +1227,8 @@ in { rounding = 12; #border_size = 3; size = "274, 50"; - color = "rgb(${config.lib.stylix.colors.base00})"; - border_color = "rgb(${config.lib.stylix.colors.base0D})"; + color = "rgb(${colors.base00})"; + border_color = "rgb(${colors.base0D})"; position = "0, -60"; halign = "center"; valign = "center"; @@ -1229,8 +1241,8 @@ in { text_align = "center"; font_size = 16; font_family = "${config.stylix.fonts.serif.name}"; - outer_color = "rgb(${config.lib.stylix.colors.base00})"; - color = "rgb(${config.lib.stylix.colors.base05})"; + outer_color = "rgb(${colors.base00})"; + color = "rgb(${colors.base05})"; position = "0, 60"; halign = "center"; valign = "center"; @@ -1241,8 +1253,8 @@ in { text_align = "center"; font_size = 16; font_family = "${config.stylix.fonts.serif.name}"; - outer_color = "rgb(${config.lib.stylix.colors.base00})"; - color = "rgb(${config.lib.stylix.colors.base05})"; + outer_color = "rgb(${colors.base00})"; + color = "rgb(${colors.base05})"; position = "0, -60"; halign = "center"; valign = "center"; @@ -1251,7 +1263,7 @@ in { }; }; services.wlsunset = { - enable = true; + enable = false; latitude = "49.6"; longitude = "36.1"; temperature = { @@ -1268,6 +1280,7 @@ in { }; home.packages = with pkgs; [ brightnessctl + hyprsunset nautilus helvum loupe @@ -1361,6 +1374,14 @@ in { ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent"; }; }; + hyprsunset = mkGraphicalService { + Service = + graphicalService.Service + // { + Type = "simple"; + ExecStart = "${lib.getExe pkgs.hyprsunset} -t 6500"; + }; + }; }; }; }; diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 2a2ee4c..cc1f14b 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -27,7 +27,7 @@ in { copyq.enable = true; gnome-keyring = { enable = true; - components = ["secrets" "ssh"]; + components = ["secrets"]; }; udiskie = { enable = true; diff --git a/modules/home/programs/shell/oh-my-posh.nix b/modules/home/programs/shell/oh-my-posh.nix index 79815ff..13be465 100644 --- a/modules/home/programs/shell/oh-my-posh.nix +++ b/modules/home/programs/shell/oh-my-posh.nix @@ -16,7 +16,7 @@ in { settings = { version = 2; final_space = true; - console_title_template = "{{ .Shell }} in {{ .Folder }}"; + console_title_template = "{{ if .SSHSession }}[{{ .HostName }}] {{ end }}{{ .Shell }} in {{ .Folder }}"; blocks = [ { type = "prompt"; @@ -57,6 +57,15 @@ in { fetch_status = true; }; } + { + type = "session"; + style = "diamond"; + foreground = "white"; + background = "transparent"; + leading_diamond = ""; + trailing_diamond = ""; + template = "{{ if .SSHSession }} 󰢹 {{ .UserName }}@{{ .HostName }}{{ end }}"; + } ]; } { diff --git a/modules/nixos/desktop/hyprland.nix b/modules/nixos/desktop/hyprland.nix index 0757006..97220f6 100644 --- a/modules/nixos/desktop/hyprland.nix +++ b/modules/nixos/desktop/hyprland.nix @@ -1,4 +1,5 @@ { + perSystem, config, pkgs, lib, @@ -13,7 +14,11 @@ in { mkEnableOption "enable hyprland desktop"; }; config = mkIf cfg.enable { - programs.hyprland.enable = true; + programs.hyprland = { + enable = true; + package = perSystem.hyprland.hyprland; + portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland; + }; environment.systemPackages = with pkgs; [ brightnessctl gcr_4 @@ -44,9 +49,9 @@ in { }; xdg.portal = { enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-hyprland - xdg-desktop-portal-gtk + extraPortals = [ + perSystem.hyprland.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-gtk ]; config.common.default = [ "hyprland"