about summary refs log tree commit diff
path: root/users/fcuny/desktop/sway/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/fcuny/desktop/sway/default.nix')
-rw-r--r--users/fcuny/desktop/sway/default.nix62
1 files changed, 60 insertions, 2 deletions
diff --git a/users/fcuny/desktop/sway/default.nix b/users/fcuny/desktop/sway/default.nix
index 5640664..7c18f66 100644
--- a/users/fcuny/desktop/sway/default.nix
+++ b/users/fcuny/desktop/sway/default.nix
@@ -2,7 +2,7 @@
 
 {
   imports = [
-    ./waybar.nix
+    ./i3status.nix
     ./sway-idle.nix
     ./wofi.nix
     ./gammastep.nix
@@ -34,15 +34,73 @@
   wayland.windowManager.sway = {
     enable = true;
     systemdIntegration = true;
+    extraSessionCommands = ''
+      export XDG_SESSION_TYPE=wayland
+      export XDG_CURRENT_DESKTOP=sway
+      export MOZ_ENABLE_WAYLAND=1
+    '';
     config = rec {
       modifier = "Mod4";
       terminal = "${config.programs.alacritty.package}/bin/alacritty";
       menu = "${pkgs.wofi}/bin/wofi -S run";
-      bars = [ ];
+      bars = [
+        {
+          fonts = {
+            names = [
+              "Source Code Pro"
+              "Font Awesome 5 Free"
+            ];
+            size = 9.0;
+            style = "Bold";
+          };
+          extraConfig = ''
+            position top
+          '';
+          statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
+          colors = {
+            background = "#000000";
+            statusline = "#88C0D0";
+            separator = "#3B4252";
+            focusedWorkspace = {
+              border = "#88C0D0";
+              background = "#88C0D0";
+              text = "#2E3440";
+            };
+            activeWorkspace = {
+              border = "#4C566ADD";
+              background = "#4C566ADD";
+              text = "#D8DEE9";
+            };
+            inactiveWorkspace = {
+              border = "#000000";
+              background = "#000000";
+              text = "#E5E9F0";
+            };
+            urgentWorkspace = {
+              border = "#B48EAD";
+              background = "#B48EAD";
+              text = "#ECEFF4";
+            };
+            bindingMode = {
+              border = "#BF616A";
+              background = "#BF616A";
+              text = "#E5E9F0";
+            };
+          };
+        }
+      ];
       fonts = {
         names = [ "Source Code Pro" ];
         size = 10.0;
       };
+      keybindings = lib.mkOptionDefault {
+        "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
+        "XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
+        "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
+        "XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
+        "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
+        "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%";
+      };
       input = {
         "*" = {
           "xkb_layout" = "us,fr";