aboutsummaryrefslogtreecommitdiff
path: root/modules/user/desktop/sessions
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/desktop/sessions')
-rw-r--r--modules/user/desktop/sessions/default.nix5
-rw-r--r--modules/user/desktop/sessions/sway.nix147
2 files changed, 152 insertions, 0 deletions
diff --git a/modules/user/desktop/sessions/default.nix b/modules/user/desktop/sessions/default.nix
new file mode 100644
index 0000000..47a721a
--- /dev/null
+++ b/modules/user/desktop/sessions/default.nix
@@ -0,0 +1,5 @@
+{
+ imports = [
+ ./sway.nix
+ ];
+}
diff --git a/modules/user/desktop/sessions/sway.nix b/modules/user/desktop/sessions/sway.nix
new file mode 100644
index 0000000..e853a10
--- /dev/null
+++ b/modules/user/desktop/sessions/sway.nix
@@ -0,0 +1,147 @@
+{
+ config,
+ lib,
+ options,
+ ...
+}:
+{
+ config = {
+ wayland.windowManager.sway = {
+ enable = lib.mkDefault config.desktop.sessions.sway.enable;
+ config = {
+ bars = [
+ {
+ colors = {
+ activeWorkspace = {
+ background = "#11111b";
+ border = "#11111b";
+ text = "#cdd6f4";
+ };
+
+ background = "#11111b";
+ bindingMode = {
+ background = "#a6e3a1";
+ border = "#a6e3a1";
+ text = "#11111b";
+ };
+
+ focusedBackground = "#11111b";
+ focusedSeparator = "#a6adc8";
+ focusedStatusline = "#cdd6f4";
+ focusedWorkspace = {
+ background = "#11111b";
+ border = "#11111b";
+ text = "#cba6f7";
+ };
+
+ inactiveWorkspace = {
+ background = "#11111b";
+ border = "#11111b";
+ text = "#a6adc8";
+ };
+
+ separator = "#a6adc8";
+ statusline = "#cdd6f4";
+ urgentWorkspace = {
+ background = "#f38ba8";
+ border = "#f38ba8";
+ text = "#11111b";
+ };
+ };
+
+ fonts = {
+ names = [ "Fira Mono" ];
+ size = 8.0;
+ };
+
+ position = "bottom";
+ }
+ ];
+
+ bindswitches =
+ let
+ display = "eDP-1";
+ in
+ {
+ "lid:on" = {
+ action = "output ${display} disable";
+ locked = true;
+ reload = true;
+ };
+
+ "lid:off" = {
+ action = "output ${display} enable";
+ locked = true;
+ reload = true;
+ };
+ };
+
+ colors = {
+ focused = {
+ background = "#1e1e2e";
+ border = "#cba6f7";
+ childBorder = "#cba6f7";
+ indicator = "#f5c2e7";
+ text = "#1e1e2e";
+ };
+
+ focusedInactive = {
+ background = "#1e1e2e";
+ border = "#585b70";
+ childBorder = "#585b70";
+ indicator = "#585b70";
+ text = "#cdd6f4";
+ };
+
+ unfocused = {
+ background = "#1e1e2e";
+ border = "#313244";
+ childBorder = "#313244";
+ indicator = "#313244";
+ text = "#a6adc8";
+ };
+
+ urgent = {
+ background = "#1e1e2e";
+ border = "#f38ba8";
+ childBorder = "#f38ba8";
+ indicator = "#f38ba8";
+ text = "#1e1e2e";
+ };
+ };
+
+ defaultWorkspace = "workspace number 1";
+ floating = {
+ criteria = [
+ # TODO
+ ];
+
+ titlebar = false;
+ };
+
+ focus.followMouse = false;
+ fonts = {
+ names = [ "Fira Mono" ];
+ size = 8.0;
+ };
+
+ gaps = {
+ inner = 2;
+ outer = 4;
+ };
+
+ input = {
+ "type:touchpad" = {
+ accel_profile = "flat";
+ drag = "enabled";
+ dwt = "enabled";
+ natural_scroll = "enabled";
+ tap = "enabled";
+ };
+ };
+ };
+ };
+ };
+
+ options.desktop.sessions.sway.enable = lib.mkEnableOption "the sway window manager";
+}