aboutsummaryrefslogtreecommitdiff
path: root/.config/yabai
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.config/yabai/iterm2_open13
-rwxr-xr-x.config/yabai/yabairc41
2 files changed, 54 insertions, 0 deletions
diff --git a/.config/yabai/iterm2_open b/.config/yabai/iterm2_open
new file mode 100755
index 0000000..fd9efe4
--- /dev/null
+++ b/.config/yabai/iterm2_open
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+# Detects if iTerm2 is running
+if ! pgrep -f "iTerm" > /dev/null; then
+ open -a "/Applications/iTerm.app"
+else
+ # Create a new window
+ if ! osascript -e 'tell application "iTerm2" to create window with default profile' > /dev/null; then
+ # Get pids for any app with "iTerm" and kill
+ for i in $(pgrep -f "iTerm"); do kill -15 "$i"; done
+ open -a "/Applications/iTerm.app"
+ fi
+fi
diff --git a/.config/yabai/yabairc b/.config/yabai/yabairc
new file mode 100755
index 0000000..ed07971
--- /dev/null
+++ b/.config/yabai/yabairc
@@ -0,0 +1,41 @@
+#!/usr/bin/env sh
+
+yabai -m config mouse_follows_focus on
+yabai -m config focus_follows_mouse autofocus
+
+# Spawn right/bottom
+yabai -m config window_placement second_child
+
+yabai -m config window_opacity off
+# Unfocused 90% opacity
+yabai -m config active_window_opacity 1.0
+yabai -m config normal_window_opacity 0.9
+
+# Borders
+yabai -m config window_border on
+yabai -m config window_border_width 3
+yabai -m config active_window_border_color 0xff775759
+yabai -m config normal_window_border_color 0xff555555
+yabai -m config insert_feedback_color 0xffd75f5f
+
+# Mouse stuff
+yabai -m config mouse_modifier alt
+yabai -m config mouse_action1 move
+yabai -m config mouse_action2 resize
+yabai -m config mouse_drop_action swap
+
+# Layout
+yabai -m config layout bsp
+yabai -m config top_padding 10
+yabai -m config bottom_padding 10
+yabai -m config left_padding 10
+yabai -m config right_padding 10
+yabai -m config window_gap 10
+
+# App rules
+yabai -m rule --add app="^System Preferences$" manage=off
+yabai -m rule --add app="^Calculator$" manage=off
+yabai -m rule --add app="^MacPass$" manage=off
+yabai -m rule --add app="^Firefox$" title="^Opening .*$" manage=off
+
+echo "yabai configuration loaded.."