aboutsummaryrefslogtreecommitdiff
path: root/modules/user/desktop/sessions
diff options
context:
space:
mode:
authorRosa <rosaontheweb@proton.me>2026-08-09 01:21:53 -0400
committerRosa <rosaontheweb@proton.me>2026-08-09 01:21:53 -0400
commit983bfb52a200a94b17ad280e10eeeec7683affba (patch)
tree2e79cac1afdc640537b252a04f9af99f2bb3d968 /modules/user/desktop/sessions
parentafc0ab72138a6058a9ca98f2cbe13c21f88daa7d (diff)
start rewriterefactor
Diffstat (limited to 'modules/user/desktop/sessions')
-rw-r--r--modules/user/desktop/sessions/default.nix5
-rw-r--r--modules/user/desktop/sessions/sway.nix285
2 files changed, 0 insertions, 290 deletions
diff --git a/modules/user/desktop/sessions/default.nix b/modules/user/desktop/sessions/default.nix
deleted file mode 100644
index 47a721a..0000000
--- a/modules/user/desktop/sessions/default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- imports = [
- ./sway.nix
- ];
-}
diff --git a/modules/user/desktop/sessions/sway.nix b/modules/user/desktop/sessions/sway.nix
deleted file mode 100644
index 80a99d5..0000000
--- a/modules/user/desktop/sessions/sway.nix
+++ /dev/null
@@ -1,285 +0,0 @@
-{
- config,
- lib,
- options,
- pkgs,
- ...
-}:
-{
- config = {
- gtk.enable = lib.mkDefault config.desktop.sessions.sway.enable;
- home.packages = lib.mkIf config.desktop.sessions.sway.enable [
- # needed for various scripts
- pkgs.grim
- pkgs.jq
- pkgs.libnotify
- pkgs.slurp
- ];
-
- programs = {
- foot.enable = lib.mkDefault config.desktop.sessions.sway.enable;
- fuzzel.enable = lib.mkDefault config.desktop.sessions.sway.enable;
- librewolf.enable = lib.mkDefault config.desktop.sessions.sway.enable;
- swaylock = {
- enable = lib.mkDefault config.desktop.sessions.sway.enable;
- settings = {
- bs-hl-color = "f38ba8";
- caps-lock-bs-hl-color = "f38ba8";
- color = "000000";
- font = "Fira Code";
- font-size = config.desktop.defaultFontSize;
- image = "~/.local/share/wallpaper.png";
- indicator-caps-lock = true;
- inside-clear-color = "b4befe";
- inside-color = "1e1e2e";
- inside-ver-color = "f9e2af";
- inside-wrong-color = "f38ba8";
- key-hl-color = "585b70";
- line-caps-lock-color = "00000000";
- line-clear-color = "00000000";
- line-color = "00000000";
- line-ver-color = "00000000";
- line-wrong-color = "00000000";
- ring-clear-color = "b4befe";
- ring-color = "313244";
- ring-ver-color = "f9e2af";
- ring-wrong-color = "f38ba8";
- scaling = "fill";
- separator-color = "00000000";
- text-caps-lock-color = "cdd6f4";
- text-clear-color = "1e1e2e";
- text-color = "cdd6f4";
- text-ver-color = "1e1e2e";
- text-wrong-color = "1e1e2e";
- };
- };
-
- waybar.enable = lib.mkDefault config.desktop.sessions.sway.enable;
- };
-
- services.mako.enable = true;
- wayland.windowManager.sway = {
- enable = lib.mkDefault config.desktop.sessions.sway.enable;
- config = {
- bars = [ ];
- bindswitches =
- let
- display = "eDP-1";
- in
- {
- "lid:on" = {
- action = "output ${display} disable";
- locked = true;
- reload = true;
- };
-
- "lid:off" = {
- action = "output ${display} enable";
- locked = true;
- reload = true;
- };
- };
-
- colors = {
- focused = {
- background = "#cba6f7";
- border = "#cba6f7";
- childBorder = "#cba6f7";
- indicator = "#f5c2e7";
- text = "#1e1e2e";
- };
-
- focusedInactive = {
- background = "#585b70";
- border = "#585b70";
- childBorder = "#585b70";
- indicator = "#585b70";
- text = "#cdd6f4";
- };
-
- unfocused = {
- background = "#313244";
- border = "#313244";
- childBorder = "#313244";
- indicator = "#313244";
- text = "#a6adc8";
- };
-
- urgent = {
- background = "#f38ba8";
- border = "#f38ba8";
- childBorder = "#f38ba8";
- indicator = "#f38ba8";
- text = "#1e1e2e";
- };
- };
-
- defaultWorkspace = "workspace number 1";
- floating = {
- criteria = [
- # TODO
- ];
-
- titlebar = false;
- };
-
- focus.followMouse = false;
- fonts = {
- names = [ "Fira Code" ];
- size = 8.0;
- };
-
- gaps = {
- inner = 2;
- outer = 4;
- };
-
- input = {
- "*" = {
- accel_profile = "flat";
- };
-
- "type:keyboard" = {
- xkb_layout = "us,ca";
- xkb_options = "compose:rctrl";
- };
-
- "type:touchpad" = {
- drag = "enabled";
- dwt = "enabled";
- natural_scroll = "enabled";
- tap = "enabled";
- };
- };
-
- keybindings =
- let
- grim = "${pkgs.grim}/bin/grim";
- launcher = "${pkgs.fuzzel}/bin/fuzzel";
- mod = config.wayland.windowManager.sway.config.modifier;
- scripts = {
- screenshot = pkgs.writeShellScript "screenshot" (builtins.readFile ../scripts/screenshot.sh);
- switchkbdlayout = pkgs.writeShellScript "switchkbdlayout" (
- builtins.readFile ../scripts/switchkbdlayout.sh
- );
- };
- terminal = "${pkgs.foot}/bin/foot";
- in
- {
- "${mod}+Return" = "exec ${terminal}";
- "${mod}+R" = "exec ${launcher}";
- "${mod}+B" = "exec ${pkgs.librewolf}/bin/librewolf";
- "${mod}+Shift+S" = "exec ${scripts.screenshot}";
- "${mod}+Alt+L" = "exec ${pkgs.swaylock}/bin/swaylock";
- "${mod}+Alt+K" = "exec ${scripts.switchkbdlayout}";
- "${mod}+Alt+Q" = "exit";
- "${mod}+Q" = "kill";
- "${mod}+1" = "workspace 1";
- "${mod}+2" = "workspace 2";
- "${mod}+3" = "workspace 3";
- "${mod}+4" = "workspace 4";
- "${mod}+5" = "workspace 5";
- "${mod}+6" = "workspace 6";
- "${mod}+7" = "workspace 7";
- "${mod}+8" = "workspace 8";
- "${mod}+9" = "workspace 9";
- "${mod}+Shift+1" = "move workspace 1";
- "${mod}+Shift+2" = "move workspace 2";
- "${mod}+Shift+3" = "move workspace 3";
- "${mod}+Shift+4" = "move workspace 4";
- "${mod}+Shift+5" = "move workspace 5";
- "${mod}+Shift+6" = "move workspace 6";
- "${mod}+Shift+7" = "move workspace 7";
- "${mod}+Shift+8" = "move workspace 8";
- "${mod}+Shift+9" = "move workspace 9";
- "${mod}+F" = "floating toggle";
- "${mod}+H" = "focus left";
- "${mod}+J" = "focus down";
- "${mod}+K" = "focus up";
- "${mod}+L" = "focus right";
- "${mod}+Shift+H" = "move left";
- "${mod}+Shift+J" = "move down";
- "${mod}+Shift+K" = "move up";
- "${mod}+Shift+L" = "move right";
- "${mod}+Equal" = "resize grow width";
- "${mod}+Minus" = "resize shrink width";
- "${mod}+Shift+Equal" = "resize grow height";
- "${mod}+Shift+Minus" = "resize shrink height";
- "${mod}+P" = "focus parent";
- "${mod}+Shift+F" = "fullscreen";
- "${mod}+V" = "splitt";
- "${mod}+G" = "layout toggle tabbed split";
- "${mod}+S" = "sticky toggle";
- "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_SINK@ toggle";
- "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%- -l 1";
- "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%+ -l 1";
- "XF86MonBrightnessDown" = "exec brightnessctl --class=backlight s 5%-";
- "XF86MonBrightnessUp" = "exec brightnessctl --class=backlight s +5%";
- };
-
- modifier = "Mod4";
- output = {
- "eDP-1" = {
- bg = "#11111b solid_color";
- scale = "1.5";
- };
-
- "DP-1" = {
- bg = "#11111b solid_color";
- mode = "1920x1080@165Hz";
- pos = "0 0";
- };
-
- "DP-2" = {
- bg = "#11111b solid_color";
- mode = "1920x1080@75Hz";
- pos = "1920 0";
- };
- };
-
- seat."seat0".xcursor_theme = "catppuccin-mocha-dark-cursors 24";
- window = {
- commands = [
- {
- command = "floating enable";
- criteria = {
- class = "^Minecraft";
- };
- }
- ];
- titlebar = false;
- };
-
- workspaceOutputAssign = [
- {
- output = "eDP-1";
- workspace = "1";
- }
- {
- output = "DP-1";
- workspace = "1";
- }
- {
- output = "DP-2";
- workspace = "2";
- }
- ];
- };
-
- extraConfig = ''
- exec waybar
- '';
- };
-
- xdg.dataFile."wallpaper.png".enable = config.desktop.sessions.sway.enable;
- xdg.portal = {
- enable = true;
- config.common.default = "*";
- extraPortals = with pkgs; [
- xdg-desktop-portal-gtk
- ];
- };
- };
-
- options.desktop.sessions.sway.enable = lib.mkEnableOption "the sway window manager";
-}