summaryrefslogtreecommitdiff
path: root/sway.nix
diff options
context:
space:
mode:
Diffstat (limited to 'sway.nix')
-rw-r--r--sway.nix164
1 files changed, 164 insertions, 0 deletions
diff --git a/sway.nix b/sway.nix
new file mode 100644
index 0000000..469d4fa
--- /dev/null
+++ b/sway.nix
@@ -0,0 +1,164 @@
+{
+ pkgs,
+ inputs,
+ ...
+}: {
+ xdg.configFile."sway/config".text = ''
+ output eDP1 pos 3537 0 res 1920 1200
+ output DP-3 scale 1.4
+ output DP-3 pos 2440 0 res 3840 2160
+
+ set $mod Mod4
+ set $term ghostty
+
+ font pango:iosevka 20
+
+ exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
+ exec /usr/libexec/pipewire-launcher
+
+ focus_follows_mouse no
+
+ for_window [class="^.*"] border pixel 3
+ default_border pixel 5
+ default_floating_border pixel 5
+ hide_edge_borders both
+
+ floating_modifier $mod
+
+ # custom shortcut
+ bindsym $mod+Shift+q kill
+ bindsym $mod+t exec $term
+ bindsym $mod+d exec wofi --show run
+ bindsym $mod+c exec comment
+ bindsym $mod+n exec neovide
+ bindsym $mod+x exec open_web
+ bindsym $mod+Shift+p exec maim --select | wl-copy
+ bindsym $mod+p exec grim -g "$(slurp)" - | wl-copy
+ bindsym $mod+Shift+d exec wofi --show drun
+ bindsym $mod+Shift+minus move scratchpad
+ bindsym $mod+minus scratchpad show
+
+ bindsym $mod+j focus down
+ bindsym $mod+k focus up
+ bindsym $mod+l focus right
+ bindsym $mod+h focus left
+
+ # move focused window
+ bindsym $mod+Shift+h move left
+ bindsym $mod+Shift+j move down
+ bindsym $mod+Shift+k move up
+ bindsym $mod+Shift+l move right
+
+ # move focused workspace between monitors
+ bindsym $mod+Ctrl+greater move workspace to output right
+ bindsym $mod+Ctrl+less move workspace to output left
+
+
+ # split in vertical orientation
+ bindsym $mod+v split v
+
+ # enter fullscreen mode for the focused container
+ bindsym $mod+f fullscreen toggle
+
+ # change container layout (stacked, tabbed, toggle split)
+ bindsym $mod+w layout tabbed
+ bindsym $mod+s layout toggle split
+
+
+ bindsym $mod+Shift+space floating toggle
+ bindsym $mod+a sticky toggle
+
+ # change focus between tiling / floating windows
+ bindsym $mod+space focus mode_toggle
+
+ # Define names for default workspaces for which we configure key bindings later on.
+ # We use variables to avoid repeating the names in multiple places.
+ set $ws1 "1.web"
+ set $ws2 "2.nvim"
+ set $ws3 "3.work"
+ set $ws4 "4.buffer"
+ set $ws5 "5.chat"
+ set $ws6 "6"
+ set $ws7 "7"
+ set $ws8 "8"
+ set $ws9 "9"
+ set $ws10 "10"
+
+ # switch to workspace
+ bindsym $mod+1 workspace $ws1
+ bindsym $mod+2 workspace $ws2
+ bindsym $mod+3 workspace $ws3
+ bindsym $mod+4 workspace $ws4
+ bindsym $mod+5 workspace $ws5
+ bindsym $mod+6 workspace $ws6
+ bindsym $mod+7 workspace $ws7
+ bindsym $mod+8 workspace $ws8
+ bindsym $mod+9 workspace $ws9
+ bindsym $mod+0 workspace $ws10
+
+ # move focused container to workspace
+ bindsym $mod+Shift+1 move container to workspace $ws1
+ bindsym $mod+Shift+2 move container to workspace $ws2
+ bindsym $mod+Shift+3 move container to workspace $ws3
+ bindsym $mod+Shift+4 move container to workspace $ws4
+ bindsym $mod+Shift+5 move container to workspace $ws5
+ bindsym $mod+Shift+6 move container to workspace $ws6
+ bindsym $mod+Shift+7 move container to workspace $ws7
+ bindsym $mod+Shift+8 move container to workspace $ws8
+ bindsym $mod+Shift+9 move container to workspace $ws9
+ bindsym $mod+Shift+0 move container to workspace $ws10
+
+ # reload the configuration file
+ bindsym $mod+Shift+c reload
+ # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
+ bindsym $mod+Shift+r restart
+
+ # resize window (you can also use the mouse for that)
+ mode "resize" {
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym j resize grow height 10 px or 10 ppt
+ bindsym k resize shrink height 10 px or 10 ppt
+ bindsym l resize grow width 10 px or 10 ppt
+
+ # same bindings, but for the arrow keys
+ bindsym Left resize shrink width 10 px or 10 ppt
+ bindsym Down resize grow height 10 px or 10 ppt
+ bindsym Up resize shrink height 10 px or 10 ppt
+ bindsym Right resize grow width 10 px or 10 ppt
+
+ # back to normal: Enter or Escape or $mod+r
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+ bindsym $mod+r mode "default"
+ }
+
+ bindsym $mod+r mode "resize"
+
+ # class border bground text indicator child_border
+ client.focused #83CAFA #51A2DA #FFFFFF #83CAFA #51A2DA
+ client.unfocused #4C4C4C #222222 #888888 #292D2E #222222
+ client.urgent #EC69A0 #DB3279 #FFFFFF #DB3279 #DB3279
+ client.placeholder #000000 #0C0C0C #FFFFFF #000000 #0C0C0C
+
+ client.background #FFFFFF
+
+ bar {
+ swaybar_command waybar
+ }
+
+ input type:keyboard {
+ xkb_layout us,us_intl,de
+ xkb_options grp:rctrl_toggle
+ }
+
+ gaps outer 5
+ gaps inner 5
+ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
+ output "LG Electronics LG HDR 4K 0x0001A8D9" scale 1.4
+
+
+ exec nextcloud
+ exec mako
+ exec blueman-applet
+ '';
+}