aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.nu8
-rw-r--r--src/sway/020_config194
2 files changed, 202 insertions, 0 deletions
diff --git a/install.nu b/install.nu
index 6d461aa..f7e6a8c 100755
--- a/install.nu
+++ b/install.nu
@@ -96,6 +96,14 @@ if ($DEVICE_ID == "010" or $DEVICE_ID == "020" or $DEVICE_ID == "040") {
}
+# sway
+if ($DEVICE_ID == "010" or $DEVICE_ID == "020") {
+
+ mkdir $"($env.HOME)/.config/sway"
+ cp $"($DOTFILES_DIR)/sway/($DEVICE_ID)_config" $"($env.HOME)/.config/sway/config"
+
+}
+
# yt-dlp
if ($DEVICE_ID == "010" or $DEVICE_ID == "020" or $DEVICE_ID == "040") {
diff --git a/src/sway/020_config b/src/sway/020_config
new file mode 100644
index 0000000..80531c1
--- /dev/null
+++ b/src/sway/020_config
@@ -0,0 +1,194 @@
+#
+# ~~~ sway config
+#
+
+#
+# ~~~ system
+
+# displays
+output eDP-1 pos 0 900
+output DP-2 pos 1920 0
+
+# brightness
+bindsym --locked XF86MonBrightnessUp exec xbacklight -inc 5
+bindsym --locked XF86MonBrightnessDown exec xbacklight -dec 5
+bindsym --locked Mod4+XF86MonBrightnessUp exec xbacklight -inc 10
+bindsym --locked Mod4+XF86MonBrightnessDown exec xbacklight -dec 10
+
+# night mode
+exec gammastep
+
+# locking
+bindswitch lid:toggle exec nu "${HOME}/scripts/sway/sleep.nu"
+
+# keyboard
+input type:keyboard {
+ xkb_layout "gb"
+ xkb_options caps:escape
+}
+
+# touchpad
+input type:touchpad {
+ tap enabled
+ natural_scroll enabled
+ middle_emulation enabled
+}
+
+# audio
+bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
+bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
+bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
+
+# notifications
+exec mako
+
+# polkit
+exec "${HOME}/scripts/sway/run.nu" soteria
+
+# workspaces
+workspace 1 output eDP-1
+workspace 2 output eDP-1
+workspace 3 output eDP-1
+workspace 4 output eDP-1
+workspace 5 output eDP-1
+workspace 6 output eDP-1
+workspace 7 output eDP-1
+workspace 8 output eDP-1
+workspace 9 output eDP-1
+workspace 10 output eDP-1
+workspace 11 output DP-2
+workspace 12 output DP-2
+workspace 13 output DP-2
+workspace 14 output DP-2
+workspace 15 output DP-2
+workspace 16 output DP-2
+workspace 17 output DP-2
+workspace 18 output DP-2
+workspace 19 output DP-2
+workspace 20 output DP-2
+
+# workspace switch
+bindsym Mod4+1 workspace number 1
+bindsym Mod4+2 workspace number 2
+bindsym Mod4+3 workspace number 3
+bindsym Mod4+4 workspace number 4
+bindsym Mod4+5 workspace number 5
+bindsym Mod4+6 workspace number 6
+bindsym Mod4+7 workspace number 7
+bindsym Mod4+8 workspace number 8
+bindsym Mod4+9 workspace number 9
+bindsym Mod4+0 workspace number 10
+bindsym Mod4+Ctrl+1 workspace number 11
+bindsym Mod4+Ctrl+2 workspace number 12
+bindsym Mod4+Ctrl+3 workspace number 13
+bindsym Mod4+Ctrl+4 workspace number 14
+bindsym Mod4+Ctrl+5 workspace number 15
+bindsym Mod4+Ctrl+6 workspace number 16
+bindsym Mod4+Ctrl+7 workspace number 17
+bindsym Mod4+Ctrl+8 workspace number 18
+bindsym Mod4+Ctrl+9 workspace number 19
+bindsym Mod4+Ctrl+0 workspace number 20
+
+# quick workspace switch
+bindsym Mod4+ctrl+left workspace prev
+bindsym Mod4+ctrl+right workspace next
+
+# workspace move
+bindsym Mod4+Shift+1 move container to workspace number 1
+bindsym Mod4+Shift+2 move container to workspace number 2
+bindsym Mod4+Shift+3 move container to workspace number 3
+bindsym Mod4+Shift+4 move container to workspace number 4
+bindsym Mod4+Shift+5 move container to workspace number 5
+bindsym Mod4+Shift+6 move container to workspace number 6
+bindsym Mod4+Shift+7 move container to workspace number 7
+bindsym Mod4+Shift+8 move container to workspace number 8
+bindsym Mod4+Shift+9 move container to workspace number 9
+bindsym Mod4+Shift+0 move container to workspace number 10
+bindsym Mod4+Ctrl+Shift+1 move container to workspace number 11
+bindsym Mod4+Ctrl+Shift+2 move container to workspace number 12
+bindsym Mod4+Ctrl+Shift+3 move container to workspace number 13
+bindsym Mod4+Ctrl+Shift+4 move container to workspace number 14
+bindsym Mod4+Ctrl+Shift+5 move container to workspace number 15
+bindsym Mod4+Ctrl+Shift+6 move container to workspace number 16
+bindsym Mod4+Ctrl+Shift+7 move container to workspace number 17
+bindsym Mod4+Ctrl+Shift+8 move container to workspace number 18
+bindsym Mod4+Ctrl+Shift+9 move container to workspace number 19
+bindsym Mod4+Ctrl+Shift+0 move container to workspace number 20
+
+# switch tiling direction
+bindsym Mod4+ctrl+h splith
+bindsym Mod4+ctrl+v splitv
+
+# switch tiling mode
+bindsym Mod4+ctrl+t layout tabbed
+bindsym Mod4+ctrl+s layout toggle split
+bindsym Mod4+ctrl+f fullscreen
+
+bindsym Mod4+ctrl+Space floating toggle
+bindsym Mod4+Shift+Space focus mode_toggle
+
+# reload sway
+bindsym Mod4+Shift+r reload
+
+#
+# ~~~ windows
+
+# move focus
+bindsym Mod4+up focus up
+bindsym Mod4+right focus right
+bindsym Mod4+down focus down
+bindsym Mod4+left focus left
+
+# move window
+bindsym Mod4+Shift+up move up
+bindsym Mod4+Shift+right move right
+bindsym Mod4+Shift+down move down
+bindsym Mod4+Shift+left move left
+
+# move floating window
+floating_modifier Mod4 normal
+
+#
+# ~~~ programs
+
+# close
+bindsym Mod4+q kill
+
+# terminal
+bindsym Mod4+Return exec kitty
+
+# launcher
+bindsym Mod4+Space exec nu "${HOME}/scripts/sway/launcher.nu"
+
+# browser
+bindsym Mod4+b exec nu "${HOME}/scripts/sway/run.nu" librewolf
+
+# passwords
+exec swaymsg "workspace 10; layout tabbed; exec nu ${HOME}/scripts/sway/run.nu keepassxc; workspace 1"
+
+# screenshots
+bindsym Print exec nu -c "grim -g (slurp) ~/pics/screenshots/(date now | format date '%Y-%m-%d %H:%M:%S').png"
+bindsym XF86SelectiveScreenshot exec nu -c "grim ~/pics/screenshots/(date now | format date '%Y-%m-%d %H:%M:%S').png"
+
+#
+# ~~~ theming
+
+# borders
+default_border pixel 2
+hide_edge_borders --i3 smart
+
+client.focused #e0e1e4 #e0e1e4 #18191b
+client.unfocused #18191b #18191b #e0e1e4
+
+# gaps
+gaps inner 4
+smart_gaps on
+
+# wallpaper
+output * bg ~/.wallpaper.png center
+
+# cursor
+seat seat0 xcursor_theme macOS 24
+
+# bar
+exec waybar