From c7581ba6e1a94c9b4c33268379969f3d37328c78 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 8 Dec 2024 22:16:10 -0500 Subject: [PATCH] tree-wide: drop sway (#194) --- README.md | 2 - homeManagerModules/apps/nemo/default.nix | 6 +- homeManagerModules/desktop/default.nix | 2 - homeManagerModules/desktop/sway/README.md | 157 ---------- homeManagerModules/desktop/sway/default.nix | 21 -- homeManagerModules/desktop/sway/scripts.nix | 21 -- homeManagerModules/desktop/sway/settings.nix | 293 ------------------ .../desktop/wayland/default.nix | 3 +- homeManagerModules/options.nix | 11 +- homeManagerModules/services/default.nix | 1 - .../services/gammastep/default.nix | 4 +- homeManagerModules/services/mako/default.nix | 4 +- .../services/pipewire-inhibit/default.nix | 4 +- .../services/randomWallpaper/default.nix | 4 +- .../services/swayidle/default.nix | 76 ----- .../services/swayosd/default.nix | 4 +- .../services/waybar/default.nix | 43 +-- homeManagerModules/theme.nix | 2 +- homes/aly/windowManagers/default.nix | 56 ---- homes/aly/windowManagers/laptop.nix | 14 - homes/dustin/default.nix | 18 -- hosts/fallarbor/home.nix | 2 - hosts/lavaridge/home.nix | 7 - hosts/mauville/home.nix | 1 - hosts/petalburg/home.nix | 7 - hosts/rustboro/home.nix | 2 - nixosModules/desktop/default.nix | 2 - nixosModules/desktop/sway/default.nix | 12 - nixosModules/desktop/waylandComp.nix | 25 +- nixosModules/options.nix | 1 - 30 files changed, 23 insertions(+), 782 deletions(-) delete mode 100644 homeManagerModules/desktop/sway/README.md delete mode 100644 homeManagerModules/desktop/sway/default.nix delete mode 100644 homeManagerModules/desktop/sway/scripts.nix delete mode 100644 homeManagerModules/desktop/sway/settings.nix delete mode 100644 homeManagerModules/services/swayidle/default.nix delete mode 100644 nixosModules/desktop/sway/default.nix diff --git a/README.md b/README.md index 6ee1ea21..08983b2a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ This flake takes a variety of upstream and third party flakes as inputs: - [lanzaboote](https://github.com/nix-community/lanzaboote): secure boot for NixOS. - [nur](https://github.com/nix-community/NUR): extra packages from the nix user repository. - [stylix](https://github.com/danth/stylix): system-wide color schemes and typography. -- [sway](https://github.com/swaywm/sway): fantastic, rock-solid tiling compositor for wayland. ## Outputs @@ -37,7 +36,6 @@ This flake takes a variety of upstream and third party flakes as inputs: - nixosModules.nixos: opinionated desktop, app, and service options. - nixosModules.users: basic user configuration options. - overlays.default: adds every package output to nixpkgs. -- overlays.rofi-bluetooth: overlays rofi-bluetooth with custom patches. - overlays.tablet: tablet optimizations, mainly for electron apps. In addition, this flake outputs NixOS configurations, home-manager configurations, and various hardware modules for all of my hosts and users. diff --git a/homeManagerModules/apps/nemo/default.nix b/homeManagerModules/apps/nemo/default.nix index b0c11f98..84a91053 100644 --- a/homeManagerModules/apps/nemo/default.nix +++ b/homeManagerModules/apps/nemo/default.nix @@ -23,14 +23,14 @@ "org/nemo/preferences/menu-config" = { background-menu-open-as-root = - !(config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable); + !(config.ar.home.desktop.hyprland.enable); selection-menu-open-as-root = - !(config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable); + !(config.ar.home.desktop.hyprland.enable); }; "org/nemo/plugins".disabled-actions = lib.optionals - (config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable) [ + (config.ar.home.desktop.hyprland.enable) [ "90_new-launcher.nemo_action" "add-desklets.nemo_action" "change-background.nemo_action" diff --git a/homeManagerModules/desktop/default.nix b/homeManagerModules/desktop/default.nix index 34527630..1f84ff7f 100644 --- a/homeManagerModules/desktop/default.nix +++ b/homeManagerModules/desktop/default.nix @@ -9,7 +9,6 @@ ./gnome ./hyprland ./kde - ./sway ./wayland ]; @@ -18,7 +17,6 @@ config.ar.home.desktop.gnome.enable || config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.kde.enable - || config.ar.home.desktop.sway.enable ) { dconf = { enable = true; diff --git a/homeManagerModules/desktop/sway/README.md b/homeManagerModules/desktop/sway/README.md deleted file mode 100644 index e87c1818..00000000 --- a/homeManagerModules/desktop/sway/README.md +++ /dev/null @@ -1,157 +0,0 @@ -# Sway - -## Features - -- Clamshell mode for laptops -- Default apps + theme integration -- Random wallpapers that cycle every 15 minutes -- Slick looks -- swayfx support - -## Desktop Utilities - -- Bluetooth: [blueberry.py](https://github.com/linuxmint/blueberry). -- Idle daemon: [swayidle](https://github.com/swaywm/swayidle). -- Launcher [rofi-wayland](https://github.com/lbonn/rofi). -- Notifications: [mako](https://github.com/emersion/mako). -- Panel: [waybar](https://github.com/Alexays/Waybar). -- Polkit: [mate-polkit](https://github.com/mate-desktop/mate-polkit). -- Wallpapers: [swaybg](https://github.com/swaywm/swaybg). -- WiFi: [networkmanager-dmenu](https://github.com/firecat53/networkmanager-dmenu). - -## Keybindings - -### Launching Apps - -- SUPER + B: Open Browser. -- SUPER + E: Open Text Editor. -- SUPER + F: Open File Manager. -- SUPER + R: Open Launcher. -- SUPER + T: Open Terminal. - -### Screenshots - -- PRINT // CTRL + F12: Take screenshot of monitor or selected area. - -### Session Control - -- SUPER CTRL + L: Lock screen. -- SUPER + M: Logout/shutdown dialog. - -### Workspaces - -#### Switching Workspaces - -- SUPER + {1..9}: Switch to numbered workspace. -- SUPER + Comma: Switch to previous numbered workspace. -- SUPER + Period: Switch to next numbered workspace. -- TOUCHPAD: 3 Finger Swipe Left/Up or Right/Down. - -#### Multi-Monitor Workspace Management - -- SUPER CTRL SHIFT + Down: Move current workspace to monitor below. -- SUPER CTRL SHIFT + Up: Move current workspace to monitor above. -- SUPER CTRL SHIFT + Left: Move current workspace to monitor left. -- SUPER CTRL SHIFT + Right: Move current workspace to monitor right. - -______________________________________________________________________ - -- SUPER CTRL SHIFT + J: Move current workspace to monitor below. -- SUPER CTRL SHIFT + K: Move current workspace to monitor above. -- SUPER CTRL SHIFT + H: Move current workspace to monitor left. -- SUPER CTRL SHIFT + L: Move current workspace to monitor right. - -### Window Management - -- SUPER + C: Kill focused window. -- SUPER + F11: Show/hide top panel. -- SUPER + V: Toggle floating window. -- SUPER SHIFT + Backslash: Toggle vertical/horizontal splits. -- SUPER SHIFT + G: Toggle tabbed layout. -- SUPER SHIFT + TAB: Open Window list. -- SUPER SHIFT + W: Toggle fullscreen. - -#### Focus - -- SUPER + Down: Change focus down. -- SUPER + Up: Change focus up. -- SUPER + Left: Change focus left. -- SUPER + Right: Change focus right. - -______________________________________________________________________ - -- SUPER + J: Change focus down. -- SUPER + K: Change focus up. -- SUPER + H: Change focus left. -- SUPER + L: Change focus right. - -#### Movement - -- SUPER SHIFT + Down: Move window down. -- SUPER SHIFT + Up: Move window up. -- SUPER SHIFT + Left: Move window left. -- SUPER SHIFT + Right: Move window right. - -______________________________________________________________________ - -- SUPER SHIFT + J: Move window down. -- SUPER SHIFT + K: Move window up. -- SUPER SHIFT + H: Move window left. -- SUPER SHIFT + L: Move window right. - -#### Moving between Workspaces - -- SUPER SHIFT + {1..9}: Move to specified numbered workspace. -- SUPER SHIFT + Comma: Move to previous numbered workspace. -- SUPER SHIFT + Period: Move to next numbered workspace. - -#### Scratchpad - -- SUPER + S: Switch to scratchpad (overlay). -- SUPER SHIFT + S: Move window to scratchpad. - -### Modes - -These modes provide special submaps where you are free to use various key binds without pressing the full key combo, because certain keys are assumed. - -#### Resize Mode - -- CTRL ALT + R: Enter resize mode. - - - Down: Resize active window (0,10). - - Up: Resize active window (0,-10) - - Left: Resize active window (-10,0). - - Right: Resize active window (10,0). - - ______________________________________________________________________ - - - J: Resize active window (0,10). - - K: Resize active window (0,-10) - - H: Resize active window (-10,0). - - L: Resize active window (10,0). - -- ESCAPE: Exit resize mode. - -#### Move Mode - -- CTRL ALT + M: Enter move mode. - - - {1..0}: Move to numbered workspace. - - Comma: Move to previous numbered workspace. - - Period: Move to next numbered workspace. - - ______________________________________________________________________ - - - Down: Move window down. - - Up: Move window up. - - Left: Move window left. - - Right: Move window right. - - ______________________________________________________________________ - - - J: Move window down. - - K: Move window up. - - H: Move window left. - - L: Move window right. - -- ESCAPE: Exit move mode. diff --git a/homeManagerModules/desktop/sway/default.nix b/homeManagerModules/desktop/sway/default.nix deleted file mode 100644 index 010829bd..00000000 --- a/homeManagerModules/desktop/sway/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - config = lib.mkIf config.ar.home.desktop.sway.enable { - ar.home.theme.gtk.hideTitleBar = - if config.wayland.windowManager.sway.package == pkgs.swayfx - then false - else true; - - wayland.windowManager.sway = import ./settings.nix {inherit config lib pkgs;}; - - xdg.portal = { - enable = true; - configPackages = [pkgs.xdg-desktop-portal-wlr]; - extraPortals = [pkgs.xdg-desktop-portal-wlr]; - }; - }; -} diff --git a/homeManagerModules/desktop/sway/scripts.nix b/homeManagerModules/desktop/sway/scripts.nix deleted file mode 100644 index aa7fba41..00000000 --- a/homeManagerModules/desktop/sway/scripts.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - swaymsg = lib.getExe' config.wayland.windowManager.sway.package "swaymsg"; -in { - clamshell = pkgs.writeShellScript "sway-clamshell" '' - docked() { - [ "$(${swaymsg} -t get_outputs | ${lib.getExe pkgs.jq} '. | length')" -ne 1 ] && return 0 - return 1 - } - - if [ "$1" == "on" ]; then - docked && swaymsg output eDP-1 disable - elif [ "$1" == "off" ]; then - swaymsg output eDP-1 enable - fi - ''; -} diff --git a/homeManagerModules/desktop/sway/settings.nix b/homeManagerModules/desktop/sway/settings.nix deleted file mode 100644 index fca99f3f..00000000 --- a/homeManagerModules/desktop/sway/settings.nix +++ /dev/null @@ -1,293 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.ar.home; - focused = config.lib.stylix.colors.withHashtag.base0D; - helpers = import ../wayland/helpers.nix {inherit config lib pkgs;}; - modifier = "Mod4"; - scripts = import ./scripts.nix {inherit config lib pkgs;}; - unfocused = config.lib.stylix.colors.withHashtag.base03; - urgent = config.lib.stylix.colors.withHashtag.base08; -in { - enable = true; - checkConfig = false; - wrapperFeatures.gtk = true; - - systemd = { - enable = true; - - extraCommands = lib.mkDefault [ - "systemctl --user stop sway-session.target" - "systemctl --user start sway-session.target" - ]; - - variables = ["--all"]; - }; - - config = { - bars = []; - modifier = modifier; - - colors = { - focused.indicator = lib.mkForce focused; - focusedInactive.indicator = lib.mkForce unfocused; - placeholder.indicator = lib.mkForce unfocused; - unfocused.indicator = lib.mkForce unfocused; - urgent.indicator = lib.mkForce urgent; - }; - - defaultWorkspace = "workspace number 1"; - - floating.criteria = [ - {app_id = ".blueman-manager-wrapped";} - {app_id = "blueberry.py";} - {app_id = "com.github.wwmm.easyeffects";} - {app_id = "nm-connection-editor";} - {app_id = "pavucontrol";} - {app_id = "solaar";} - {title = "Open File";} - {title = "Open Folder";} - {window_role = "bubble";} - {window_role = "dialog";} - {window_role = "pop-up";} - {window_type = "dialog";} - ]; - - focus = { - followMouse = "always"; - newWindow = "focus"; - }; - - gaps = { - inner = 5; - outer = 6; - }; - - input = { - "type:touchpad" = { - click_method = "clickfinger"; - dwt = "enabled"; - natural_scroll = "enabled"; - scroll_method = "two_finger"; - tap = "enabled"; - tap_button_map = "lrm"; - }; - - "type:keyboard" = { - xkb_layout = "us"; - xkb_variant = "altgr-intl"; - }; - }; - - keybindings = - { - "${modifier}+B" = "exec ${lib.getExe cfg.defaultApps.webBrowser}"; - "${modifier}+C" = "kill"; - "${modifier}+Comma" = "workspace prev"; - "${modifier}+Control+L" = "exec ${lib.getExe' pkgs.systemd "loginctl"} lock-session"; - "${modifier}+E" = "exec ${lib.getExe cfg.defaultApps.editor}"; - "${modifier}+F" = "exec ${lib.getExe cfg.defaultApps.fileManager}"; - "${modifier}+F11" = "exec pkill -SIGUSR1 waybar"; # Show/hide waybar - "${modifier}+M" = ''exec ${lib.getExe config.programs.rofi.package} -show power-menu -modi "power-menu:${lib.getExe pkgs.rofi-power-menu} --choices=logout/lockscreen/suspend/shutdown/reboot"''; - "${modifier}+Period" = "workspace next"; - "${modifier}+R" = "exec ${lib.getExe config.programs.rofi.package} -show combi"; - "${modifier}+S" = "scratchpad show"; - "${modifier}+Shift+Backslash" = "layout toggle split"; - "${modifier}+Shift+Comma" = "move container to workspace prev; workspace prev"; - "${modifier}+Shift+G" = "layout toggle splitv tabbed"; - "${modifier}+Shift+Period" = "move container to workspace next; workspace next"; - "${modifier}+Shift+R" = "exec ${lib.getExe config.programs.rofi.package} -show run"; - "${modifier}+Shift+S" = "move scratchpad"; - "${modifier}+Shift+Tab" = "exec ${lib.getExe config.programs.rofi.package} -show window"; - "${modifier}+Shift+V" = "floating toggle"; - "${modifier}+Shift+W" = "fullscreen toggle"; - "${modifier}+T" = "exec ${lib.getExe cfg.defaultApps.terminal}"; - "Control+F12" = "exec ${helpers.screenshot}"; - "Ctrl+Mod1+M" = "mode move"; - "Ctrl+Mod1+R" = "mode resize"; - "PRINT" = "exec ${helpers.screenshot}"; - } - // builtins.listToAttrs ( - builtins.concatMap (workspace: [ - { - name = "${modifier}+${toString workspace}"; - value = "workspace number ${toString workspace}"; - } - { - name = "${modifier}+Shift+${toString workspace}"; - value = "move container to workspace number ${toString workspace}; workspace ${toString workspace}"; - } - ]) [1 2 3 4 5 6 7 8 9] - ) - // lib.attrsets.concatMapAttrs - (key: direction: { - "${modifier}+${key}" = "focus ${direction}"; - "${modifier}+Shift+${key}" = "move ${direction}"; - "${modifier}+Control+Shift+${key}" = "move workspace to output ${direction}"; - }) - cfg.desktop.windowManagerBinds; - - modes = { - move = - { - Comma = "move container to workspace prev; workspace prev"; - Escape = "mode default"; - Period = "move container to workspace next; workspace next"; - S = "move scratchpad"; - } - // builtins.listToAttrs ( - builtins.concatMap (workspace: [ - { - name = toString workspace; - value = "move container to workspace number ${toString workspace}; workspace ${toString workspace}"; - } - ]) [1 2 3 4 5 6 7 8 9] - ) - // lib.attrsets.concatMapAttrs - (key: direction: {"${key}" = "move ${direction}";}) - cfg.desktop.windowManagerBinds; - - resize = { - Escape = "mode default"; - Left = "resize shrink width 10 px"; - Down = "resize grow height 10 px"; - Up = "resize shrink height 10 px"; - Right = "resize grow width 10 px"; - }; - }; - - startup = [ - {command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";} - {command = lib.getExe pkgs.autotiling;} - ]; - - window = { - titlebar = false; - - commands = [ - { - command = "border pixel 4"; # Workaround for libadwaita + CSD apps not having borders when floating. - criteria = {all = true;}; - } - { - command = "floating enable; sticky toggle; resize 35ppt 10ppt"; - criteria = { - title = "^Picture-in-Picture$"; - app_id = "firefox"; - }; - } - { - command = "focus; sticky toggle"; - criteria = {app_id = "gcr-prompter";}; - } - { - command = "focus; sticky toggle"; - criteria = {app_id = "polkit-gnome-authentication-agent-1";}; - } - { - command = "floating enable; resize set 40ppt 20ppt; move position center"; - criteria = {title = "File Operation Progress";}; - } - { - command = "resize set 40ppt 60ppt; move position center"; - criteria = {title = "Open Folder";}; - } - { - command = "resize set 40ppt 60ppt; move position center"; - criteria = {title = "Open File";}; - } - { - command = "resize set 40ppt 60ppt; move position center"; - criteria = {app_id = "blueberry.py";}; - } - { - command = "resize set 60ppt 80ppt; move position center"; - criteria = {app_id = "solaar";}; - } - { - command = "resize set 40ppt 60ppt; move position center"; - criteria = {app_id = ".blueman-manager-wrapped";}; - } - { - command = "resize set 40ppt 60ppt; move position center"; - criteria = {app_id = "nm-connection-editor";}; - } - { - command = "resize set 40ppt 60ppt; move position center"; - criteria = {app_id = "pavucontrol";}; - } - ]; - }; - - workspaceAutoBackAndForth = true; - }; - - extraConfig = - '' - bindsym --locked XF86MonBrightnessUp exec ${helpers.brightness.up} - bindsym --locked XF86MonBrightnessDown exec ${helpers.brightness.down} - bindsym --locked XF86AudioRaiseVolume exec ${helpers.volume.up} - bindsym --locked XF86AudioLowerVolume exec ${helpers.volume.down} - bindsym --locked XF86AudioMute exec ${helpers.volume.mute} - bindsym --locked XF86AudioMicMute exec ${helpers.volume.micMute} - bindsym --locked XF86AudioPlay exec ${helpers.media.play} - bindsym --locked XF86AudioPrev exec ${helpers.media.prev} - bindsym --locked XF86AudioNext exec ${helpers.media.next} - - mode "move" { - bindgesture pinch:inward+down move down - bindgesture pinch:inward+left move left - bindgesture pinch:inward+right move right - bindgesture pinch:inward+up move up - bindgesture swipe:down move container to workspace prev; workspace prev - bindgesture swipe:left move container to workspace next; workspace next - bindgesture swipe:right move container to workspace prev; workspace prev - bindgesture swipe:up move container to workspace next; workspace next - } - - bindgesture swipe:down workspace prev - bindgesture swipe:left workspace next - bindgesture swipe:right workspace prev - bindgesture swipe:up workspace next - - bindswitch --reload --locked lid:on exec ${scripts.clamshell} on - bindswitch --reload --locked lid:off exec ${scripts.clamshell} off - - default_border pixel 4 - default_floating_border pixel 4 - '' - + lib.strings.optionalString (config.wayland.windowManager.sway.package - == pkgs.swayfx) '' - blur enable - blur_passes 2 - blur_radius 8 - - # corner_radius ${toString cfg.theme.borders.radius} - shadow_blur_radius 8 - shadow_color ${config.lib.stylix.colors.withHashtag.base00} - shadow_offset 4 4 - shadows enable - shadows_on_csd disable - - default_dim_inactive 0.05 - - layer_effects gtk-layer-shell blur enable - layer_effects gtk-layer-shell blur_ignore_transparent enable - layer_effects launcher blur enable - layer_effects launcher blur_ignore_transparent enable - layer_effects logout_dialog blur enable - layer_effects notifications blur enable - layer_effects notifications blur_ignore_transparent enable - layer_effects rofi blur enable - layer_effects rofi blur_ignore_transparent enable - layer_effects swaybar blur enable - layer_effects swaybar blur_ignore_transparent enable - layer_effects swayosd blur enable - layer_effects swayosd blur_ignore_transparent enable - layer_effects waybar blur enable - layer_effects waybar blur_ignore_transparent enable - ''; -} diff --git a/homeManagerModules/desktop/wayland/default.nix b/homeManagerModules/desktop/wayland/default.nix index bfd29e04..d29e2c7a 100644 --- a/homeManagerModules/desktop/wayland/default.nix +++ b/homeManagerModules/desktop/wayland/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - config = lib.mkIf (config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable) { + config = lib.mkIf (config.ar.home.desktop.hyprland.enable) { ar.home = { apps = { kitty.enable = lib.mkDefault true; @@ -16,7 +16,6 @@ hypridle.enable = lib.mkDefault config.ar.home.desktop.hyprland.enable; mako.enable = lib.mkDefault true; pipewire-inhibit.enable = lib.mkDefault true; - swayidle.enable = lib.mkDefault config.ar.home.desktop.sway.enable; swayosd.enable = lib.mkDefault true; waybar.enable = lib.mkDefault true; }; diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index f622cddb..849f6f55 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -96,7 +96,7 @@ in { desktop = { autoSuspend = lib.mkOption { description = "Whether to autosuspend on idle."; - default = cfg.desktop.hyprland.enable || cfg.desktop.sway.enable; + default = cfg.desktop.hyprland.enable; type = lib.types.bool; }; @@ -142,14 +142,6 @@ in { type = lib.types.bool; }; - sway = { - enable = lib.mkOption { - description = "Sway with full desktop session components."; - default = osConfig.ar.desktop.sway.enable; - type = lib.types.bool; - }; - }; - windowManagerBinds = lib.mkOption { description = "Default binds for window management."; @@ -201,7 +193,6 @@ in { pipewire-inhibit.enable = lib.mkEnableOption "Inhibit idle when audio is playing with Pipewire."; randomWallpaper.enable = lib.mkEnableOption "Lightweight swaybg-based random wallpaper daemon."; - swayidle.enable = lib.mkEnableOption "Swayidle idle daemon."; swayosd.enable = lib.mkEnableOption "OSD for brightness and volume keys."; waybar.enable = lib.mkEnableOption "Waybar wayland panel."; }; diff --git a/homeManagerModules/services/default.nix b/homeManagerModules/services/default.nix index 839d52e4..d8cd77f5 100644 --- a/homeManagerModules/services/default.nix +++ b/homeManagerModules/services/default.nix @@ -7,7 +7,6 @@ ./mpd ./pipewire-inhibit ./randomWallpaper - ./swayidle ./swayosd ./waybar ]; diff --git a/homeManagerModules/services/gammastep/default.nix b/homeManagerModules/services/gammastep/default.nix index 62fc4824..1a9e853e 100644 --- a/homeManagerModules/services/gammastep/default.nix +++ b/homeManagerModules/services/gammastep/default.nix @@ -13,9 +13,9 @@ in { }; systemd.user.services.gammastep = { - Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"); + Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"); Service.Restart = lib.mkForce "no"; - Unit.BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"; + Unit.BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"; }; }; } diff --git a/homeManagerModules/services/mako/default.nix b/homeManagerModules/services/mako/default.nix index a9c8924d..a36a6511 100644 --- a/homeManagerModules/services/mako/default.nix +++ b/homeManagerModules/services/mako/default.nix @@ -36,7 +36,7 @@ in { systemd.user.services.mako = { Unit = { After = "graphical-session.target"; - BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"; + BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"; Description = "Lightweight Wayland notification daemon"; Documentation = "man:mako(1)"; PartOf = "graphical-session.target"; @@ -51,7 +51,7 @@ in { Type = "dbus"; }; - Install.WantedBy = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"; + Install.WantedBy = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"; }; }; } diff --git a/homeManagerModules/services/pipewire-inhibit/default.nix b/homeManagerModules/services/pipewire-inhibit/default.nix index a7552718..0b351c40 100644 --- a/homeManagerModules/services/pipewire-inhibit/default.nix +++ b/homeManagerModules/services/pipewire-inhibit/default.nix @@ -10,7 +10,7 @@ in { systemd.user.services.pipewire-inhibit-idle = { Unit = { After = "graphical-session.target"; - BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"; + BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"; Description = "inhibit idle when audio is playing with Pipewire."; PartOf = "graphical-session.target"; }; @@ -20,7 +20,7 @@ in { Restart = "no"; }; - Install.WantedBy = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"; + Install.WantedBy = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"; }; }; } diff --git a/homeManagerModules/services/randomWallpaper/default.nix b/homeManagerModules/services/randomWallpaper/default.nix index 1a4c8ee1..1524a0da 100644 --- a/homeManagerModules/services/randomWallpaper/default.nix +++ b/homeManagerModules/services/randomWallpaper/default.nix @@ -14,7 +14,7 @@ in { systemd.user.services.randomWallpaper = { Unit = { After = "graphical-session.target"; - BindsTo = lib.optional (config.ar.home.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (config.ar.home.desktop.sway.enable) "sway-session.target"; + BindsTo = lib.optional (config.ar.home.desktop.hyprland.enable) "hyprland-session.target"; Description = "Lightweight swaybg-based random wallpaper daemon."; PartOf = "graphical-session.target"; }; @@ -36,7 +36,7 @@ in { TasksMax = "infinity"; }; - Install.WantedBy = lib.optional (config.ar.home.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (config.ar.home.desktop.sway.enable) "sway-session.target"; + Install.WantedBy = lib.optional (config.ar.home.desktop.hyprland.enable) "hyprland-session.target"; }; }; } diff --git a/homeManagerModules/services/swayidle/default.nix b/homeManagerModules/services/swayidle/default.nix deleted file mode 100644 index 866c07a5..00000000 --- a/homeManagerModules/services/swayidle/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.ar.home; -in { - config = lib.mkIf cfg.services.swayidle.enable { - services.swayidle = { - enable = true; - - events = [ - { - event = "before-sleep"; - command = "swaylock && sleep 2"; - } - { - event = "lock"; - command = "swaylock"; - } - ]; - - timeouts = - [ - { - timeout = 30; - command = "brightnessctl -sd chromeos::kbd_backlight set 0"; - resumeCommand = "brightnessctl -rd chromeos::kbd_backlight"; - } - { - timeout = 120; - command = "brightnessctl -s set 10"; - resumeCommand = "brightnessctl -r"; - } - ] - ++ lib.optional cfg.desktop.autoSuspend { - timeout = 600; - command = "systemctl suspend"; - } - ++ lib.optional (!cfg.desktop.autoSuspend) - { - timeout = 600; - command = "swaylock"; - } - ++ lib.optional (!cfg.desktop.autoSuspend && cfg.desktop.sway.enable) - { - timeout = 630; - command = "swaymsg \"output * dpms off\""; - resumeCommand = "swaymsg \"output * dpms on\""; - }; - }; - - systemd.user.services.swayidle = { - Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.sway.enable) "sway-session.target"); - - Service = { - Environment = lib.mkForce [ - "PATH=${ - lib.makeBinPath ((with pkgs; [ - bash - brightnessctl - coreutils - swaylock - systemd - ]) - ++ lib.optional (cfg.desktop.sway.enable) config.wayland.windowManager.sway.package) - }" - ]; - Restart = lib.mkForce "no"; - }; - - Unit.BindsTo = lib.optional (cfg.desktop.sway.enable) "sway-session.target"; - }; - }; -} diff --git a/homeManagerModules/services/swayosd/default.nix b/homeManagerModules/services/swayosd/default.nix index 1bb5640d..88d63b13 100644 --- a/homeManagerModules/services/swayosd/default.nix +++ b/homeManagerModules/services/swayosd/default.nix @@ -17,9 +17,9 @@ in { }; systemd.user.services.swayosd = { - Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"); + Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"); Service.Restart = lib.mkForce "no"; - Unit.BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"; + Unit.BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"; }; xdg.configFile."swayosd/style.css" = { diff --git a/homeManagerModules/services/waybar/default.nix b/homeManagerModules/services/waybar/default.nix index 13346f4c..747ef92d 100644 --- a/homeManagerModules/services/waybar/default.nix +++ b/homeManagerModules/services/waybar/default.nix @@ -24,8 +24,7 @@ in { rofi-power-menu systemd ]) - ++ lib.optional (cfg.desktop.hyprland.enable) config.wayland.windowManager.hyprland.package - ++ lib.optional (cfg.desktop.sway.enable) config.wayland.windowManager.sway.package; + ++ lib.optional (cfg.desktop.hyprland.enable) config.wayland.windowManager.hyprland.package; programs.waybar = { enable = true; @@ -39,15 +38,11 @@ in { modules-left = ["group/tablet"] ++ lib.optionals (cfg.desktop.hyprland.enable) - ["hyprland/submap"] - ++ lib.optionals (cfg.desktop.sway.enable) - ["sway/scratchpad" "sway/mode"]; + ["hyprland/submap"]; modules-center = lib.optionals (cfg.desktop.hyprland.enable) - ["hyprland/workspaces"] - ++ lib.optionals (cfg.desktop.sway.enable) - ["sway/workspaces"]; + ["hyprland/workspaces"]; modules-right = [ "tray" @@ -73,34 +68,8 @@ in { on-click = ''hyprctl dispatch submap reset''; }; - "sway/workspaces" = { - all-outputs = true; - format = "{icon} {name}"; - - format-icons = { - default = "󰝥"; - focused = "󰪥"; - urgent = ""; - }; - - sort-by = "id"; - }; - - "sway/mode" = { - on-click = ''swaymsg mode default''; - }; - - "sway/scratchpad" = { - format = "{icon} {count}"; - format-icons = ["" ""]; - on-click = "swaymsg scratchpad show"; - show-empty = false; - tooltip = true; - tooltip-format = "{app}: {title}"; - }; - "custom/app-close" = { - on-click = ''hyprctl dispatch killactive || swaymsg kill''; + on-click = ''hyprctl dispatch killactive''; format = "󰅗"; tooltip-format = "Close the focused window."; }; @@ -364,11 +333,11 @@ in { }; systemd.user.services.waybar = { - Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"); + Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"); Service.Restart = lib.mkForce "no"; - Unit.BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target" ++ lib.optional (cfg.desktop.sway.enable) "sway-session.target"; + Unit.BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target"; }; xdg.configFile."nwg-drawer/drawer.css".text = '' diff --git a/homeManagerModules/theme.nix b/homeManagerModules/theme.nix index 7cfc5375..7b4cf7ca 100644 --- a/homeManagerModules/theme.nix +++ b/homeManagerModules/theme.nix @@ -29,7 +29,7 @@ in { targets.gtk.extraCss = builtins.concatStringsSep "\n" [ (lib.optionalString ( - (cfg.desktop.hyprland.enable || cfg.desktop.sway.enable) && (config.stylix.polarity == "light") && !cfg.desktop.gnome.enable + (cfg.desktop.hyprland.enable) && (config.stylix.polarity == "light") && !cfg.desktop.gnome.enable ) '' tooltip { &.background { background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups}); } diff --git a/homes/aly/windowManagers/default.nix b/homes/aly/windowManagers/default.nix index f4e5bafd..71354e1e 100644 --- a/homes/aly/windowManagers/default.nix +++ b/homes/aly/windowManagers/default.nix @@ -1,5 +1,4 @@ { - config, lib, pkgs, ... @@ -7,61 +6,6 @@ imports = [./laptop.nix]; wayland.windowManager = { - sway.config = { - floating.criteria = [{app_id = "Bitwarden";} {app_id = "org.keepassxc.KeePassXC";}]; - - gaps = { - # smartBorders = "on"; - # smartGaps = true; - }; - - input."type:keyboard".xkb_options = "caps:ctrl_modifier"; - - keybindings = { - "${config.wayland.windowManager.sway.config.modifier}+N" = "exec ${lib.getExe' pkgs.obsidian "obsidian"}"; - "${config.wayland.windowManager.sway.config.modifier}+P" = "exec ${lib.getExe pkgs.rofi-rbw-wayland}"; - }; - - startup = [ - {command = lib.getExe config.ar.home.defaultApps.editor;} - {command = lib.getExe config.ar.home.defaultApps.webBrowser;} - {command = lib.getExe pkgs.fractal;} - {command = lib.getExe config.programs.thunderbird.package;} - {command = lib.getExe' pkgs.obsidian "obsidian";} - ]; - - output = { - "Guangxi Century Innovation Display Electronics Co., Ltd 27C1U-D 0000000000001" = { - scale = "1.5"; - pos = "-2560 0"; - }; - - "HP Inc. HP 24mh 3CM037248S " = { - scale = "1.0"; - pos = "-1920 0"; - }; - }; - - window.commands = [ - { - command = "resize set 80ppt 80ppt; move position center;"; - criteria = {app_id = "Bitwarden";}; - } - { - command = "resize set 80ppt 80ppt; move position center; sticky toggle;"; - criteria = {app_id = "org.keepassxc.KeePassXC";}; - } - { - command = "move to scratchpad"; - criteria = {app_id = "org.gnome.Fractal";}; - } - { - command = "move to scratchpad"; - criteria = {app_id = "vesktop";}; - } - ]; - }; - hyprland.settings = { bind = [ "SUPER,N,exec,${lib.getExe' pkgs.obsidian "obsidian"}" diff --git a/homes/aly/windowManagers/laptop.nix b/homes/aly/windowManagers/laptop.nix index ff2a5c7f..dc2493e7 100644 --- a/homes/aly/windowManagers/laptop.nix +++ b/homes/aly/windowManagers/laptop.nix @@ -6,20 +6,6 @@ }: { config = lib.mkIf config.ar.home.laptopMode { wayland.windowManager = { - sway.config = { - assigns = { - "workspace 1:web" = [{app_id = "firefox";} {app_id = "brave-browser";}]; - "workspace 2:note" = [{app_id = "obsidian";}]; - "workspace 3:code" = [{app_id = "codium-url-handler";} {app_id = "dev.zed.Zed";}]; - "workspace 4:mail" = [{app_id = "betterbird";} {app_id = "thunderbird";}]; - "workspace 5:work" = [{app_id = "firework";}]; - }; - - startup = [ - {command = "sleep 2 && ${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} workspace 1:web";} - ]; - }; - hyprland.settings = { exec-once = [ "sleep 2 && hyprctl dispatch workspace 2 && sleep 2 && hyprctl dispatch workspace 3 && sleep 2 && hyprctl dispatch workspace 4 && sleep 2 && hyprctl dispatch workspace 1;" diff --git a/homes/dustin/default.nix b/homes/dustin/default.nix index 13fd9174..13bfb4fb 100644 --- a/homes/dustin/default.nix +++ b/homes/dustin/default.nix @@ -41,24 +41,6 @@ self: { hyprland.settings = { bind = ["SUPER,P,exec,${lib.getExe pkgs.rofi-rbw-wayland}"]; }; - - sway.config = { - input."type:keyboard" = lib.mkForce { - xkb_layout = "us"; - xkb_variant = "altgr-intl"; - }; - - keybindings = { - "${config.wayland.windowManager.sway.config.modifier}+P" = "exec ${lib.getExe pkgs.rofi-rbw-wayland}"; - }; - - output = { - "Guangxi Century Innovation Display Electronics Co., Ltd 27C1U-D 0000000000001" = { - scale = "1.5"; - pos = "-2560 0"; - }; - }; - }; }; xdg.mimeApps = { diff --git a/hosts/fallarbor/home.nix b/hosts/fallarbor/home.nix index c400532b..2dba0c03 100644 --- a/hosts/fallarbor/home.nix +++ b/hosts/fallarbor/home.nix @@ -2,8 +2,6 @@ home-manager = { sharedModules = [ { - wayland.windowManager.sway.config.output = {"BOE 0x095F Unknown".scale = "1.5";}; - ar.home = { desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"]; diff --git a/hosts/lavaridge/home.nix b/hosts/lavaridge/home.nix index b77dc362..3b51444b 100644 --- a/hosts/lavaridge/home.nix +++ b/hosts/lavaridge/home.nix @@ -2,13 +2,6 @@ home-manager = { sharedModules = [ { - wayland.windowManager.sway.config.output = { - "eDP-1" = { - adaptive_sync = "on"; - scale = "2.0"; - }; - }; - ar.home = { desktop.hyprland.laptopMonitors = ["desc:BOE NE135A1M-NY1,2880x1920@60, 0x0, 2, vrr, 0"]; diff --git a/hosts/mauville/home.nix b/hosts/mauville/home.nix index 8931b283..82daf2e3 100644 --- a/hosts/mauville/home.nix +++ b/hosts/mauville/home.nix @@ -12,7 +12,6 @@ "file:///mnt/Archive" ]; - wayland.windowManager.sway.config.output = {"LG Electronics LG ULTRAWIDE 311NTAB5M720".scale = "1.0";}; xdg.userDirs.music = "/mnt/Media/Music"; ar.home = { diff --git a/hosts/petalburg/home.nix b/hosts/petalburg/home.nix index 8ea4c258..09bae3a3 100644 --- a/hosts/petalburg/home.nix +++ b/hosts/petalburg/home.nix @@ -2,13 +2,6 @@ home-manager = { sharedModules = [ { - wayland.windowManager.sway.config.output = { - "eDP-2" = { - adaptive_sync = "on"; - scale = "1.25"; - }; - }; - ar.home = { desktop.hyprland.laptopMonitors = ["desc:China Star Optoelectronics Technology Co. Ltd MNG007QA1-1,1920x1200@165, 0x0, 1.25, vrr, 1"]; diff --git a/hosts/rustboro/home.nix b/hosts/rustboro/home.nix index bc98112d..c49066c2 100644 --- a/hosts/rustboro/home.nix +++ b/hosts/rustboro/home.nix @@ -2,8 +2,6 @@ home-manager = { sharedModules = [ { - wayland.windowManager.sway.config.output = {"LG Display 0x0569 Unknown".scale = "1.25";}; - ar.home = { desktop.hyprland.laptopMonitors = ["desc:LG Display 0x0569,preferred,auto,1.25"]; diff --git a/nixosModules/desktop/default.nix b/nixosModules/desktop/default.nix index 1332c5b2..999e13ad 100644 --- a/nixosModules/desktop/default.nix +++ b/nixosModules/desktop/default.nix @@ -9,7 +9,6 @@ ./gnome ./hyprland ./kde - ./sway ./waylandComp.nix ]; @@ -19,7 +18,6 @@ || config.ar.desktop.hyprland.enable || config.ar.desktop.kde.enable || config.ar.desktop.steam.enable - || config.ar.desktop.sway.enable ) { boot = { consoleLogLevel = 0; diff --git a/nixosModules/desktop/sway/default.nix b/nixosModules/desktop/sway/default.nix deleted file mode 100644 index 64a719a1..00000000 --- a/nixosModules/desktop/sway/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - lib, - config, - ... -}: { - config = lib.mkIf config.ar.desktop.sway.enable { - programs.sway = { - enable = true; - extraPackages = lib.mkDefault []; - }; - }; -} diff --git a/nixosModules/desktop/waylandComp.nix b/nixosModules/desktop/waylandComp.nix index f8b50add..fe686d68 100644 --- a/nixosModules/desktop/waylandComp.nix +++ b/nixosModules/desktop/waylandComp.nix @@ -4,7 +4,7 @@ config, ... }: { - config = lib.mkIf (config.ar.desktop.hyprland.enable || config.ar.desktop.sway.enable) { + config = lib.mkIf (config.ar.desktop.hyprland.enable) { programs = { gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3; }; @@ -38,29 +38,6 @@ session required pam_unix.so # unix (order 10200) ''; }; - - swaylock = { - text = '' - # Account management. - account required pam_unix.so # unix (order 10900) - - # Authentication management. - auth sufficient pam_unix.so likeauth try_first_pass likeauth nullok # unix (order 11500) - ${ - lib.strings.optionalString config.services.fprintd.enable - "auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so # fprintd (order 11300)" - } - - auth required pam_deny.so # deny (order 12300) - - # Password management. - password sufficient pam_unix.so nullok yescrypt # unix (order 10200) - - # Session management. - session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100) - session required pam_unix.so # unix (order 10200) - ''; - }; }; }; } diff --git a/nixosModules/options.nix b/nixosModules/options.nix index a5ddf128..30a3df9e 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -34,7 +34,6 @@ hyprland.enable = lib.mkEnableOption "Hyprland wayland session."; kde.enable = lib.mkEnableOption "KDE desktop session."; steam.enable = lib.mkEnableOption "Steam + Gamescope session."; - sway.enable = lib.mkEnableOption "Sway wayland session."; }; laptopMode = lib.mkEnableOption "Enable laptop configuration.";