Steve Ayerhart 2020-08-21 17:48:15 -04:00
parent 71b37dfd0c
commit 10ab4c7f11
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
1 changed files with 72 additions and 3 deletions

View File

@ -7,9 +7,17 @@
#+begin_src conf #+begin_src conf
set $mod Mod4 set $mod Mod4
#+end_src #+end_src
Movement
#+begin_src conf #+begin_src conf
set $term gnome-terminal --hide-menubar set $left h
set $menu dmenu_run set $down j
set $up k
set $right l
#+end_src
Some default programs
#+begin_src conf
set $term exec termite
set $menu exec dmenu_run
#+end_src #+end_src
* Window Borders * Window Borders
#+begin_src conf #+begin_src conf
@ -81,7 +89,7 @@
xkb_options ctrl:swapcaps xkb_options ctrl:swapcaps
} }
input * kxb_numlock enable input * xkb_numlock enable
#+end_src #+end_src
* Theme * Theme
@ -94,3 +102,64 @@
client.placeholder #4F5B66 #4F5B66 #D08770 #4F5B66 #4F5B66 client.placeholder #4F5B66 #4F5B66 #D08770 #4F5B66 #4F5B66
client.background #2B303B client.background #2B303B
#+end_src #+end_src
* Idle
Lock the screen after 600 seconds of inactivity, then turn off the display
after another 600 seconds. Turn on the screen when resumed. Lock the screen before
the computer goes to sleep too.
#+begin_src conf
exec swayidle -w \
timeout 600 'swaylock' \
timeout 1200 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock'
#+end_src
* Keybindings
Basics
#+begin_src conf
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exit
floating_modifier $mod normal
#+end_src
Focusing
#+begin_src conf
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
#+end_src
Move the focused window
#+begin_src conf
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
#+end_src
Resizing
#+begin_src conf
mode "resize" {
bindsym $left resize shrink width 1 px or 1 ppt
bindsym $down resize grow height 1 px or 1 ppt
bindsym $up resize shrink height 1 px or 1 ppt
bindsym $right resize grow width 1 px or 1 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#+end_src
Sway has a "scratchpad", which is a bag of holding for windows. Windows can be
sent there and back later.
#+begin_src conf
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
#+end_src
I run emacs as a server. I have keybindings to run specific programs in their own frame.
#+begin_src conf
bindsym $mod+grave exec emacsclient -c -a ''
bindsym $mod+Shift+b exec emacsclient -c -a '' -F '(quote (name . "buffers"))' --eval '(ibuffer)'
bindsym $mod+Shift+d exec emacsclient -c -a '' -F '(quote (name . "dired"))' --eval '(dired nil)'
bindsym $mod+Shift+f exec emacsclient -c -a '' -F '(quote (name . "feeds"))' --eval '(elfeed)'
bindsym $mod+Shift+s exec emacsclient -c -a '' -F '(quote (name . "eshell"))' --eval '(eshell)'
#+end_src