diff --git a/.config/sway/common/11-idle_lock.conf.bak b/.config/sway/common/11-idle_lock.conf.bak new file mode 100644 index 0000000..aa75189 --- /dev/null +++ b/.config/sway/common/11-idle_lock.conf.bak @@ -0,0 +1,19 @@ +# Sway Config: Idle and Lockscreen +# +# Thurstylark + +set $lock-time 600 +set $dispsleep-time 900 + +set $dispsleep 'swaymsg "output * dpms off"' +set $dispwake 'swaymsg "output * dpms on"' + +set $locker "swaylock -f -F -l -c 000000" + +exec swayidle -w \ + timeout $lock-time $locker \ + timeout $dispsleep-time $dispsleep \ + resume $dispwake \ + after-resume $dispwake \ + before-sleep $locker \ + lock $locker diff --git a/.config/sway/common/21-layout.conf b/.config/sway/common/21-layout.conf new file mode 100644 index 0000000..56e7411 --- /dev/null +++ b/.config/sway/common/21-layout.conf @@ -0,0 +1,21 @@ +# Sway Config: Layout +# +# Thurstylark + +# Set default layout for new workspaces +workspace_layout default + +# Set default layout for containers +default_orientation vertical + +# Set default border style +default_border pixel +default_floating_border pixel + +# Only enable borders if the workspace has >1 visible children +smart_borders on + +# Make window "sticky" to the output regardless of workspace +bindsym $mod+Shift+s sticky toggle + +# Layout-related keybindings can be found in ./20-keybindings.conf diff --git a/.config/sway/common/22-movement.conf b/.config/sway/common/22-movement.conf new file mode 100644 index 0000000..1094a90 --- /dev/null +++ b/.config/sway/common/22-movement.conf @@ -0,0 +1,27 @@ +# Sway Config: Movement +# +# Thurstylark + +# Move your focus around +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right + +# Or use $mod+[up|down|left|right] +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Move the focused window with the same, but add Shift +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up move up +bindsym $mod+Shift+$right move right + +# Ditto, with arrow keys +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right diff --git a/.config/sway/common/23-resizemode.inc b/.config/sway/common/23-resizemode.inc new file mode 100644 index 0000000..feec2ca --- /dev/null +++ b/.config/sway/common/23-resizemode.inc @@ -0,0 +1,26 @@ +# Sway Config: Resize Mode +# +# Thurstylark + + +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym q mode "default" +} diff --git a/.config/sway/common/24-workspaces.conf b/.config/sway/common/24-workspaces.conf new file mode 100644 index 0000000..b6a652c --- /dev/null +++ b/.config/sway/common/24-workspaces.conf @@ -0,0 +1,31 @@ +# Sway Config: Workspaces +# +# Thurstylark + +# Switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# Move workspace to different output +bindsym $mod+m move workspace to output right +bindsym $mod+Shift+m move workspace to output left diff --git a/.config/sway/common/30-bar.conf b/.config/sway/common/30-bar.conf index c87c0c6..cb8ed01 100644 --- a/.config/sway/common/30-bar.conf +++ b/.config/sway/common/30-bar.conf @@ -4,9 +4,7 @@ bar { position bottom - # When the status_command prints a new line to stdout, swaybar updates. - # The default just shows the current date and time. - status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done + status_command py3status -c ~/.config/sway/$hostname/py3status.py colors { statusline #ffffff diff --git a/.config/sway/common/41-input.conf b/.config/sway/common/41-input.conf new file mode 100644 index 0000000..ee39661 --- /dev/null +++ b/.config/sway/common/41-input.conf @@ -0,0 +1,30 @@ +# Sway Config: Common Input Configuration +# +# Thurstylark + +# Set common keyboard options +input type:keyboard { + # Enable NumLock + xkb_numlock enabled + # CapsLock is now Esc, but Shift+CapsLock behaves like normal CapsLock + xkb_options caps:escape_shifted_capslock +} + +# Set common touchpad options +input type:touchpad { + # Inverted Scrolling + natural_scroll enabled + # Disable-While-Typing + dwt enabled + # Tap-to-drag + drag disabled + # Tap-to-click + click_method none +} + +# Exclude CODEv3 keyboard from CapsLock swap +# (this is done in keyboard hardware) +input "3141:30354:SONiX_USB_Keyboard" { + # Returns CapsLock to default behavior + xkb_options caps:capslock +} diff --git a/.config/sway/kd-laptop/30-input.conf b/.config/sway/kd-laptop/30-input.conf new file mode 100644 index 0000000..ffe2bae --- /dev/null +++ b/.config/sway/kd-laptop/30-input.conf @@ -0,0 +1,22 @@ +# Sway Config: Input Config +# +# Thurstylark + +# Cursor hide delay (in ms) +set $cursor-delay "4000" + +set $touchpad "2:7:SynPS/2_Synaptics_Touchpad" +set $trackpoint "2:10:TPPS/2_IBM_TrackPoint" +set $trackpoint2 "1267:41:Elan_TrackPoint" + +# Touchpad options +input $touchpad { + pointer_accel 0.5 +} + +# Disable Trackpoint +input $trackpoint events disabled +input $trackpoint2 events disabled + +# Hide cursor after delay +seat * hide_cursor $cursor-delay diff --git a/.config/sway/kd-laptop/40-output.conf b/.config/sway/kd-laptop/40-output.conf new file mode 100644 index 0000000..41565c2 --- /dev/null +++ b/.config/sway/kd-laptop/40-output.conf @@ -0,0 +1,35 @@ +# Sway config: Output +# +# Thurstylark + +# Setup for built-in monitor +set $o-internal-id "eDP-1" +set $o-internal-mode "1920x1080@60Hz" +set $o-internal-pos-x "0" +set $o-internal-pos-y "0" + +# Setup for 4k monitor attached to work dock +set $o-dock4k-id "Ancor Communications Inc ASUS PB287Q 0x00005B34" +set $o-dock4k-mode "2560x1440@59Hz" +set $o-dock4k-pos-x "1920" +set $o-dock4k-pos-y "0" + +# Setup for 1080 monitor attached to work dock +set $o-docklg-id "Goldstar Company Ltd LG FULL HD 503NDWEH8441" +set $o-docklg-mode "1920x1080@60Hz" +set $o-docklg-pos-x "4480" +set $o-docklg-pos-y "0" + + +# Sane default of 1080p60 +output * mode 1920x1080@60Hz + +output * bg ~/.config/sway/$hostname/bg center #000000 + +# Set minimum brightness +exec "light -N 6" + +# Set monitors for work dock +output $o-internal-id pos $o-internal-pos-x $o-internal-pos-y mode $o-internal-mode +output $o-dock4k-id pos $o-dock4k-pos-x $o-dock4k-pos-y mode $o-dock4k-mode +output $o-docklg-id pos $o-docklg-pos-x $o-docklg-pos-y mode $o-docklg-mode diff --git a/.config/sway/kd-laptop/bg b/.config/sway/kd-laptop/bg new file mode 100644 index 0000000..d7e610a Binary files /dev/null and b/.config/sway/kd-laptop/bg differ diff --git a/.config/sway/kd-laptop/py3status.py b/.config/sway/kd-laptop/py3status.py new file mode 100644 index 0000000..bafe760 --- /dev/null +++ b/.config/sway/kd-laptop/py3status.py @@ -0,0 +1,34 @@ +order += "arch_updates" +order += "volume_status" +order += "sysdata" +order += "keyboard_locks" +order += "battery_level" +order += "clock" + + +clock { + format_time = "%F %H:%M" +} + +arch_updates { + format = "U: {pacman}" +} + +battery_level { + format = "🔋{percent}% ({time_remaining})" + hide_seconds = true +} + +keyboard_locks { + format = "[\?if=num_lock&color=good N|\?color=bad n] [\?if=caps_lock&color=good C|\?color=bad c] [\?if=scroll_lock&color=good S|\?color=bad s]" +} + +volume_status { + command = "pactl" + max_volume = 100 +} + +sysdata { + format = "[\?color=cpu CPU: {cpu_used_percent}%], [\?color=mem Mem: {mem_used_percent}%], [\?color=load L1: {load1}], [\?color=load L5: {load5}], [\?color=load L15: {load15}]" +} +