Lots of stuff. Working on refactoring
This commit is contained in:
107
wm/chunkwmrc
Executable file
107
wm/chunkwmrc
Executable file
@@ -0,0 +1,107 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# NOTE: specify the absolutepath to the directory to use when
|
||||
# loading a plugin. '~' expansion is supported.
|
||||
#
|
||||
|
||||
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
|
||||
|
||||
#
|
||||
# NOTE: if enabled, chunkwm will monitor the specified plugin_dir
|
||||
# and automatically reload any '.so' file that is changed.
|
||||
#
|
||||
|
||||
chunkc core::hotload 1
|
||||
|
||||
#
|
||||
# NOTE: the following are config variables for the chunkwm-tiling plugin.
|
||||
#
|
||||
|
||||
# desktop1 Höger skärm
|
||||
# desktop2 Vänster skärm
|
||||
|
||||
chunkc set global_desktop_mode bsp
|
||||
chunkc set 5_desktop_mode float
|
||||
|
||||
chunkc set 1_desktop_tree ~/.chunkwm_layouts/dev_1
|
||||
|
||||
chunkc set global_desktop_offset_top 20
|
||||
chunkc set global_desktop_offset_bottom 20
|
||||
chunkc set global_desktop_offset_left 20
|
||||
chunkc set global_desktop_offset_right 20
|
||||
chunkc set global_desktop_offset_gap 15
|
||||
|
||||
chunkc set 1_desktop_offset_top 30
|
||||
chunkc set 1_desktop_offset_bottom 30
|
||||
chunkc set 1_desktop_offset_left 30
|
||||
chunkc set 1_desktop_offset_right 30
|
||||
chunkc set 1_desktop_offset_gap 30
|
||||
|
||||
chunkc set 2_desktop_offset_top 20
|
||||
chunkc set 2_desktop_offset_bottom 20
|
||||
chunkc set 2_desktop_offset_left 20
|
||||
chunkc set 2_desktop_offset_right 20
|
||||
chunkc set 2_desktop_offset_gap 20
|
||||
|
||||
chunkc set desktop_padding_step_size 10.0
|
||||
chunkc set desktop_gap_step_size 5.0
|
||||
|
||||
chunkc set bsp_spawn_left 1
|
||||
chunkc set bsp_optimal_ratio 1.618
|
||||
chunkc set bsp_split_mode optimal
|
||||
chunkc set bsp_split_ratio 0.5
|
||||
|
||||
chunkc set window_focus_cycle monitor
|
||||
chunkc set mouse_follows_focus 1
|
||||
chunkc set window_float_next 0
|
||||
chunkc set window_float_center 1
|
||||
chunkc set window_region_locked 1
|
||||
|
||||
#
|
||||
# NOTE: shell commands require escaped quotes
|
||||
# to pass value containing a whitespace.
|
||||
#
|
||||
# chunkc set mouse_modifier \"cmd shift\"
|
||||
chunkc set mouse_modifier fn
|
||||
|
||||
chunkc set preselect_border_color 0xffffff00
|
||||
chunkc set preselect_border_width 4
|
||||
chunkc set preselect_border_radius 0
|
||||
|
||||
#
|
||||
# NOTE: these settings require chwm-sa.
|
||||
# (https://github.com/koekeishiya/chwm-sa)
|
||||
#
|
||||
|
||||
chunkc set window_float_topmost 0
|
||||
chunkc set window_fade_inactive 0
|
||||
chunkc set window_fade_alpha 0.85
|
||||
chunkc set window_fade_duration 0.5
|
||||
|
||||
#
|
||||
# NOTE: the following are config variables for the chunkwm-border plugin.
|
||||
#
|
||||
|
||||
#chunkc set focused_border_color 0xffc0b18b
|
||||
chunkc set focused_border_color 0xff689d6a
|
||||
chunkc set focused_border_width 4
|
||||
chunkc set focused_border_radius 0
|
||||
chunkc set focused_border_skip_floating 0
|
||||
|
||||
#
|
||||
# NOTE: specify plugins to load when chunkwm starts.
|
||||
# if chunkc plugin_dir is not set, the absolutepath is necessary.
|
||||
#
|
||||
|
||||
chunkc core::load tiling.so
|
||||
# chunkc core::load ffm.so
|
||||
chunkc core::load border.so
|
||||
|
||||
#
|
||||
# NOTE: shell commands require escaped quotes
|
||||
# to pass value containing a whitespace.
|
||||
#
|
||||
|
||||
chunkc tiling::rule --owner \"System Preferences\" --subrole AXStandardWindow --state tile
|
||||
chunkc tiling::rule --owner Finder --name Copy --state float
|
||||
109
wm/khdrc
Normal file
109
wm/khdrc
Normal file
@@ -0,0 +1,109 @@
|
||||
# reload config
|
||||
cmd + alt + ctrl - r : khd -e "reload"
|
||||
|
||||
# open terminal, blazingly fast compared to iTerm/Hyper
|
||||
cmd - return : open -na /Applications/kitty.app
|
||||
|
||||
# Default border: Aqua
|
||||
khd mode default on_enter chunkc border::color 0xff689d6a
|
||||
# focus window
|
||||
alt - h : chunkc tiling::window --focus west
|
||||
alt - j : chunkc tiling::window --focus south
|
||||
alt - k : chunkc tiling::window --focus north
|
||||
alt - l : chunkc tiling::window --focus east
|
||||
alt + shift - 1 : chunkc tiling::monitor -f 1
|
||||
alt + shift - 2 : chunkc tiling::monitor -f 2
|
||||
|
||||
# Move mode: orange
|
||||
alt - w: khd -e "mode activate move"
|
||||
move + alt - w: khd -e "mode activate default"
|
||||
move - escape: khd -e "mode activate default"
|
||||
move - space: khd -e "mode activate default"
|
||||
khd mode move on_enter chunkc border::color 0xffd65d0e
|
||||
# swap window
|
||||
move - h : chunkc tiling::window --swap west; khd -e "mode activate default"
|
||||
move - j : chunkc tiling::window --swap south; khd -e "mode activate default"
|
||||
move - k : chunkc tiling::window --swap north; khd -e "mode activate default"
|
||||
move - l : chunkc tiling::window --swap east; khd -e "mode activate default"
|
||||
# move window
|
||||
move + shift - h : chunkc tiling::window --warp west; khd -e "mode activate default"
|
||||
move + shift - j : chunkc tiling::window --warp south; khd -e "mode activate default"
|
||||
move + shift - k : chunkc tiling::window --warp north; khd -e "mode activate default"
|
||||
move + shift - l : chunkc tiling::window --warp east; khd -e "mode activate default"
|
||||
# move window to monitor
|
||||
move - 1 : chunkc tiling::window --send-to-monitor 1; chunkc tiling::monitor -f 1; khd -e "mode activate default"
|
||||
move - 2 : chunkc tiling::window --send-to-monitor 2; chunkc tiling::monitor -f 2; khd -e "mode activate default"
|
||||
# move floating windows / windows on a floating space
|
||||
move - up : chunkc tiling::window --warp-floating fullscreen; khd -e "mode activate default"
|
||||
move - left : chunkc tiling::window --warp-floating left; khd -e "mode activate default"
|
||||
move - right : chunkc tiling::window --warp-floating right; khd -e "mode activate default"
|
||||
move + cmd - left : chunkc tiling::window --warp-floating top-left; khd -e "mode activate default"
|
||||
move + cmd - right : chunkc tiling::window --warp-floating top-right; khd -e "mode activate default"
|
||||
move + shift + cmd - left : chunkc tiling::window --warp-floating bottom-left; khd -e "mode activate default"
|
||||
move + shift + cmd - right : chunkc tiling::window --warp-floating bottom-right; khd -e "mode activate default"
|
||||
#
|
||||
# toggle window fullscreen
|
||||
move - f : chunkc tiling::window --toggle fullscreen; khd -e "mode activate default"
|
||||
# toggle window native fullscreen
|
||||
move + shift - f : chunkc tiling::window --toggle native-fullscreen
|
||||
# toggle window parent zoom
|
||||
move - d : chunkc tiling::window --toggle parent; khd -e "mode activate default"
|
||||
# toggle window split type
|
||||
move - e : chunkc tiling::window --toggle split; khd -e "mode activate default"
|
||||
# float / unfloat window
|
||||
move - t : chunkc tiling::window --toggle float; khd -e "mode activate default"
|
||||
# toggle sticky, float and resize to picture-in-picture size
|
||||
move - s : chunkc tiling::window --toggle sticky;\
|
||||
chunkc tiling::window --warp-floating pip-right; khd -e "mode activate default"
|
||||
#
|
||||
# rotate tree
|
||||
move - r : chunkc tiling::desktop --rotate 90
|
||||
# mirror tree y-axis
|
||||
move - y : chunkc tiling::desktop --mirror vertical
|
||||
# mirror tree x-axis
|
||||
move - x : chunkc tiling::desktop --mirror horizontal
|
||||
# toggle desktop offset
|
||||
move - a : chunkc tiling::desktop --toggle offset; khd -e "mode activate default"
|
||||
#
|
||||
# change layout of desktop
|
||||
move + shift - a : chunkc tiling::desktop --layout bsp; khd -e "mode activate default"
|
||||
move + shift - s : chunkc tiling::desktop --layout monocle; khd -e "mode activate default"
|
||||
move + shift - d : chunkc tiling::desktop --layout float; khd -e "mode activate default"
|
||||
|
||||
# Resize mode: yellow
|
||||
alt - e: khd -e "mode activate resize"
|
||||
resize + alt - e: khd -e "mode activate default"
|
||||
resize - space: khd -e "mode activate default"
|
||||
resize - escape: khd -e "mode activate default"
|
||||
khd mode resize on_enter chunkc border::color 0xffd79921
|
||||
# equalize size of windows
|
||||
resize - 0 : chunkc tiling::desktop --equalize
|
||||
# increase region size
|
||||
resize - a : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge west
|
||||
resize - s : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge south
|
||||
resize - w : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge north
|
||||
resize - d : chunkc tiling::window --use-temporary-ratio 0.1 --adjust-window-edge east
|
||||
# decrease region size
|
||||
resize + shift - a : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge west
|
||||
resize + shift - s : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge south
|
||||
resize + shift - w : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge north
|
||||
resize + shift - d : chunkc tiling::window --use-temporary-ratio -0.1 --adjust-window-edge east
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# float next window to be tiled
|
||||
# shift + alt - t : chunkc set window_float_next 1
|
||||
|
||||
|
||||
# ctrl + alt - w : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/dev_1
|
||||
|
||||
# remap caps-lock to escape for this config only !!!
|
||||
# macos sierra can also perform this remap for a given keyboard
|
||||
# - capslock : khd -p "- escape"
|
||||
|
||||
# key remap for norwegian layout \ { }
|
||||
# cmd - 7 : khd -p "shift + alt - 7"
|
||||
# cmd - 8 : khd -p "shift + alt - 8"
|
||||
# cmd - 9 : khd -p "shift + alt - 9"
|
||||
16
wm/setup.sh
Normal file
16
wm/setup.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function setup_wm()
|
||||
{
|
||||
brew crisidev/homebrew-chunkwm/chunkwm
|
||||
brew koekeishiya/formulae/khd
|
||||
ln -s ${DOTFILES}/wm/khdrc ${HOME}/.khdrc
|
||||
ln -s ${DOTFILES}/wm/chunkwmrc ${HOME}/.chunkwmrc
|
||||
if ! /usr/local/bin/brew services list | grep chunkwm >/dev/null; then
|
||||
/usr/local/bin/brew services start khd
|
||||
/usr/local/bin/brew services start chunkwm
|
||||
fi
|
||||
}
|
||||
|
||||
export DOTFILES=/Users/thomas/dotfiles
|
||||
setup_wm
|
||||
Reference in New Issue
Block a user