summaryrefslogtreecommitdiff
path: root/nixos/home-configuration/apps/sway.nix
blob: c5a28686bc50d1b7f604c4bcea97229786ef65da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
  pkgs,
  ...
}: let
  left = "h";
  down = "j";
  up = "k";
  right = "l";

  modifier = "Mod4";
  terminal = "${pkgs.foot}/bin/footclient";
  menu = "${pkgs.wmenu}/bin/wmenu-run";
in
{
  wayland.windowManager.sway = {
    enable = false;
    wrapperFeatures.gtk = true;
    extraConfig = ''
      exec swaymsg workspace 1
      default_border pixel 2
      default_floating_border pixel 2
      for_window [class=".*"] border pixel 2

	  client.focused          #F5C2E7 #6C7086 #C6D0F5 #6C7086 #6C7086
      client.focused_inactive #313244 #313244 #C6D0F5 #585B70 #313244
      client.unfocused        #313244 #313244 #A6ADC8 #313244 #313244
      client.urgent           #F38BA8 #6C7086 #FFFFFF #F38BA8 #6C7086

      seat * xcursor_theme Adwaita 24

	  input * xkb_options caps:escape
    '';
    config = {
      modifier = "Mod4";
      gaps = {
        inner = 8;
        outer = 10;
      };
      bars = [];
      output.eDP-1.disable = "";
      keybindings = {
        "${modifier}+Return" = "exec ${terminal}";
        "${modifier}+Shift+Return" = "exec ${menu} -l 10";
        "${modifier}+r" = "exec rofi -show drun";
        "${modifier}+s" = "kill";
        "${modifier}+Print" = "exec /home/coast/.local/src/local/bin/screenie-wlr";
        "${modifier}+1" = "workspace 1";
        "${modifier}+2" = "workspace 2";
        "${modifier}+3" = "workspace 3";
        "${modifier}+4" = "workspace 4";
        "${modifier}+5" = "workspace 5";
        "${modifier}+6" = "workspace 6";
        "${modifier}+7" = "workspace 7";
        "${modifier}+8" = "workspace 8";
        "${modifier}+9" = "workspace 9";
        "${modifier}+Shift+1" = "move container to workspace 1";
        "${modifier}+Shift+2" = "move container to workspace 2";
        "${modifier}+Shift+3" = "move container to workspace 3";
        "${modifier}+Shift+4" = "move container to workspace 4";
        "${modifier}+Shift+5" = "move container to workspace 5";
        "${modifier}+Shift+6" = "move container to workspace 6";
        "${modifier}+Shift+7" = "move container to workspace 7";
        "${modifier}+Shift+8" = "move container to workspace 8";
        "${modifier}+Shift+9" = "move container to workspace 9";
        "${modifier}+h" = "focus left";
        "${modifier}+j" = "focus down";
        "${modifier}+k" = "focus up";
        "${modifier}+l" = "focus right";
        "${modifier}+Shift+i" = "exec caja";
        "${modifier}+Shift+r" = "reload";
        "${modifier}+Shift+q" = "exit";
        "${modifier}+Shift+v" = "exec vesktop --ozone-platform=wayland";
        "${modifier}+Shift+p" = "exec /home/coast/.local/src/local/bin/setwall.py";
        "${modifier}+Shift+d" = "mode 'resize'";
        "${modifier}+space" = "floating toggle";

        #lock the screen
        "${modifier}+Shift+l" = "exec swaylock -c 000000";
		#layouts
    	"${modifier}+Shift+u" = "layout tabbed";
    	"${modifier}+Shift+y" = "layout stacking";
    	"${modifier}+Shift+t" = "layout toggle split";
      };
      modes = {
        resize = {
          ${right} = "resize shrink width 10 px";
          ${up} = "resize grow height 10 px";
          ${down} = "resize shrink height 10 px";
          ${left} = "resize grow width 10 px";

          "Escape" = "mode default";
          "Return" = "mode default";
        };
      };
      startup = [
		{ command = "swaybg -i /home/coast/Downloads/wall1.png -m fill"; always = true; }
        { command = "waybar"; }
        { command = "foot -s"; always = true; }
		{ command = "autotiling"; }
      ];
    };
  };

  services.swayidle = {
    enable = true;
    timeouts = [{
      timeout = 300;
      command = "${pkgs.swaylock}/bin/swaylock --daemonize --color 000000";
    }];
  };
}