diff --git a/nix/configuration/roles/sway/default.nix b/nix/configuration/roles/sway/default.nix index e0fede8..ace154a 100644 --- a/nix/configuration/roles/sway/default.nix +++ b/nix/configuration/roles/sway/default.nix @@ -42,8 +42,8 @@ let include ${window-management} include ${movement} include ${disable-focus-follows-mouse} - include ~/.config/sway/config.d/*.conf - include /etc/sway/config.d/* + include ${background} + include ${touchpad_input} ''; }; base-hotkeys = pkgs.writeTextFile { @@ -210,6 +210,46 @@ let focus_follows_mouse no ''; }; + background = pkgs.writeTextFile { + name = "background.conf"; + text = '' + output * bg ${./files/bliss.jpg} fill + ''; + }; + touchpad_input = pkgs.writeTextFile { + name = "touchpad_input.conf"; + text = '' + input * xkb_rules "evdev" + + # All touchpads + input type:touchpad { + dwt enabled + click_method clickfinger + tap enabled + } + ''; + }; + start_screen_share = pkgs.writeShellScriptBin "start_screen_share" '' + # Disable displaying notifications. This is useful for video conference screen sharing. + set -euo pipefail + IFS=$'\n\t' + DIR="$( cd "$( dirname "''${BASH_SOURCE[0]}" )" && pwd )" + + makoctl set-mode do-not-disturb + + swaymsg output "'Dell Inc. DELL U3014 P1V6N35M329L'" scale 2 + ''; + stop_screen_share = pkgs.writeShellScriptBin "stop_screen_share" '' + # Allow mako to show notifications again. + set -euo pipefail + IFS=$'\n\t' + DIR="$( cd "$( dirname "''${BASH_SOURCE [ 0 ]}" )" && pwd )" + + makoctl set-mode default + + swaymsg output "'Dell Inc. DELL U3014 P1V6N35M329L'" scale 1 + ''; + in { imports = [ ]; @@ -217,6 +257,8 @@ in environment.systemPackages = with pkgs; [ alacritty pcmanfm + start_screen_share + stop_screen_share ]; environment.sessionVariables = { diff --git a/nix/configuration/roles/sway/files/bliss.jpg b/nix/configuration/roles/sway/files/bliss.jpg new file mode 100644 index 0000000..ee7cd88 Binary files /dev/null and b/nix/configuration/roles/sway/files/bliss.jpg differ