diff --git a/Makefile b/Makefile index 1485a76..c918e08 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,14 @@ CARGO_CLEAN_TARGETS += BOTTOM_TARGETS += BOTTOM_CLEAN_TARGETS += +# yabai +YABAI_TARGETS += +YABAI_CLEAN_TARGETS += + +# skhd +SKHD_TARGETS += +SKHD_CLEAN_TARGETS += + #################### # include # #################### @@ -202,6 +210,14 @@ ALL_CLEAN_TARGETS += CARGO_CLEAN_TARGETS ALL_TARGETS += BOTTOM_TARGETS ALL_CLEAN_TARGETS += BOTTOM_CLEAN_TARGETS +# yabai +ALL_TARGETS += YABAI_TARGETS +ALL_CLEAN_TARGETS += YABAI_CLEAN_TARGETS + +# shkd +ALL_TARGETS += SKHD_TARGETS +ALL_CLEAN_TARGETS += SKHD_CLEAN_TARGETS + #################### # commands # #################### diff --git a/devbox.lock b/devbox.lock index 7a15558..2547792 100644 --- a/devbox.lock +++ b/devbox.lock @@ -2,9 +2,9 @@ "lockfile_version": "1", "packages": { "nodejs@latest": { - "last_modified": "2024-06-18T11:39:17Z", + "last_modified": "2024-07-10T06:55:44Z", "plugin_version": "0.0.2", - "resolved": "github:NixOS/nixpkgs/56fc115880db6498245adecda277ccdb33025bc2#nodejs_22", + "resolved": "github:NixOS/nixpkgs/aa9461550594533c29866d42f861b6ff079a7fb6#nodejs_22", "source": "devbox-search", "version": "22.3.0", "systems": { @@ -12,57 +12,57 @@ "outputs": [ { "name": "out", - "path": "/nix/store/ig6c5qlywzk9f4zwf4hdpnyyx91vyqyc-nodejs-22.3.0", + "path": "/nix/store/cpqfn567chsy7mslcfwnijsn6mq82lcq-nodejs-22.3.0", "default": true }, { "name": "libv8", - "path": "/nix/store/zg4vwp25r1v52vm2mxd6v64c1gr3jbj9-nodejs-22.3.0-libv8" + "path": "/nix/store/mfjmdqb1sxxm7r4d4px5r3p6m378kzy5-nodejs-22.3.0-libv8" } ], - "store_path": "/nix/store/ig6c5qlywzk9f4zwf4hdpnyyx91vyqyc-nodejs-22.3.0" + "store_path": "/nix/store/cpqfn567chsy7mslcfwnijsn6mq82lcq-nodejs-22.3.0" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/j2pwm80va47mfz7r5w1640rm6b9sp269-nodejs-22.3.0", + "path": "/nix/store/q7cgrvb6clq0pdp5hlwmq2lldzkl3fmj-nodejs-22.3.0", "default": true }, { "name": "libv8", - "path": "/nix/store/j2lx401mqs3w7swg713irnnsfn88f8sx-nodejs-22.3.0-libv8" + "path": "/nix/store/5df5695winsxzf80q6z0m35zy3p60yw1-nodejs-22.3.0-libv8" } ], - "store_path": "/nix/store/j2pwm80va47mfz7r5w1640rm6b9sp269-nodejs-22.3.0" + "store_path": "/nix/store/q7cgrvb6clq0pdp5hlwmq2lldzkl3fmj-nodejs-22.3.0" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/3cqbw1xcmc0xml8s3ys7jviaxvqyjldy-nodejs-22.3.0", + "path": "/nix/store/hd619h1mh6lcmv2kw6nij9xa0zf7ybmr-nodejs-22.3.0", "default": true }, { "name": "libv8", - "path": "/nix/store/zk7izr97gl525arvyi4mfwxnhx5wl7hx-nodejs-22.3.0-libv8" + "path": "/nix/store/mipa00s8bq87h3p3allndvg43cpggz3w-nodejs-22.3.0-libv8" } ], - "store_path": "/nix/store/3cqbw1xcmc0xml8s3ys7jviaxvqyjldy-nodejs-22.3.0" + "store_path": "/nix/store/hd619h1mh6lcmv2kw6nij9xa0zf7ybmr-nodejs-22.3.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/zklzfb51mxs8pqdpwh6h51jkir50hq54-nodejs-22.3.0", + "path": "/nix/store/bmvx7ww7qfksjqsckmivkg3mqvjscfh8-nodejs-22.3.0", "default": true }, { "name": "libv8", - "path": "/nix/store/5dmd41abvjrw0chbz9m2yk27h61vpva9-nodejs-22.3.0-libv8" + "path": "/nix/store/w28gijyq24mmk1676gpbxw2xrkysxx1i-nodejs-22.3.0-libv8" } ], - "store_path": "/nix/store/zklzfb51mxs8pqdpwh6h51jkir50hq54-nodejs-22.3.0" + "store_path": "/nix/store/bmvx7ww7qfksjqsckmivkg3mqvjscfh8-nodejs-22.3.0" } } } diff --git a/modules/fish/conf.d/mac.fish b/modules/fish/conf.d/mac.fish index af8b3c1..55a507d 100644 --- a/modules/fish/conf.d/mac.fish +++ b/modules/fish/conf.d/mac.fish @@ -10,6 +10,8 @@ if test (uname) = "Darwin" # path fish_add_path /usr/local/sbin fish_add_path /usr/local/bin + fish_add_path /opt/homebrew/bin + fish_add_path /opt/homebrew/sbin fish_add_path $HOME/.local/bin # alias @@ -17,30 +19,3 @@ if test (uname) = "Darwin" alias make 'make -j8' alias emacs 'emacs -nw' end - -if test -d brew - # # libxml2 - # set -gx LDFLAGS "-L$(brew --prefix libxml2)/lib" - # set -gx CPPFLAGS "-I$(brew --prefix libxml2)/include -I$(brew --prefix zlib)/include" - # set -gx PKG_CONFIG_PATH "$(brew --prefix libxml2)/lib/pkgconfig" - # fish_add_path (brew --prefix libxml2)/bin - - # # libgccjit - # set -xg LIBRARY_PATH (brew --prefix libgccjit)/lib/gcc/current - - # # openssl - # fish_add_path (brew --prefix openssl)/bin - - # # texinfo - # fish_add_path (brew --prefix texinfo)/bin - - # # bison - # fish_add_path (brew --prefix bison)/bin - - # # libiconv - # fish_add_path (brew --prefix libiconv)/bin - - # homebrew - fish_add_path /opt/homebrew/bin - fish_add_path /opt/homebrew/sbin -end diff --git a/modules/skhd/Makefile b/modules/skhd/Makefile new file mode 100644 index 0000000..2bd9024 --- /dev/null +++ b/modules/skhd/Makefile @@ -0,0 +1,16 @@ +SKHD_DIR = ~/.config/skhd +SELF_SKHD_DIR = $(MODULE_DIR)/skhd + +SKHD_CLEAN_TARGETS += skhd-clean +SKHD_TARGETS += skhd-install + +.PHONY: skhd-install +skhd-install: $(SKHD_DIR) + +$(SKHD_DIR): + mkdir -p $(SKHD_DIR) + ln -sf $(SELF_SKHD_DIR)/skhdrc $(SKHD_DIR)/skhdrc + +.PHONY: skhd-clean +skhd-clean: + rm -r $(SKHD_DIR) diff --git a/modules/skhd/skhdrc b/modules/skhd/skhdrc new file mode 100644 index 0000000..7f1ac0a --- /dev/null +++ b/modules/skhd/skhdrc @@ -0,0 +1,32 @@ +# focus window +shift + alt - x : yabai -m window --focus recent || yabai -m display --focus recent +alt - h : yabai -m window --focus west || yabai -m display --focus west +alt - j : yabai -m window --focus south || yabai -m display --focus south +alt - k : yabai -m window --focus north || yabai -m display --focus north +alt - l : yabai -m window --focus east || yabai -m display --focus east +alt - z : yabai -m window --focus stack.prev +alt - c : yabai -m window --focus stack.next + +# workspace focus +shift + alt - 1 : yabai -m space --focus 1 +shift + alt - 2 : yabai -m space --focus 2 +shift + alt - 3 : yabai -m space --focus 3 +shift + alt - 4 : yabai -m space --focus 4 +shift + alt - 5 : yabai -m space --focus 5 +shift + alt - 6 : yabai -m space --focus 6 +shift + alt - 7 : yabai -m space --focus 7 +shift + alt - 8 : yabai -m space --focus 8 +shift + alt - 0 : yabai -m space --focus prev +shift + alt - 9 : yabai -m space --focus next + +# move window +shift + alt - h : yabai -m window --warp west +shift + alt - j : yabai -m window --warp south +shift + alt - k : yabai -m window --warp north +shift + alt - l : yabai -m window --warp east + +# toggle window native fullscreen +shift + alt - f : yabai -m window --toggle native-fullscreen + +# restart yabai +ctrl + shift + alt - r : launchctl kickstart -k "gui/${UID}/com.koekeishiya.yabai" diff --git a/modules/yabai/Makefile b/modules/yabai/Makefile new file mode 100644 index 0000000..99c45fd --- /dev/null +++ b/modules/yabai/Makefile @@ -0,0 +1,16 @@ +YABAI_DIR = ~/.config/yabai +SELF_YABAI_DIR = $(MODULE_DIR)/yabai + +YABAI_CLEAN_TARGETS += yabai-clean +YABAI_TARGETS += yabai-install + +.PHONY: yabai-install +yabai-install: $(YABAI_DIR) + +$(YABAI_DIR): + mkdir -p $(YABAI_DIR) + ln -sf $(SELF_YABAI_DIR)/yabairc $(YABAI_DIR)/yabairc + +.PHONY: yabai-clean +yabai-clean: + rm -r $(YABAI_DIR) diff --git a/modules/yabai/yabairc b/modules/yabai/yabairc new file mode 100644 index 0000000..0c48905 --- /dev/null +++ b/modules/yabai/yabairc @@ -0,0 +1,44 @@ +#!/usr/bin/env sh + +# +# for this to work you must configure sudo such that +# it will be able to run the command without password +# +# see this wiki page for information: +# - https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition +# +# yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" +# sudo yabai --load-sa +# + +# global settings +yabai -m config external_bar off:40:0 +yabai -m config menubar_opacity 1.0 +yabai -m config mouse_follows_focus off +yabai -m config focus_follows_mouse off +yabai -m config display_arrangement_order default +yabai -m config window_origin_display default +yabai -m config window_placement second_child +yabai -m config window_zoom_persist on +yabai -m config window_shadow on +yabai -m config window_animation_duration 0.0 +yabai -m config window_animation_easing ease_out_circ +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_opacity off +yabai -m config insert_feedback_color 0xffd75f5f +yabai -m config split_ratio 0.50 +yabai -m config split_type auto +yabai -m config auto_balance off +yabai -m config top_padding 0 +yabai -m config bottom_padding 0 +yabai -m config left_padding 0 +yabai -m config right_padding 0 +yabai -m config layout bsp +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 + +echo "yabai configuration loaded.."