Skip to content

Commit

Permalink
add skhd
Browse files Browse the repository at this point in the history
  • Loading branch information
ayubun committed Jul 10, 2024
1 parent 158a44a commit be1b8e5
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 1 deletion.
115 changes: 115 additions & 0 deletions configs/.skhdrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# NOTE(koekeishiya): A list of all built-in modifier and literal keywords can
# be found at https://github.com/koekeishiya/skhd/issues/1
#
# A hotkey is written according to the following rules:
#
# hotkey = <mode> '<' <action> | <action>
#
# mode = 'name of mode' | <mode> ',' <mode>
#
# action = <keysym> '[' <proc_map_lst> ']' | <keysym> '->' '[' <proc_map_lst> ']'
# <keysym> ':' <command> | <keysym> '->' ':' <command>
# <keysym> ';' <mode> | <keysym> '->' ';' <mode>
#
# keysym = <mod> '-' <key> | <key>
#
# mod = 'modifier keyword' | <mod> '+' <mod>
#
# key = <literal> | <keycode>
#
# literal = 'single letter or built-in keyword'
#
# keycode = 'apple keyboard kVK_<Key> values (0x3C)'
#
# proc_map_lst = * <proc_map>
#
# proc_map = <string> ':' <command> | <string> '~' |
# '*' ':' <command> | '*' '~'
#
# string = '"' 'sequence of characters' '"'
#
# command = command is executed through '$SHELL -c' and
# follows valid shell syntax. if the $SHELL environment
# variable is not set, it will default to '/bin/bash'.
# when bash is used, the ';' delimeter can be specified
# to chain commands.
#
# to allow a command to extend into multiple lines,
# prepend '\' at the end of the previous line.
#
# an EOL character signifies the end of the bind.
#
# -> = keypress is not consumed by skhd
#
# * = matches every application not specified in <proc_map_lst>
#
# ~ = application is unbound and keypress is forwarded per usual, when specified in a <proc_map>
#
# NOTE(koekeishiya): A mode is declared according to the following rules:
#
# mode_decl = '::' <name> '@' ':' <command> | '::' <name> ':' <command> |
# '::' <name> '@' | '::' <name>
#
# name = desired name for this mode,
#
# @ = capture keypresses regardless of being bound to an action
#
# command = command is executed through '$SHELL -c' and
# follows valid shell syntax. if the $SHELL environment
# variable is not set, it will default to '/bin/bash'.
# when bash is used, the ';' delimeter can be specified
# to chain commands.
#
# to allow a command to extend into multiple lines,
# prepend '\' at the end of the previous line.
#
# an EOL character signifies the end of the bind.

# add an on_enter command to the default mode
# :: default : yabai -m config active_window_border_color 0xff775759
#
# defines a new mode 'test' with an on_enter command, that captures keypresses
# :: test @ : yabai -m config active_window_border_color 0xff24ccaa
#
# from 'default' mode, activate mode 'test'
# cmd - x ; test
#
# from 'test' mode, activate mode 'default'
# test < cmd - x ; default
#
# launch a new terminal instance when in either 'default' or 'test' mode
# default, test < cmd - return : open -na /Applications/Terminal.app

# application specific bindings
#
# cmd - n [
# "kitty" : echo "hello kitty"
# * : echo "hello everyone"
# "qutebrowser" : echo "hello qutebrowser"
# "terminal" ~
# "finder" : false
# ]

# specify a file that should be included as an additional config-file.
# treated as an absolutepath if the filename begins with '/' otherwise
# the file is relative to the path of the config-file it was loaded from.
#
# .load "/Users/Koe/.config/partial_skhdrc"
# .load "partial_skhdrc"

# prevent skhd from monitoring events for specific applications.
#
# .blacklist [
# "kitty"
# "terminal"
# "qutebrowser"
# ]

# open terminal, blazingly fast compared to iTerm/Hyper
# cmd - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~

# open qutebrowser
# cmd + shift - return : ~/Scripts/qtb.sh

# open mpv
# cmd - m : open -na /Applications/mpv.app $(pbpaste)
3 changes: 2 additions & 1 deletion configs/.yabairc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ yabai -m config window_opacity on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.8

yabai -m config layout bsp
# Defaults to float
yabai -m config layout float
1 change: 1 addition & 0 deletions programs/mac/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ packages=(
'--cask signal'
'--cask telegram'
'--cask arc'
'koekeishiya/formulae/skhd'
)

# For some reason, the brew install for docker fails unless we ensure this doesn't exist prior
Expand Down

0 comments on commit be1b8e5

Please sign in to comment.