2019-12-15 10:50:21 +01:00
|
|
|
#+TITLE: Simple X Hotkey Daemon
|
2021-01-01 20:12:34 +01:00
|
|
|
#+SETUPFILE: ./setup/org-setup-file.org
|
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
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* Basic
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Kill Windows
|
|
|
|
super + ctrl + x
|
|
|
|
xkill
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# make sxhkd reload its configuration files:
|
|
|
|
super + Escape
|
|
|
|
pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'
|
2019-12-29 15:13:00 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Update Polybar
|
|
|
|
super + shift + r
|
|
|
|
polybar-msg cmd restart
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
|
|
|
|
2020-01-12 17:15:09 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Exit Screen
|
|
|
|
XF86PowerOff
|
|
|
|
i3exit
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Exit Screen
|
|
|
|
super + 0
|
|
|
|
i3exit
|
2020-01-12 17:15:09 +01:00
|
|
|
#+end_src
|
|
|
|
|
2021-01-01 20:12:34 +01:00
|
|
|
Change Keyboard Layout:
|
2019-12-29 15:13:00 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Change keyboard to US-International layout
|
|
|
|
super + ctrl + d
|
|
|
|
setxkbmap -layout us -variant intl -option caps:escape
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Change keyboard to US layout
|
|
|
|
super + shift + d
|
|
|
|
setxkbmap -layout us -option caps:escape
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
* Multimedia keys
|
|
|
|
** Sound
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Mute/Unmute
|
|
|
|
XF86AudioMute
|
|
|
|
amixer -D pulse sset Master toggle
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Increase Volume
|
|
|
|
XF86AudioRaiseVolume
|
|
|
|
amixer -D pulse sset Master 2%+
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Decrease Volume
|
|
|
|
XF86AudioLowerVolume
|
|
|
|
amixer -D pulse sset Master 2%-
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
** Backlight
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Increase Backlight
|
|
|
|
XF86MonBrightnessUp
|
|
|
|
xbacklight -inc 10
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Descrease Backlight
|
|
|
|
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
|
2021-01-08 01:26:27 +01:00
|
|
|
# Play/Pause music
|
|
|
|
super + period
|
|
|
|
mpc toggle
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Previous/Next music
|
|
|
|
super + {greater,less}
|
|
|
|
mpc {next,prev}
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Play/Pause music
|
|
|
|
XF86AudioPlay
|
|
|
|
mpc toggle
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Next music
|
|
|
|
XF86AudioNext
|
|
|
|
mpc next
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Previous music
|
|
|
|
XF86AudioPrev
|
|
|
|
mpc prev
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
** Print Screen
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Screenshot script
|
|
|
|
Print
|
|
|
|
~/.local/bin/screenshot
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Switch Windows
|
|
|
|
XF86Display
|
|
|
|
rofi -show window
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
2019-12-29 15:13:00 +01:00
|
|
|
** Other
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Run Command
|
|
|
|
XF86Search
|
|
|
|
rofi -show run
|
2019-12-15 10:50:21 +01:00
|
|
|
#+end_src
|
|
|
|
|
2021-01-01 20:12:34 +01:00
|
|
|
* =Super + key= - Start Applications
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Switch Windows
|
|
|
|
super + w
|
|
|
|
rofi -show window
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# program launcher
|
|
|
|
super + d
|
|
|
|
rofi -show run
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# categorized menu
|
|
|
|
super + z
|
|
|
|
rofi -show drun
|
2021-01-01 20:12:34 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Start Terminal
|
|
|
|
super + Return
|
|
|
|
$TERMINAL
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# File Manager
|
|
|
|
super + o
|
2021-05-13 19:09:17 +02:00
|
|
|
$TERMINAL -e tmux new-session -A -s ranger ranger
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Browser
|
|
|
|
super + i
|
|
|
|
qutebrowser
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Mails with neomutt
|
|
|
|
super + m
|
2021-05-13 19:09:17 +02:00
|
|
|
$TERMINAL -e tmux new-session -A -s neomutt neomutt
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Emacs Client
|
|
|
|
super + e
|
|
|
|
emacsclient -create-frame --alternate-editor=""
|
2021-01-01 20:12:34 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
* =Super + Shift= - Managing Applications
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Bluetooth Manager
|
|
|
|
super + shift + b
|
|
|
|
blueman-manager
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-04-25 19:10:57 +02:00
|
|
|
# Calculator
|
|
|
|
super + shift + c
|
|
|
|
rofi-calc
|
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Sound Manager
|
|
|
|
super + shift + s
|
|
|
|
pavucontrol
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Passwords
|
|
|
|
super + shift + p
|
|
|
|
rofi-pass
|
2021-01-01 20:12:34 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
* =Super + Space= - Command Mode
|
2019-12-15 10:50:21 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Command line Calendar Client (khal)
|
|
|
|
super + space ; c
|
2021-05-13 19:09:17 +02:00
|
|
|
$TERMINAL --title khal -e ikhal
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# pcmanfm: GUI file manager
|
|
|
|
super + space ; o
|
2022-02-06 21:48:13 +01:00
|
|
|
nautilus;
|
2020-05-26 08:35:45 +02:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Run another instance of Neomutt in read-only mode
|
|
|
|
super + space ; m
|
2021-05-13 19:09:17 +02:00
|
|
|
$TERMINAL -e neomutt -R
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Music with ncmpcpp
|
|
|
|
super + space ; p
|
2021-05-13 19:09:17 +02:00
|
|
|
$TERMINAL -e tmux new-session -A -s ncmpcpp ncmpcpp
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Default Browser
|
|
|
|
super + space ; i
|
|
|
|
$BROWSER;
|
2019-12-15 10:50:21 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Emacs
|
|
|
|
super + space ; e
|
|
|
|
emacsclient -create-frame --alternate-editor=""
|
2019-12-29 15:13:00 +01:00
|
|
|
#+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:
|
|
|
|
|
2021-01-01 20:12:34 +01:00
|
|
|
** Kill Window
|
2019-12-29 15:13:00 +01:00
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# close and kill
|
|
|
|
super + q
|
|
|
|
i3-msg kill
|
2019-12-29 15:13:00 +01:00
|
|
|
#+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
|
2021-01-08 01:26:27 +01:00
|
|
|
# Set the window to full-screen
|
|
|
|
super + f
|
|
|
|
i3-msg fullscreen toggle
|
2020-04-06 00:12:04 +02:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Set the window to floating
|
|
|
|
super + s
|
|
|
|
i3-msg floating toggle
|
2020-04-06 00:12:04 +02:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Alternate between the tiled and normal layout
|
|
|
|
super + t
|
|
|
|
i3-msg layout toggle tabbed split
|
2019-12-29 15:13:00 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Change focus between tiling / floating windows
|
|
|
|
super + c
|
|
|
|
i3-msg focus mode_toggle
|
2019-12-29 15:13:00 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Sticky window
|
|
|
|
super + y
|
|
|
|
i3-msg sticky toggle
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** focus/swap
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# 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
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Focus the next/previous desktop in the current monitor
|
|
|
|
super + {p,n}
|
|
|
|
i3-msg workspace {prev,next}
|
2019-12-29 15:13:00 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Focus the last Desktop
|
|
|
|
super + b
|
|
|
|
i3-msg workspace back_and_forth
|
2019-12-29 15:13:00 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Focus to the given desktop
|
|
|
|
super + {1-9}
|
|
|
|
i3-msg workspace '{1-9}'
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Send to the given desktop
|
|
|
|
super + ctrl + {1-9}
|
|
|
|
i3-msg move container to workspace '{1-9}'
|
2021-01-01 20:12:34 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# 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
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Preselect
|
|
|
|
Preselect the direction
|
|
|
|
#+begin_src conf
|
2021-01-08 01:26:27 +01:00
|
|
|
# Set Horizontal Layout
|
|
|
|
super + ctrl + {h,l,Left,Right}
|
|
|
|
i3-msg split h
|
2019-12-30 17:21:56 +01:00
|
|
|
|
2021-01-08 01:26:27 +01:00
|
|
|
# Set Vertical Layout
|
|
|
|
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
|
2021-01-08 01:26:27 +01:00
|
|
|
# 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
|
2019-12-29 15:13:00 +01:00
|
|
|
#+end_src
|