From 5d211be17e64dbe6fa47005cfef52f274897b30b Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Wed, 26 Feb 2025 13:32:19 +0100 Subject: [PATCH] gunther hypr update --- gunther/hypr/catppuccin-macchiato.rasi | 111 ------------ gunther/hypr/hyprland.nix | 187 -------------------- gunther/hypr/hyprpaper.conf | 3 - gunther/leonv.nix | 12 +- modules/hyprland/default.nix | 34 ++-- {gunther/hypr => modules/hyprland}/start.sh | 0 6 files changed, 30 insertions(+), 317 deletions(-) delete mode 100755 gunther/hypr/catppuccin-macchiato.rasi delete mode 100755 gunther/hypr/hyprland.nix delete mode 100755 gunther/hypr/hyprpaper.conf rename {gunther/hypr => modules/hyprland}/start.sh (100%) mode change 100755 => 100644 diff --git a/gunther/hypr/catppuccin-macchiato.rasi b/gunther/hypr/catppuccin-macchiato.rasi deleted file mode 100755 index 696d769..0000000 --- a/gunther/hypr/catppuccin-macchiato.rasi +++ /dev/null @@ -1,111 +0,0 @@ -* { - bg-col: #24273a; - bg-col-light: #24273a; - border-col: #24273a; - selected-col: #24273a; - blue: #8aadf4; - fg-col: #cad3f5; - fg-col2: #ed8796; - grey: #6e738d; - - width: 600; - font: "JetBrainsMono Nerd Font 14"; -} - -element-text, element-icon , mode-switcher { - background-color: inherit; - text-color: inherit; -} - -window { - height: 360px; - border: 3px; - border-color: @border-col; - background-color: @bg-col; -} - -mainbox { - background-color: @bg-col; -} - -inputbar { - children: [prompt,entry]; - background-color: @bg-col; - border-radius: 5px; - padding: 2px; -} - -prompt { - background-color: @blue; - padding: 6px; - text-color: @bg-col; - border-radius: 3px; - margin: 20px 0px 0px 20px; -} - -textbox-prompt-colon { - expand: false; - str: ":"; -} - -entry { - padding: 6px; - margin: 20px 0px 0px 10px; - text-color: @fg-col; - background-color: @bg-col; -} - -listview { - border: 0px 0px 0px; - padding: 6px 0px 0px; - margin: 10px 0px 0px 20px; - columns: 2; - lines: 5; - background-color: @bg-col; -} - -element { - padding: 5px; - background-color: @bg-col; - text-color: @fg-col ; -} - -element-icon { - size: 25px; -} - -element selected { - background-color: @selected-col ; - text-color: @fg-col2 ; -} - -mode-switcher { - spacing: 0; - } - -button { - padding: 10px; - background-color: @bg-col-light; - text-color: @grey; - vertical-align: 0.5; - horizontal-align: 0.5; -} - -button selected { - background-color: @bg-col; - text-color: @blue; -} - -message { - background-color: @bg-col-light; - margin: 2px; - padding: 2px; - border-radius: 5px; -} - -textbox { - padding: 6px; - margin: 20px 0px 0px 20px; - text-color: @blue; - background-color: @bg-col-light; -} diff --git a/gunther/hypr/hyprland.nix b/gunther/hypr/hyprland.nix deleted file mode 100755 index 67e614f..0000000 --- a/gunther/hypr/hyprland.nix +++ /dev/null @@ -1,187 +0,0 @@ -{ pkgs, ... }: -{ - services.hyprpaper.enable = true; - # hyprland setup - wayland.windowManager.hyprland = { - enable = true; - xwayland.enable = true; - settings = { - ecosystem = { - no_donation_nag = true; - }; - workspace = [ - "1, monitor:HDMI-A-1, default:true, persistent:true" - "2, monitor:DP-1 , default:true, persistent:true" - "special:scratchpad , on-created-empty:foot" - ]; - monitor = [ - "DP-1 , 2560x1440@144, 1920x0, 1" - "HDMI-A-1, 1920x1080@75 , 0x0 , 1" - ]; - input = { - kb_layout = "de"; - kb_variant = "us"; - follow_mouse = 1; - }; - "$mod" = "SUPER"; - "$modd" = "SUPER_SHIFT"; - general = { - gaps_in = 8; - gaps_out = 15; - border_size = 3; - - resize_on_border = true; - layout = "dwindle"; - - "col.active_border" = "rgba(cba6f7ff) rgba(89b4faff) rgba(94e2d5ff) 10deg"; - "col.inactive_border" = "0xff45475a"; - "col.nogroup_border" = "0xff89dceb"; - "col.nogroup_border_active" = "0xfff9e2af"; - }; - decoration = { - blur = { - new_optimizations = true; - size = 1; - passes = 1; - }; - shadow = { - enabled = true; - range = 100; - render_power = 5; - color = "0x33000000"; - color_inactive = "0x22000000"; - }; - rounding = 15; - }; - animations = { - enabled = 1; - bezier = "overshot,0.13,0.99,0.29,1.1"; - animation = [ - "windows,1,4,overshot,slide" - "border,1,10,default" - "fade,1,10,default" - "workspaces,1,6,overshot,slidevert" - ]; - }; - misc = { - disable_hyprland_logo = true; - }; - bind = [ - # opening programs - "$mod, Return, exec, foot" - "$mod, D, exec, tofi-drun | xargs hyprctl dispatch exec --" - "$mod, M, exit, " - "$mod, Q, killactive, " - - # moving around - "$mod, left , movefocus, l" - "$mod, right, movefocus, r" - "$mod, down , movefocus, d" - "$mod, up , movefocus, u" - - # moving windows - "$modd, left , movewindow, l" - "$modd, right, movewindow, r" - "$modd, down , movewindow, d" - "$modd, up , movewindow, u" - - # workspaces - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$modd, 1, movetoworkspacesilent, 1" - "$modd, 2, movetoworkspacesilent, 2" - "$modd, 3, movetoworkspacesilent, 3" - "$modd, 4, movetoworkspacesilent, 4" - "$modd, 5, movetoworkspacesilent, 5" - "$modd, 6, movetoworkspacesilent, 6" - - # fullscreen - "$mod, F11, fullscreen, 0" - # "$mod, m, fullscreen, 1" # maximize - - # floating - "$mod, F, togglefloating, active" - - # screenshot - ", Print, exec, grimblast copysave area $HOME\"/screenshots/\"$(date +'%F-%T.png');" - - # scratchpad - "$mod, C, togglespecialworkspace, scratchpad" - - # status bar - "$mod, T, exec, eww open --toggle top-bar" - ]; - bindm = [ - "$mod, mouse:272, movewindow" - ]; - bindle = [ - ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-" - ", XF86AudioMute, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%" - ]; - exec-once = [ - "bash ~/Git/nixos/gunther/hypr/start.sh" - "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" - ]; - }; - }; - - # tell electron to use wayland - home.sessionVariables.NIXOS_OZONE_WL = "1"; - - # terminal - programs.foot = { - enable = true; - settings = { - main = { - font = "monospace:size=12"; - dpi-aware = "yes"; - }; - colors = { - foreground = "cad3f5"; - background = "24273a"; - regular0 = "494d64"; - regular1 = "ed8796"; - regular3 = "eed49f"; - regular4 = "8aadf4"; - regular5 = "f5bde6"; - regular6 = "8bd5ca"; - regular7 = "b8c0e0"; - bright0 = "5b6078"; - bright1 = "ed8796"; - bright3 = "eed49f"; - bright4 = "8aadf4"; - bright5 = "f5bde6"; - bright6 = "8bd5ca"; - bright7 = "a5adcb"; - }; - }; - }; - - services.mako = { - enable = true; - extraConfig = '' - background-color=#24273a - text-color=#cad3f5 - border-color=#8aadf4 - progress-color=over #363a4f - sort=-time - layer=overlay - width=300 - height=110 - border-size=2 - border-radius=15 - max-icon-size=64 - default-timeout=5000 - ignore-timeout=1 - - [urgency=high] - border-color=#f5a97f - ''; - }; - -} diff --git a/gunther/hypr/hyprpaper.conf b/gunther/hypr/hyprpaper.conf deleted file mode 100755 index a2ea3d5..0000000 --- a/gunther/hypr/hyprpaper.conf +++ /dev/null @@ -1,3 +0,0 @@ -preload = ~/Git/nixos/gunther/hypr/wallpaper.jpg -wallpaper = monitor1,~/Git/nixos/gunther/hypr/wallpaper.jpg -wallpaper = monitor2,~/Git/nixos/gunther/hypr/wallpaper.jpg diff --git a/gunther/leonv.nix b/gunther/leonv.nix index 3e3d0dc..74df1ac 100755 --- a/gunther/leonv.nix +++ b/gunther/leonv.nix @@ -17,10 +17,19 @@ enable = true; wallpaper = ./wallpaper.jpg; }; + monitor = [ + "DP-1 , 2560x1440@144, 1920x0, 1" + "HDMI-A-1, 1920x1080@75 , 0x0 , 1" + ]; + workspace = [ + "1, monitor:HDMI-A-1, default:true, persistent:true" + "2, monitor:DP-1 , default:true, persistent:true" + "special:scratchpad , on-created-empty:foot" + ]; }; home.packages = with pkgs; [ - go + prismlauncher # theme for gtk applications orchis-theme (catppuccin-gtk.override { @@ -65,6 +74,7 @@ zotero # development + go jetbrains.idea-ultimate gnumake ghostscript diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index 6d64e66..a7cbf11 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -11,8 +11,22 @@ in # monitor setup monitor = mkOption { type = listOf str; - description = ''''; - example = ''''; + description = ''Monitor setup''; + example = ''[ + "DP-1 , 2560x1440@144, 1920x0, 1" + "HDMI-A-1, 1920x1080@75 , 0x0 , 1" + ];''; + }; + + # workspaces + workspace = mkOption { + type = listOf str; + description = ''Workspace setup''; + example = ''[ + "1, monitor:HDMI-A-1, default:true, persistent:true" + "2, monitor:DP-1 , default:true, persistent:true" + "special:scratchpad , on-created-empty:foot" + ];''; }; # hyprpaper @@ -31,9 +45,6 @@ in }; }; - # TODO expose monitor setup - - # TODO expose color scheme / add OLED mode! # TODO start script @@ -54,15 +65,8 @@ in ecosystem = { no_donation_nag = true; }; - workspace = [ - "1, monitor:HDMI-A-1, default:true, persistent:true" - "2, monitor:DP-1 , default:true, persistent:true" - "special:scratchpad , on-created-empty:foot" - ]; - monitor = [ - "DP-1 , 2560x1440@144, 1920x0, 1" - "HDMI-A-1, 1920x1080@75 , 0x0 , 1" - ]; + workspace = cfg.workspace; + monitor = cfg.monitor; input = { kb_layout = "de"; kb_variant = "us"; @@ -169,7 +173,7 @@ in ", XF86AudioMute, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%" ]; exec-once = [ - "bash ~/Git/nixos/gunther/hypr/start.sh" + "bash ~/Git/nixos/modules/hyprland/start.sh" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" ]; }; diff --git a/gunther/hypr/start.sh b/modules/hyprland/start.sh old mode 100755 new mode 100644 similarity index 100% rename from gunther/hypr/start.sh rename to modules/hyprland/start.sh