summaryrefslogtreecommitdiff
path: root/users/kassouni/desktop/sway/sway.nix
blob: f949bd731663f23309e1a54dd26fb1a8a39013a5 (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
{
  pkgs,
  config,
  ...
}:
let
  modifier = "Mod4";
in
{
  programs.swaylock.enable = true;
  wayland.windowManager.sway = {
    enable = true;
    wrapperFeatures.gtk = true; # Fixes common issues with GTK 3 apps

    config = {
      window.titlebar = false;
      menu = "fuzzel";
      inherit modifier;
      # Use kitty as default terminal
      terminal = "ghostty";
   };
      extraConfig = let
        incr = "5";
        brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
      in ''
        # home-manager inlines these values instead of emitting `set` lines
        output * scale 1.75
        output * bg ${config.theme.desktop.wallpaper} fill
        bindsym XF86MonBrightnessDown exec ${brightnessctl} set -e ${incr}%-
        bindsym XF86MonBrightnessUp exec ${brightnessctl} set -e +${incr}%
        bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_SINK@ ${incr}%+
        bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_SINK@ ${incr}%-
        bindsym ${modifier}+p exec open-palette-fuzzel
        input "type:keyboard" {
          xkb_options caps:escape
        }

        input "type:touchpad" {
          natural_scroll enabled
          dwt disabled
        }
      '';
 
  };
}