From cfa27ccec4ddda923b5f39592b009915d94782cb Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Tue, 21 May 2024 00:04:49 +0200 Subject: [PATCH] moved awesome and hyprland --- hosts/vali/mars/configuration.nix | 8 +- hosts/vali/mars/default.nix | 3 - modules/gui/default.nix | 2 +- modules/wms/wayland/niri/config.nix | 177 +++++++++--------- modules/wms/wayland/niri/default.nix | 20 +- .../wms/x}/awesome/awesome.nix | 0 modules/wms/x/default.nix | 0 options/desktop/fonts.nix | 27 ++- 8 files changed, 111 insertions(+), 126 deletions(-) rename {hosts/vali/mars => modules/wms/x}/awesome/awesome.nix (100%) create mode 100644 modules/wms/x/default.nix diff --git a/hosts/vali/mars/configuration.nix b/hosts/vali/mars/configuration.nix index d5672bd..16587e9 100644 --- a/hosts/vali/mars/configuration.nix +++ b/hosts/vali/mars/configuration.nix @@ -40,10 +40,10 @@ }; }; wms = { - wayland = { - enable = true; - hyprland.enable = true; - }; + wayland = { + enable = true; + hyprland.enable = true; + }; }; programs = { vesktop.enable = true; diff --git a/hosts/vali/mars/default.nix b/hosts/vali/mars/default.nix index 7a42f42..1e3d69e 100644 --- a/hosts/vali/mars/default.nix +++ b/hosts/vali/mars/default.nix @@ -4,8 +4,5 @@ _: { ./programs.nix ./hardware-configuration.nix ./profile.nix - ./awesome/awesome.nix - ./hyprland/hyprland.nix - ]; } diff --git a/modules/gui/default.nix b/modules/gui/default.nix index 3db7f19..0cdf222 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -4,7 +4,7 @@ _: { ./gtk.nix ./foot.nix ./mpv.nix -# ./kakoune + # ./kakoune ./qt.nix ./zathura.nix ./stylix.nix diff --git a/modules/wms/wayland/niri/config.nix b/modules/wms/wayland/niri/config.nix index 813ac45..d4bf43a 100644 --- a/modules/wms/wayland/niri/config.nix +++ b/modules/wms/wayland/niri/config.nix @@ -1,9 +1,4 @@ -{ - pkgs, - theme, - config, - ... -}: +{ pkgs, theme, config, ... }: with theme.colors; { programs.niri.settings = { outputs."eDP-1".position = { @@ -36,18 +31,18 @@ with theme.colors; { }; focus-follows-mouse = true; warp-mouse-to-focus = true; - trackpoint.accel-speed = 0.001; + trackpoint.accel-speed = 1.0e-3; }; layout = { gaps = 16; center-focused-column = "never"; preset-column-widths = [ - {proportion = 0.333;} - {proportion = 0.5;} - {proportion = 0.666;} + { proportion = 0.333; } + { proportion = 0.5; } + { proportion = 0.666; } ]; - default-column-width = {proportion = 0.5;}; + default-column-width = { proportion = 0.5; }; focus-ring = { enable = true; @@ -61,14 +56,14 @@ with theme.colors; { butter = { spring = { damping-ratio = 0.75; - epsilon = 0.00010; + epsilon = 1.0e-4; stiffness = 400; }; }; smooth = { spring = { damping-ratio = 0.58; - epsilon = 0.00010; + epsilon = 1.0e-4; stiffness = 735; }; }; @@ -81,87 +76,87 @@ with theme.colors; { window-close = smooth; }; - window-rules = [ - { - geometry-corner-radius = let radius =8.0; in{ - bottom-left = radius; - bottom-right = radius; - top-left = radius; - top-right = radius; + window-rules = [{ + geometry-corner-radius = let radius = 8.0; + in { + bottom-left = radius; + bottom-right = radius; + top-left = radius; + top-right = radius; }; - clip-to-geometry= true; - } - ]; + clip-to-geometry = true; + }]; - binds = with config.lib.niri.actions; let - sh = spawn "sh" "-c"; - in { - "Mod+Return" = { - action = spawn "${pkgs.foot}/bin/foot"; - cooldown-ms = 500; + binds = with config.lib.niri.actions; + let sh = spawn "sh" "-c"; + in { + "Mod+Return" = { + action = spawn "${pkgs.foot}/bin/foot"; + cooldown-ms = 500; + }; + "Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel"; + "Mod+V".action = sh + "${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; + "Mod+Shift+Period".action = spawn "emoji"; + + "XF86AudioRaiseVolume".action = spawn "pamixer" "-i" "5"; + "XF86AudioLowerVolume".action = spawn "pamixer" "-d" "5"; + "XF86AudioMute".action = spawn "pamixer" "-t"; + "XF86AudioMicMute".action = spawn "micmute"; + + "XF86MonBrightnessUp".action = spawn "brightnessctl" "set" "+5%"; + "XF86MonBrightnessDown".action = spawn "brightnessctl" "set" "5%-"; + + "Super+WheelScrollDown".action = focus-workspace-down; + "Super+WheelScrollDown".cooldown-ms = 500; + "Super+WheelScrollUp".action = focus-workspace-up; + "Super+WheelScrollUp".cooldown-ms = 500; + "Super+WheelScrollRight".action = focus-column-right; + "Super+WheelScrollLeft".action = focus-column-left; + + "Super+H".action = focus-column-left; + "Super+L".action = focus-column-right; + "Super+J".action = focus-workspace-down; + "Super+K".action = focus-workspace-up; + "Super+Left".action = focus-column-left; + "Super+Right".action = focus-column-right; + "Super+Down".action = focus-window-down; + "Super+Up".action = focus-window-up; + + "Super+Print".action = screenshot-window; + "Super+Shift+Print".action = screenshot-screen; + "Super+Shift+S".action = screenshot; + + "Super+Ctrl+H".action = move-column-left; + "Super+Ctrl+J".action = move-window-down; + "Super+Ctrl+K".action = move-window-up; + "Super+Ctrl+L".action = move-column-right; + + "Super+U".action = move-workspace-down; + "Super+I".action = move-workspace-up; + + "Super+Minus".action = set-column-width "-10%"; + "Super+Equal".action = set-column-width "+10%"; + "Super+Shift+Minus".action = set-window-height "-10%"; + "Super+Shift+Equal".action = set-window-height "+10%"; + + "Super+Shift+H".action = focus-monitor-left; + "Super+Shift+J".action = focus-monitor-down; + "Super+Shift+K".action = focus-monitor-up; + "Super+Shift+L".action = focus-monitor-right; + + "Super+Shift+Ctrl+H".action = move-column-to-monitor-left; + "Super+Shift+Ctrl+J".action = move-column-to-monitor-down; + "Super+Shift+Ctrl+K".action = move-column-to-monitor-up; + "Super+Shift+Ctrl+L".action = move-column-to-monitor-right; + + "Super+R".action = switch-preset-column-width; + "Super+F".action = maximize-column; + "Super+Shift+F".action = fullscreen-window; + "Super+C".action = center-column; + + "Mod+Q".action = close-window; }; - "Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel"; - "Mod+V".action = sh "${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; - "Mod+Shift+Period".action = spawn "emoji"; - - "XF86AudioRaiseVolume".action = spawn "pamixer" "-i" "5"; - "XF86AudioLowerVolume".action = spawn "pamixer" "-d" "5"; - "XF86AudioMute".action = spawn "pamixer" "-t"; - "XF86AudioMicMute".action = spawn "micmute"; - - "XF86MonBrightnessUp".action = spawn "brightnessctl" "set" "+5%"; - "XF86MonBrightnessDown".action = spawn "brightnessctl" "set" "5%-"; - - "Super+WheelScrollDown".action = focus-workspace-down; - "Super+WheelScrollDown".cooldown-ms = 500; - "Super+WheelScrollUp".action = focus-workspace-up; - "Super+WheelScrollUp".cooldown-ms = 500; - "Super+WheelScrollRight".action = focus-column-right; - "Super+WheelScrollLeft".action = focus-column-left; - - "Super+H".action = focus-column-left; - "Super+L".action = focus-column-right; - "Super+J".action = focus-workspace-down; - "Super+K".action = focus-workspace-up; - "Super+Left".action = focus-column-left; - "Super+Right".action = focus-column-right; - "Super+Down".action = focus-window-down; - "Super+Up".action = focus-window-up; - - "Super+Print".action = screenshot-window; - "Super+Shift+Print".action = screenshot-screen; - "Super+Shift+S".action = screenshot; - - "Super+Ctrl+H".action = move-column-left; - "Super+Ctrl+J".action = move-window-down; - "Super+Ctrl+K".action = move-window-up; - "Super+Ctrl+L".action = move-column-right; - - "Super+U".action = move-workspace-down; - "Super+I".action = move-workspace-up; - - "Super+Minus".action = set-column-width "-10%"; - "Super+Equal".action = set-column-width "+10%"; - "Super+Shift+Minus".action = set-window-height "-10%"; - "Super+Shift+Equal".action = set-window-height "+10%"; - - "Super+Shift+H".action = focus-monitor-left; - "Super+Shift+J".action = focus-monitor-down; - "Super+Shift+K".action = focus-monitor-up; - "Super+Shift+L".action = focus-monitor-right; - - "Super+Shift+Ctrl+H".action = move-column-to-monitor-left; - "Super+Shift+Ctrl+J".action = move-column-to-monitor-down; - "Super+Shift+Ctrl+K".action = move-column-to-monitor-up; - "Super+Shift+Ctrl+L".action = move-column-to-monitor-right; - - "Super+R".action = switch-preset-column-width; - "Super+F".action = maximize-column; - "Super+Shift+F".action = fullscreen-window; - "Super+C".action = center-column; - - "Mod+Q".action = close-window; - }; prefer-no-csd = true; hotkey-overlay.skip-at-startup = true; diff --git a/modules/wms/wayland/niri/default.nix b/modules/wms/wayland/niri/default.nix index 36730a5..6851bb2 100644 --- a/modules/wms/wayland/niri/default.nix +++ b/modules/wms/wayland/niri/default.nix @@ -1,17 +1,13 @@ -{ - pkgs, - lib, - theme, - ... -}: let +{ pkgs, lib, theme, ... }: +let mkService = lib.recursiveUpdate { - Unit.PartOf = ["graphical-session.target"]; - Unit.After = ["graphical-session.target"]; - Install.WantedBy = ["graphical-session.target"]; + Unit.PartOf = [ "graphical-session.target" ]; + Unit.After = [ "graphical-session.target" ]; + Install.WantedBy = [ "graphical-session.target" ]; }; in { -imports = [./config.nix]; - home.packages = with pkgs; [pamixer]; + imports = [ ./config.nix ]; + home.packages = with pkgs; [ pamixer ]; services = { wlsunset = { # TODO: fix opaque red screen issue @@ -32,7 +28,7 @@ imports = [./config.nix]; tray = { Unit = { Description = "Home Manager System Tray"; - Requires = ["graphical-session-pre.target"]; + Requires = [ "graphical-session-pre.target" ]; }; }; }; diff --git a/hosts/vali/mars/awesome/awesome.nix b/modules/wms/x/awesome/awesome.nix similarity index 100% rename from hosts/vali/mars/awesome/awesome.nix rename to modules/wms/x/awesome/awesome.nix diff --git a/modules/wms/x/default.nix b/modules/wms/x/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/options/desktop/fonts.nix b/options/desktop/fonts.nix index 1e94f84..19178f1 100644 --- a/options/desktop/fonts.nix +++ b/options/desktop/fonts.nix @@ -10,21 +10,18 @@ noto-fonts-emoji jetbrains-mono lexend - ]; - # What does this do? - enableDefaultPackages = false; + ]; + # What does this do? + enableDefaultPackages = false; - # this fixes emoji stuff - fontconfig = { - defaultFonts = { - monospace = [ - "JetBrainsMono Nerd Font" - "Noto Color Emoji" - ]; - sansSerif = ["Lexend" "Noto Color Emoji"]; - serif = ["Noto Serif" "Noto Color Emoji"]; - emoji = ["Noto Color Emoji"]; - }; + # this fixes emoji stuff + fontconfig = { + defaultFonts = { + monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ]; + sansSerif = [ "Lexend" "Noto Color Emoji" ]; + serif = [ "Noto Serif" "Noto Color Emoji" ]; + emoji = [ "Noto Color Emoji" ]; }; - } + }; + }; }