Skyler Turner | 7a7eaf4 | 2022-03-07 13:39:48 +0000 | [diff] [blame] | 1 | { pkgs, lib, ... }: { |
Skyler Turner | db486c9 | 2022-03-06 10:48:24 +0000 | [diff] [blame] | 2 | wayland.windowManager.sway = { |
| 3 | enable = true; |
| 4 | wrapperFeatures.gtk = true; |
Skyler Turner | f2a8839 | 2022-03-06 21:08:15 +0000 | [diff] [blame] | 5 | |
| 6 | config = { |
| 7 | assigns = {}; |
| 8 | bars = []; |
| 9 | colors = {}; |
Skyler Turner | fe471d3 | 2022-03-07 13:16:17 +0000 | [diff] [blame] | 10 | defaultWorkspace = null; |
| 11 | down = "j"; |
| 12 | floating = {}; |
| 13 | focus = {}; |
| 14 | fonts = {}; |
| 15 | gaps = { |
Skyler Turner | 801a9a8 | 2022-03-07 13:40:41 +0000 | [diff] [blame] | 16 | inner = 10; |
Skyler Turner | 1bd708a | 2022-03-07 13:44:27 +0000 | [diff] [blame^] | 17 | outer = 0; |
Skyler Turner | b1fef9e | 2022-03-07 13:39:14 +0000 | [diff] [blame] | 18 | smartGaps = true; |
Skyler Turner | fe471d3 | 2022-03-07 13:16:17 +0000 | [diff] [blame] | 19 | }; |
Skyler Turner | b1fef9e | 2022-03-07 13:39:14 +0000 | [diff] [blame] | 20 | input = { |
| 21 | # TODO: Make my keyboard british |
| 22 | }; |
| 23 | keybindings = lib.mkOptionDefault {}; |
| 24 | keycodebindings = {}; |
| 25 | left = "h"; |
| 26 | menu = "/usr/bin/env rofi -show combi"; |
| 27 | modes = { |
| 28 | resize = { |
| 29 | Down = "resize grow height 10 px"; |
| 30 | Escape = "mode default"; |
| 31 | Left = "resize shrink width 10 px"; |
| 32 | Return = "mode default"; |
| 33 | Right = "resize grow width 10 px"; |
| 34 | Up = "resize shrink height 10 px"; |
| 35 | h = "resize shrink width 10 px"; |
| 36 | j = "resize grow height 10 px"; |
| 37 | k = "resize shrink height 10 px"; |
| 38 | l = "resize grow width 10 px"; |
| 39 | }; |
| 40 | }; |
| 41 | modifier = "Mod4"; |
| 42 | output = { |
| 43 | HDMI-A-2 = { |
| 44 | resolution = "3840x2160"; |
| 45 | position = "1920,0"; |
| 46 | }; |
| 47 | eDP-1 = { |
| 48 | resolution = "1920x1080"; |
| 49 | position = "0,1522"; |
| 50 | }; |
| 51 | }; |
| 52 | right = "l"; |
| 53 | seat = { |
| 54 | "*" = { |
| 55 | hide_cursor = "when-typing enable"; |
| 56 | }; |
| 57 | }; |
| 58 | startup = []; |
| 59 | terminal = "alacritty"; |
| 60 | up = "k"; |
| 61 | window = {}; |
| 62 | workspaceAutoBackAndForth = true; |
| 63 | workspaceLayout = "default"; |
| 64 | workspaceOutputAssign = []; |
| 65 | }; |
| 66 | |
| 67 | extraSessionCommands = '' |
| 68 | export SDL_VIDEODRIVER=wayland |
| 69 | # needs qt5.qtwayland in systemPackages |
| 70 | export QT_QPA_PLATFORM=wayland |
| 71 | export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" |
| 72 | # Fix for some Java AWT applications (e.g. Android Studio), |
| 73 | # use this if they aren't displayed properly: |
| 74 | export _JAVA_AWT_WM_NONREPARENTING=1 |
| 75 | ''; |
| 76 | |
| 77 | swaynag = { |
| 78 | enable = false; # TODO: Configure swaynag to fit with waybar |
| 79 | settings = {}; |
Skyler Turner | 07eb3d1 | 2022-03-06 21:08:29 +0000 | [diff] [blame] | 80 | }; |
Skyler Turner | eda726a | 2022-03-07 00:23:17 +0000 | [diff] [blame] | 81 | |
| 82 | systemdIntegration = true; |
Skyler Turner | db486c9 | 2022-03-06 10:48:24 +0000 | [diff] [blame] | 83 | }; |
| 84 | |
| 85 | home.packages = with pkgs; [ |
| 86 | swaylock |
| 87 | swayidle |
| 88 | wl-clipboard |
Skyler Turner | 9dfac61 | 2022-03-06 10:48:57 +0000 | [diff] [blame] | 89 | ]; |
Skyler Turner | db486c9 | 2022-03-06 10:48:24 +0000 | [diff] [blame] | 90 | |
Skyler Turner | d3b7068 | 2022-03-06 23:19:45 +0000 | [diff] [blame] | 91 | programs.zsh.profileExtra = '' |
| 92 | if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then |
| 93 | exec systemd-cat -t sway sway |
| 94 | fi |
| 95 | ''; |
Skyler Turner | db486c9 | 2022-03-06 10:48:24 +0000 | [diff] [blame] | 96 | } |