+### load system
+include /etc/sway/config.d/*
+
+### exports
+# XXX: this works but I feel like it shouldn't
+exec '\
+ export XDG_SESSION_TYPE=${XDG_SESSION_TYPE:-wayland}; \
+ export QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-wayland-egl}; \
+ export QT_WAYLAND_DISABLE_WINDOWDECORATION=${QT_WAYLAND_DISABLE_WINDOWDECORATION:--1}; \
+ export SDL_VIDEODRIVER=${SDL_VIDEODRIVER:-wayland}; \
+ export TERMINAL=${TERMINAL:-footclient}'
+
+### daemons
+exec dunst
+exec foot --server
+#exec mpc-notify -d
+exec swayidle timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
+# x220t
+# TODO: check hostname to load auxillary things
+# TODO: reformat for linux
+#exec acpi_ac "0x0`sysctl -n hw.acpi.acline`"
+
+### Xorg config
+xwayland force
+# XXX: this works but I feel like it shouldn't
+exec xrdb -merge ~/.Xresources
+exec '\
+ find -L "$${XDG_DATA_HOME:-~/share}/fonts" -mindepth 1 -maxdepth 2 -type d | while read -r x; do \
+ [ -f "$$x/fonts.dir" ] && xset +fp "$$x"; \
+ done; \
+ xset fp rehash'
+
+### inputs
+input 1:1:AT_Translated_Set_2_keyboard {
+ xkb_layout us
+ xkb_options caps:super
+ xkb_numlock enable
+ repeat_delay 290
+ repeat_rate 26
+}
-# master modifier key
+### binds
set $mod Mod4
-### important binds ###
-# reload the configuration file
-bindsym $mod+Shift+c reload
-# restart i3 inplace
-bindsym $mod+Shift+r restart
-# exit i3
-bindsym $mod+Shift+e exec --no-startup-id i3-nagbar -t warning -m Exit? -b Yes 'i3-msg exit'
-
-### applications ###
-# x220t bezel buttons
-bindcode 198 exec --no-startup-id rotate set normal
-bindcode 204 exec --no-startup-id rotate right
+bindsym $mod+Shift+r reload
+bindsym $mod+Shift+e exec swaynag -t warning -m Exit? -b Yes 'swaymsg exit'
-# terminal
-bindsym $mod+Return exec --no-startup-id i3-sensible-terminal
+## terminal
+bindsym $mod+Return exec [ -n "$$TERMINAL" ] && exec $$TERMINAL || exec footclient
-# dmenu
-bindsym $mod+d exec --no-startup-id $HOME/bin/dmenu_runsmart -p "%"
+## menu
+bindsym $mod+d exec nwgdmenu
+bindsym $mod+Shift+d exec nwggrid
+bindsym $mod+Ctrl+d exec nwgbar
+## special
# mpc
-bindsym XF86AudioPlay exec --no-startup-id mpc -h /var/mpd/socket play
-bindsym XF86AudioStop exec --no-startup-id mpc -h /var/mpd/socket pause
-bindsym XF86AudioPrev exec --no-startup-id mpc -h /var/mpd/socket cdprev
-bindsym XF86AudioNext exec --no-startup-id mpc -h /var/mpd/socket next
-
+#bindsym XF86AudioPlay exec mpc -h /var/mpd/socket play
+#bindsym XF86AudioStop exec mpc -h /var/mpd/socket pause
+#bindsym XF86AudioPrev exec mpc -h /var/mpd/socket cdprev
+#bindsym XF86AudioNext exec mpc -h /var/mpd/socket next
+# x220t bezel buttons
+#bindcode 198 exec rotate set normal
+#bindcode 204 exec rotate right
-### window management ###
-# directional keys
+## window management
set $up k
set $down j
set $left h
set $right l
-# arrow keys for completeness
set $up2 Up
set $down2 Down
set $left2 Left
set $right2 Right
-# change focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$down2 focus down
bindsym $mod+$up2 focus up
bindsym $mod+$right2 focus right
-# move focused window
+bindsym $mod+a focus parent
+bindsym $mod+z focus child
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$up2 move up
bindsym $mod+Shift+$right2 move right
-# split in horizontal orientation
bindsym $mod+i split h
-# split in vertical orientation
bindsym $mod+o split v
-# mouse+$mod to drag floating windows
floating_modifier $mod
+bindsym $mod+Shift+space floating toggle
+bindsym $mod+space focus mode_toggle
-# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f fullscreen toggle global
-# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
-# toggle tiling / floating
-bindsym $mod+Shift+space floating toggle
-
-# change focus between tiling / floating windows
-bindsym $mod+space focus mode_toggle
-
-# focus the parent container
-bindsym $mod+a focus parent
-
-# focus the child container
-bindsym $mod+z focus child
-
-# kill focused window
bindsym $mod+Shift+q kill
-# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
-
-# Show the next scratchpad window or hide the focused scratchpad window.
-# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
-# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
-# repeat workspace to go back
workspace_auto_back_and_forth yes
-# 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+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
+bindsym $mod+Shift+0 move container to workspace 10
-# move and resize [floating] windows
mode "translate" {
bindsym $left resize shrink width 20 px
bindsym $down resize grow height 20 px
bindsym Control+Shift+$up2 move up 1 px
bindsym Control+Shift+$right2 move right 1 px
- # toggle tiling / floating
- bindsym $mod+Shift+space floating toggle
-
- # change focus between tiling / floating windows
- bindsym $mod+space focus mode_toggle
-
- # focus the parent container
+ # focus
bindsym $mod+a focus parent
-
- # focus the child container
bindsym $mod+z focus child
- # back to normal: Enter, Escape, or original key
+ # floating
+ bindsym $mod+Shift+space floating toggle
+ bindsym $mod+space focus mode_toggle
+
+ # exit
bindsym Return mode default
bindsym Escape mode default
bindsym $mod+r mode default
bindsym $mod+r mode "translate"
-### appearance ###
-# font
-font pango:monospace 7
-
-# windows
-for_window [class="Gsimplecal"] floating enable
-for_window [class="XMixer"] floating enable
-
-# borders
+### appearance
+font pango:monospace 10
+seat seat0 xcursor_theme Paper 16
+## borders
+default_border pixel 1
hide_edge_borders smart
-new_window pixel 1
gaps inner 6
smart_gaps on
-
-# color definitions
+## colors
# generic
set $bg #110800
set $fg #93a1a1
set $b_fg #fdf6e3
set $b_ind #264db2
set $b_chb #4466ff
-
-# deprecated in favor of tint2
-#bar {
-# position top
-# output LVDS1
-# tray_output primary
-# status_command i3status
-# separator_symbol "|"
-#
-# colors {
-# background $bg
-# statusline $fg
-# separator $b_ind
-#
-# # class border backgr. text
-# focused_workspace $f_bdr $f_bg $f_fg
-# active_workspace $i_bdr $i_bg $i_fg
-# inactive_workspace $i_bdr $i_bg $i_fg
-# urgent_workspace $u_bdr $u_bg $u_fg
-# binding_mode $b_bdr $b_bg $b_fg
-# }
-#}
-
-# apply colors
# class border backgr. text indicator child_border
client.focused $f_bdr $f_bg $f_fg $f_ind $f_chb
client.focused_inactive $i_bdr $i_bg $i_fg $i_ind $i_chb
client.urgent $u_bdr $u_bg $u_fg $u_ind $u_chb
client.placeholder $b_bdr $b_bg $b_fg $b_ind $b_chb
client.background #221100
-# keep urgent colors around longer
force_display_urgency_hint 2000 ms
+
+bar {
+ position top
+ tray_output primary
+ status_command i3status
+ separator_symbol "|"
+
+ colors {
+ background $bg
+ statusline $fg
+ separator $b_ind
+
+ # class border backgr. text
+ focused_workspace $f_bdr $f_bg $f_fg
+ active_workspace $i_bdr $i_bg $i_fg
+ inactive_workspace $i_bdr $i_bg $i_fg
+ urgent_workspace $u_bdr $u_bg $u_fg
+ binding_mode $b_bdr $b_bg $b_fg
+ }
+}
+
+### load site-local
+include config.d/*