adds: yabai and skhd, need to implement linking to proper locations

This commit is contained in:
2024-03-16 14:53:12 -04:00
parent bc342d28c8
commit 9a05bd20d8
5 changed files with 120 additions and 5 deletions

View File

@@ -1,10 +1,6 @@
-- Leader needs to be set before loading plugins
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Common settings
require('user.settings')
-- Auto commands
require('user.autocmd')
@@ -17,4 +13,8 @@ require('user.mappings')
-- Theme (must stay after plugins are loaded)
require('user.theme')
-- Common settings
require('user.settings')
vim.o.shiftwidth = 2

View File

@@ -13,6 +13,7 @@
"formatter.nvim": { "branch": "master", "commit": "34dcdfa0c75df667743b2a50dd99c84a557376f0" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"go.nvim": { "branch": "master", "commit": "694af9c0ee3a1d11bdb312ec67eebde74b6a4bbe" },
"guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" },
"guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" },
"lazy.nvim": { "branch": "main", "commit": "42fb1e89adb8008a401848e131c5ecb985db52f1" },
"lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" },

View File

@@ -55,5 +55,8 @@ require("lazy").setup({
"christoomey/vim-tmux-navigator",
lazy = false,
},
{
"NMAC427/guess-indent.nvim",
opts = { }
},
})

68
skhd/skhdrc Normal file
View File

@@ -0,0 +1,68 @@
# This starting point was configured from: https://www.joshmedeski.com/posts/blazing-fast-window-management-on-macos/
# focus window
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - l : yabai -m window --focus east
# swap managed window
shift + alt - h : yabai -m window --swap west
shift + alt - j : yabai -m window --swap south
shift + alt - k : yabai -m window --swap north
shift + alt - l : yabai -m window --swap east
# move managed window
shift + alt + ctrl - h : yabai -m window --warp west
shift + alt + ctrl - j : yabai -m window --warp south
shift + alt + ctrl - k : yabai -m window --warp north
shift + alt + ctrl - l : yabai -m window --warp east
# rotate tree
alt - r : yabai -m space --rotate 90
# toggle window fullscreen zoom
alt - f : yabai -m window --toggle zoom-fullscreen
# alt - s : yabai -m window --toggle
alt - s : yabai -m window --toggle sticky;\
yabai -m window --toggle topmost;\
yabai -m window --toggle pip
# toggle padding and gap
alt - g : yabai -m space --toggle padding; yabai -m space --toggle gap
# float / unfloat window and center on screen
alt - t : yabai -m window --toggle float;\
yabai -m window --grid 4:4:1:1:2:2
# toggle window split type
alt - e : yabai -m window --toggle split
# balance size of windows
shift + alt - 0 : yabai -m space --balance
# move window and focus desktop
shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1
shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2
shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3
shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4
shift + alt - 5 : yabai -m window --space 5; yabai -m space --focus 5
shift + alt - 6 : yabai -m window --space 6; yabai -m space --focus 6
shift + alt - 7 : yabai -m window --space 7; yabai -m space --focus 7
shift + alt - 8 : yabai -m window --space 8; yabai -m space --focus 8
shift + alt - 9 : yabai -m window --space 9; yabai -m space --focus 9
# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
shift + alt - n : yabai -m space --create && \
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
yabai -m window --space "${index}" && \
yabai -m space --focus "${index}"
# fast focus desktop
alt - tab : yabai -m space --focus recent
# send window to monitor and follow focus
shift + alt - n : yabai -m window --display next; yabai -m display --focus next
shift + alt - p : yabai -m window --display previous; yabai -m display --focus previous

43
yabai/yabairc Executable file
View File

@@ -0,0 +1,43 @@
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# global settings
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
yabai -m config window_origin_display default
yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_shadow on
yabai -m config window_opacity off
yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.90
yabai -m config window_border off
yabai -m config window_border_width 6
yabai -m config active_window_border_color 0xff775759
yabai -m config normal_window_border_color 0xff555555
yabai -m config insert_feedback_color 0xffd75f5f
yabai -m config split_ratio 0.50
yabai -m config auto_balance off
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
yabai -m config mouse_drop_action swap
# general space settings
yabai -m config layout bsp
yabai -m config top_padding 3
yabai -m config bottom_padding 3
yabai -m config left_padding 0
# NOTE: for OBS floating head
# yabai -m config left_padding 450
yabai -m config right_padding 0
yabai -m config window_gap 0
# apps to not manage (ignore)
yabai -m rule --add app="^System Settings$" manage=off
yabai -m rule --add app="^Archive Utility$" manage=off
yabai -m rule --add app="^Logi Options$" manage=off
yabai -m rule --add app="^Music$" manage=off
echo "yabai configuration loaded.."