#+TITLE: Simple X Hotkey Daemon #+SETUPFILE: ./setup/org-setup-file.org #+PROPERTY: header-args :comments no #+PROPERTY: header-args+ :mkdirp yes #+PROPERTY: header-args+ :tangle ~/.config/sxhkd/sxhkdrc * Basic #+begin_src conf # Kill Windows super + ctrl + x xkill #+end_src #+begin_src conf # make sxhkd reload its configuration files: super + Escape pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config' # Update Polybar super + shift + r polybar-msg cmd restart #+end_src #+begin_src conf # Exit Screen XF86PowerOff i3exit # Exit Screen super + 0 i3exit #+end_src Change Keyboard Layout: #+begin_src conf # Change keyboard to US-International layout super + ctrl + d setxkbmap -layout us -variant intl -option caps:escape # Change keyboard to US layout super + shift + d setxkbmap -layout us -option caps:escape #+end_src * Multimedia keys ** Sound #+begin_src conf # Mute/Unmute XF86AudioMute amixer -D pulse sset Master toggle # Increase Volume XF86AudioRaiseVolume amixer -D pulse sset Master 2%+ # Decrease Volume XF86AudioLowerVolume amixer -D pulse sset Master 2%- #+end_src ** Backlight #+begin_src conf # Increase Backlight XF86MonBrightnessUp xbacklight -inc 10 # Descrease Backlight XF86MonBrightnessDown xbacklight -dec 10 #+end_src ** Change Tracks #+begin_src conf # Play/Pause music super + period mpc toggle # Previous/Next music super + {greater,less} mpc {next,prev} #+end_src #+begin_src conf # Play/Pause music XF86AudioPlay mpc toggle # Next music XF86AudioNext mpc next # Previous music XF86AudioPrev mpc prev #+end_src ** Print Screen #+begin_src conf # Screenshot script Print ~/.local/bin/screenshot # Switch Windows XF86Display rofi -show window #+end_src ** Other #+begin_src conf # Run Command XF86Search rofi -show run #+end_src * =Super + key= - Start Applications #+begin_src conf # Switch Windows super + w rofi -show window # program launcher super + d rofi -show run # categorized menu super + z rofi -show drun #+end_src #+begin_src conf # Start Terminal super + Return $TERMINAL # File Manager super + o $TERMINAL -e tmux new-session -A -s ranger ranger # Browser super + i qutebrowser # Mails with neomutt super + m $TERMINAL -e tmux new-session -A -s neomutt neomutt # Emacs Client super + e emacsclient -create-frame --alternate-editor="" #+end_src * =Super + Shift= - Managing Applications #+begin_src conf # Bluetooth Manager super + shift + b blueman-manager # Calculator super + shift + c rofi-calc # Sound Manager super + shift + s pavucontrol # Passwords super + shift + p rofi-pass #+end_src * =Super + Space= - Command Mode #+begin_src conf # Command line Calendar Client (khal) super + space ; c $TERMINAL --title khal -e ikhal # pcmanfm: GUI file manager super + space ; o nautilus; # Run another instance of Neomutt in read-only mode super + space ; m $TERMINAL -e neomutt -R # Music with ncmpcpp super + space ; p $TERMINAL -e tmux new-session -A -s ncmpcpp ncmpcpp # Default Browser super + space ; i $BROWSER; # Emacs super + space ; e emacsclient -create-frame --alternate-editor="" #+end_src * I3 related :PROPERTIES: :header-args:conf+: :tangle ~/.config/sxhkd/sxhkdrc.i3 :END: ** Kill Window #+begin_src conf # close and kill super + q i3-msg kill #+end_src ** Set the window State #+begin_src conf # Set the window to full-screen super + f i3-msg fullscreen toggle # Set the window to floating super + s i3-msg floating toggle # Alternate between the tiled and normal layout super + t i3-msg layout toggle tabbed split # Change focus between tiling / floating windows super + c i3-msg focus mode_toggle # Sticky window super + y i3-msg sticky toggle #+end_src ** focus/swap #+begin_src conf # Focus/swap the node in the given direction super + {_,shift + }{h,Left} i3-msg {focus,move} left super + {_,shift + }{j,Down} i3-msg {focus,move} down super + {_,shift + }{k,Up} i3-msg {focus,move} up super + {_,shift + }{l,Right} i3-msg {focus,move} right #+end_src #+begin_src conf # Focus the next/previous desktop in the current monitor super + {p,n} i3-msg workspace {prev,next} # Focus the last Desktop super + b i3-msg workspace back_and_forth # Focus to the given desktop super + {1-9} i3-msg workspace '{1-9}' # Send to the given desktop super + ctrl + {1-9} i3-msg move container to workspace '{1-9}' # Focus and Send to the given desktop super + shift + {1-9} WP={1-9} && i3-msg move container to workspace $WP && i3-msg workspace $WP #+end_src ** Preselect Preselect the direction #+begin_src conf # Set Horizontal Layout super + ctrl + {h,l,Left,Right} i3-msg split h # Set Vertical Layout super + ctrl + {j,k,Up,Down} i3-msg split v #+end_src ** Resize Expand/Shrink a window #+begin_src conf # Horizontal Shrink super + alt + h i3-msg resize shrink width 10 px or 10 ppt # Vertical Grow super + alt + j i3-msg resize grow height 10 px or 10 ppt # Vertical Shrink super + alt + k i3-msg resize shrink height 10 px or 10 ppt # Horizontal Grow super + alt + l i3-msg resize grow width 10 px or 10 ppt #+end_src