2019-12-15 10:50:21 +01:00
|
|
|
#+TITLE: Simple X Hotkey Daemon
|
2019-12-29 15:13:00 +01:00
|
|
|
:DRAWER:
|
2020-01-11 22:04:28 +01:00
|
|
|
#+STARTUP: overview
|
|
|
|
|
|
|
|
#+LANGUAGE: en
|
|
|
|
#+EMAIL: dehaeze.thomas@gmail.com
|
|
|
|
#+AUTHOR: Dehaeze Thomas
|
|
|
|
|
|
|
|
#+HTML_LINK_HOME: ./index.html
|
|
|
|
#+HTML_LINK_UP: ./index.html
|
|
|
|
|
2020-01-11 22:24:51 +01:00
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
|
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
|
|
|
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.min.js"></script>
|
|
|
|
#+HTML_HEAD: <script type="text/javascript" src="./js/bootstrap.min.js"></script>
|
|
|
|
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
|
|
|
|
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
|
2020-01-11 22:04:28 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
#+PROPERTY: header-args :comments no
|
|
|
|
#+PROPERTY: header-args+ :mkdirp yes
|
|
|
|
#+PROPERTY: header-args+ :tangle ~/.config/sxhkd/sxhkdrc
|
2019-12-15 10:50:21 +01:00
|
|
|
:END:
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* Basic
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2019-12-29 15:13:00 +01:00
|
|
|
super + ctrl + x
|
|
|
|
xkill
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
|
|
|
# make sxhkd reload its configuration files:
|
|
|
|
super + Escape
|
|
|
|
pkill -USR1 -x sxhkd
|
|
|
|
|
|
|
|
# Update Polybar
|
|
|
|
super + r
|
|
|
|
$HOME/.config/polybar/scripts/launch.sh
|
|
|
|
#+end_src
|
|
|
|
|
2020-01-12 17:15:09 +01:00
|
|
|
* Set shut down, restart and locking features
|
|
|
|
#+begin_src conf
|
|
|
|
XF86PowerOff
|
2020-04-06 23:56:37 +02:00
|
|
|
quit
|
2020-01-12 17:15:09 +01:00
|
|
|
super + 0
|
2020-04-06 23:56:37 +02:00
|
|
|
quit
|
2020-01-12 17:15:09 +01:00
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* Start Applications
|
|
|
|
#+begin_src conf
|
|
|
|
# Start program launcher
|
|
|
|
super + d
|
2019-12-15 10:50:21 +01:00
|
|
|
rofi -show run
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Launch categorized menu
|
2020-03-16 12:15:48 +01:00
|
|
|
super + z
|
2019-12-29 15:13:00 +01:00
|
|
|
rofi -show drun
|
|
|
|
|
|
|
|
# Start Sound Manager
|
|
|
|
super + shift + s
|
2019-12-15 10:50:21 +01:00
|
|
|
pavucontrol
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Start Bluetooth Manager
|
|
|
|
super + shift + b
|
2019-12-15 10:50:21 +01:00
|
|
|
blueman-manager
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Windows Switch
|
|
|
|
super + shift + w
|
2019-12-15 10:50:21 +01:00
|
|
|
rofi -show window
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Bookmarks
|
2020-03-01 21:36:01 +01:00
|
|
|
# super + shift + f
|
|
|
|
# $HOME/bin/bukurun
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Passwords
|
|
|
|
super + shift + p
|
2019-12-15 10:50:21 +01:00
|
|
|
rofi-pass
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
#+begin_src conf
|
|
|
|
# Start Terminal
|
|
|
|
super + Return
|
2020-01-12 17:15:09 +01:00
|
|
|
$TERMINAL
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Tmux Terminal
|
|
|
|
super + shift + Return
|
2020-01-12 17:15:09 +01:00
|
|
|
$TERMINAL -e 'tmux'
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Start Command line Calendar
|
|
|
|
super + shift + c
|
2020-01-12 17:15:09 +01:00
|
|
|
$TERMINAL -e "khal interactive"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# File Manager
|
|
|
|
super + o
|
2020-03-01 21:36:01 +01:00
|
|
|
$TERMINAL -e "tmux new-session -A -s ranger ranger"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Browser
|
|
|
|
super + i
|
2019-12-15 10:50:21 +01:00
|
|
|
qutebrowser
|
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* Multimedia keys
|
|
|
|
** Sound
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2019-12-29 15:13:00 +01:00
|
|
|
XF86AudioMute
|
2019-12-15 10:50:21 +01:00
|
|
|
amixer -D pulse sset Master toggle
|
2019-12-29 15:13:00 +01:00
|
|
|
XF86AudioRaiseVolume
|
2019-12-15 10:50:21 +01:00
|
|
|
amixer -D pulse sset Master 2%+
|
2019-12-29 15:13:00 +01:00
|
|
|
XF86AudioLowerVolume
|
2019-12-15 10:50:21 +01:00
|
|
|
amixer -D pulse sset Master 2%-
|
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
** Backlight
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2019-12-29 15:13:00 +01:00
|
|
|
XF86MonBrightnessUp
|
|
|
|
xbacklight -inc 10
|
|
|
|
XF86MonBrightnessDown
|
|
|
|
xbacklight -dec 10
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
** Change Tracks
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
|
|
|
super + period
|
|
|
|
mpc toggle
|
|
|
|
super + {greater,less}
|
|
|
|
mpc {next,prev}
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
|
|
|
XF86AudioPlay
|
|
|
|
mpc toggle
|
|
|
|
XF86AudioNext
|
|
|
|
mpc next
|
|
|
|
XF86AudioPrev
|
|
|
|
mpc prev
|
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
** Print Screen
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
|
|
|
Print
|
2020-04-06 23:56:37 +02:00
|
|
|
~/.local/bin/screenshot
|
2019-12-15 10:50:21 +01:00
|
|
|
XF86Display
|
|
|
|
rofi -show window
|
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
** Other
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2019-12-29 15:13:00 +01:00
|
|
|
XF86Search
|
2019-12-15 10:50:21 +01:00
|
|
|
rofi -show run
|
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* Command Mode
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2019-12-29 15:13:00 +01:00
|
|
|
# Command line Calendar Client (khal)
|
|
|
|
super + space ; c
|
2020-01-12 17:15:09 +01:00
|
|
|
$TERMINAL -e "khal interactive"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# GUI Calendar (Google Calendar)
|
|
|
|
super + space ; shift + c
|
2020-03-01 21:36:01 +01:00
|
|
|
$BROWSER https://calendar.google.com/
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# pcmanfm: GUI file manager
|
2020-03-01 21:36:01 +01:00
|
|
|
super + space ; o
|
2019-12-15 10:50:21 +01:00
|
|
|
pcmanfm;
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Mails with neomutt
|
|
|
|
super + space ; m
|
2020-03-01 21:36:01 +01:00
|
|
|
$TERMINAL -e "tmux new-session -A -s neomutt neomutt"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
super + space ; shift + m
|
2020-01-12 17:15:09 +01:00
|
|
|
$TERMINAL -e "neomutt -R"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Weechat
|
|
|
|
super + space ; w
|
2020-03-01 21:36:01 +01:00
|
|
|
$TERMINAL -e "tmux new-session -A -s weechat weechat"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# News with newsboat
|
|
|
|
super + space ; n
|
2020-03-01 21:36:01 +01:00
|
|
|
$TERMINAL -e "tmux new-session -A -s newsboat newsboat"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Music with ncmpcpp
|
|
|
|
super + space ; p
|
2020-03-01 21:36:01 +01:00
|
|
|
$TERMINAL -e "tmux new-session -A -s ncmpcpp ncmpcpp"
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
# Print Screen
|
|
|
|
super + space ; shift + p
|
2020-04-06 23:56:37 +02:00
|
|
|
$HOME/.local/bin/mopidy-restart
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2020-03-01 21:36:01 +01:00
|
|
|
# Default Browser
|
2019-12-29 15:13:00 +01:00
|
|
|
super + space ; i
|
2020-03-01 21:36:01 +01:00
|
|
|
$BROWSER;
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2020-03-27 15:38:04 +01:00
|
|
|
# Start Terminal Application
|
|
|
|
super + space ; t
|
|
|
|
$TERMINAL -e "tremc"
|
|
|
|
|
2020-03-01 21:36:01 +01:00
|
|
|
# Alternative Browser
|
2019-12-29 15:13:00 +01:00
|
|
|
super + space ; shift + i
|
2020-03-01 21:36:01 +01:00
|
|
|
brave;
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2020-03-01 21:36:01 +01:00
|
|
|
# Emacs
|
2019-12-29 15:13:00 +01:00
|
|
|
super + space ; e
|
2020-03-01 21:36:01 +01:00
|
|
|
emacs;
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2020-03-01 21:36:01 +01:00
|
|
|
# Emacs Client
|
2019-12-29 15:13:00 +01:00
|
|
|
super + space ; shift + e
|
2020-03-01 21:36:01 +01:00
|
|
|
emacsclient -create-frame --alternate-editor=""
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* Change Keyboard Layout
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
|
|
|
super + ctrl + d
|
|
|
|
setxkbmap -layout us -variant intl -option caps:escape
|
|
|
|
super + shift + d
|
|
|
|
setxkbmap -layout us -option caps:escape
|
|
|
|
#+end_src
|
2019-12-29 15:13:00 +01:00
|
|
|
|
|
|
|
* BSPWM related
|
|
|
|
:PROPERTIES:
|
|
|
|
:header-args:conf+: :tangle ~/.config/sxhkd/sxhkdrc.bspwm
|
|
|
|
:END:
|
|
|
|
|
|
|
|
** BSPWM hotkeys
|
|
|
|
#+begin_src conf
|
|
|
|
# quit/restart bspwm
|
|
|
|
super + alt + {q,r}
|
|
|
|
bspc {quit,wm -r}
|
|
|
|
|
|
|
|
# close and kill
|
|
|
|
super + {_,shift + }q
|
|
|
|
bspc node -{c,k}
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Monocle Layout
|
|
|
|
#+begin_src conf
|
|
|
|
# alternate between the tiled and monocle layout
|
2019-12-30 21:19:33 +01:00
|
|
|
super + m
|
2019-12-29 15:13:00 +01:00
|
|
|
bspc desktop -l next
|
|
|
|
|
|
|
|
# focus the next/previous node in the current desktop
|
|
|
|
super + c
|
|
|
|
bspc node -f next.local
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Set the window State
|
|
|
|
#+begin_src conf
|
2019-12-30 21:19:33 +01:00
|
|
|
# Set the window state to tiled
|
|
|
|
super + t
|
|
|
|
bspc node -t tiled
|
|
|
|
|
|
|
|
|
|
|
|
# Toggle Fullscreen State
|
|
|
|
super + f
|
|
|
|
if [ -z "$(bspc query -N -n focused.fullscreen)" ]; then \
|
|
|
|
bspc node focused -t fullscreen; \
|
|
|
|
else \
|
|
|
|
bspc node focused -t tiled; \
|
|
|
|
fi
|
2019-12-30 17:21:56 +01:00
|
|
|
|
2019-12-30 21:19:33 +01:00
|
|
|
# Toggle Floating State
|
2019-12-30 17:21:56 +01:00
|
|
|
super + s
|
|
|
|
if [ -z "$(bspc query -N -n focused.floating)" ]; then \
|
|
|
|
bspc node focused -t floating; \
|
|
|
|
else \
|
|
|
|
bspc node focused -t tiled; \
|
|
|
|
fi
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Sticky Window
|
|
|
|
#+begin_src conf
|
|
|
|
# set the node flags
|
|
|
|
super + ctrl + y
|
|
|
|
bspc node -g sticky
|
|
|
|
#+end_src
|
|
|
|
|
2019-12-30 17:21:56 +01:00
|
|
|
** Focus and Swap
|
2019-12-29 15:13:00 +01:00
|
|
|
#+begin_src conf
|
|
|
|
# Focus/swap the node in the given direction
|
|
|
|
super + {_,shift + }{h,j,k,l}
|
|
|
|
bspc node -{f,s} {west,south,north,east}
|
|
|
|
|
|
|
|
# focus the last Node
|
|
|
|
super + Tab
|
|
|
|
bspc node -f last
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
|
|
|
# Focus the next/previous desktop in the current monitor
|
|
|
|
super + {p,n}
|
|
|
|
bspc desktop -f {prev,next}.local
|
|
|
|
|
|
|
|
# focus the last Desktop
|
|
|
|
super + b
|
|
|
|
bspc desktop -f last
|
|
|
|
|
|
|
|
# focus or send to the given desktop
|
|
|
|
super + {_,ctrl + }{1-9}
|
|
|
|
bspc {desktop -f,node -d} '^{1-9}'
|
|
|
|
|
|
|
|
# Send and Focus to the given desktop
|
|
|
|
super + shift + {1-9}
|
|
|
|
bspc node -d '^{1-9}' --follow
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Preselect
|
|
|
|
#+begin_src conf
|
|
|
|
# preselect the direction
|
|
|
|
super + ctrl + {h,j,k,l}
|
|
|
|
bspc node -p {west,south,north,east}
|
|
|
|
|
|
|
|
# preselect the ratio
|
|
|
|
# super + ctrl + {1-9}
|
|
|
|
# bspc node -o 0.{1-9}
|
|
|
|
|
|
|
|
# cancel the preselection for the focused node
|
|
|
|
super + ctrl + space
|
|
|
|
bspc node -p cancel
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Resize
|
|
|
|
#+begin_src conf
|
|
|
|
# expand a window by moving one of its side outward
|
|
|
|
super + alt + {h,j,k,l}
|
|
|
|
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
|
|
|
|
|
|
|
# contract a window by moving one of its side inward
|
|
|
|
super + alt + shift + {h,j,k,l}
|
|
|
|
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
|
|
|
# move a floating window
|
|
|
|
super + {Left,Down,Up,Right}
|
|
|
|
bspc node -v {-20 0,0 20,0 -20,20 0}
|
|
|
|
#+end_src
|
2019-12-30 17:21:56 +01:00
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* I3 related
|
|
|
|
:PROPERTIES:
|
|
|
|
:header-args:conf+: :tangle ~/.config/sxhkd/sxhkdrc.i3
|
|
|
|
:END:
|
|
|
|
|
2020-03-01 21:36:01 +01:00
|
|
|
** Quit/Restart hotkeys
|
2019-12-29 15:13:00 +01:00
|
|
|
#+begin_src conf
|
|
|
|
# quit/restart bspwm
|
|
|
|
super + alt + {q,r}
|
|
|
|
i3-msg {quit,restart}
|
|
|
|
|
|
|
|
# close and kill
|
|
|
|
super + {_,shift + }q
|
|
|
|
i3-msg {kill,kill}
|
|
|
|
#+end_src
|
|
|
|
|
2020-04-06 00:12:04 +02:00
|
|
|
** Set the window State
|
2019-12-29 15:13:00 +01:00
|
|
|
#+begin_src conf
|
2020-04-06 00:12:04 +02:00
|
|
|
# Set the window to full-screen
|
2019-12-29 15:13:00 +01:00
|
|
|
super + f
|
2020-04-06 00:12:04 +02:00
|
|
|
i3-msg fullscreen toggle
|
|
|
|
|
|
|
|
# Set the window to floating
|
|
|
|
super + s
|
|
|
|
i3-msg floating toggle
|
|
|
|
|
|
|
|
# Alternate between the tiled and normal layout
|
|
|
|
super + t
|
2019-12-29 15:13:00 +01:00
|
|
|
i3-msg layout toggle tabbed split
|
|
|
|
|
2019-12-30 17:21:56 +01:00
|
|
|
# Change focus between tiling / floating windows
|
|
|
|
super + c
|
|
|
|
i3-msg focus mode_toggle
|
2019-12-29 15:13:00 +01:00
|
|
|
|
2020-04-06 00:12:04 +02:00
|
|
|
# Sticky window
|
|
|
|
super + y
|
2019-12-29 15:13:00 +01:00
|
|
|
i3-msg sticky toggle
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** focus/swap
|
|
|
|
#+begin_src conf
|
|
|
|
# Focus/swap the node in the given direction
|
2019-12-30 17:21:56 +01:00
|
|
|
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
|
2019-12-29 15:13:00 +01:00
|
|
|
#+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 or send to the given desktop
|
|
|
|
super + {1-9}
|
|
|
|
i3-msg workspace '{1-9}'
|
|
|
|
super + ctrl + {1-9}
|
|
|
|
i3-msg move container to workspace '{1-9}'
|
|
|
|
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
|
2019-12-30 17:21:56 +01:00
|
|
|
super + ctrl + {h,l,Left,Right}
|
|
|
|
i3-msg split h
|
|
|
|
|
|
|
|
super + ctrl + {j,k,Up,Down}
|
|
|
|
i3-msg split v
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Resize
|
|
|
|
Expand/Shrink a window
|
|
|
|
#+begin_src conf
|
|
|
|
super + alt + h
|
|
|
|
i3-msg resize shrink width 10 px or 10 ppt
|
|
|
|
super + alt + j
|
|
|
|
i3-msg resize grow height 10 px or 10 ppt
|
|
|
|
super + alt + k
|
|
|
|
i3-msg resize shrink height 10 px or 10 ppt
|
|
|
|
super + alt + l
|
|
|
|
i3-msg resize grow width 10 px or 10 ppt
|
|
|
|
#+end_src
|