Skip to content

Commit

Permalink
Darwin: border color indication
Browse files Browse the repository at this point in the history
  • Loading branch information
shajra committed Jan 15, 2024
1 parent a13dfa1 commit 0b37913
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
15 changes: 15 additions & 0 deletions home/modules/base/gui/darwin/xdg/configFile/borders/bordersrc.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
colors:

''
#!/bin/bash
options=(
style=round
width=8.0
hidpi=on
active_color=${colors.window.selected.focused.border.window}
inactive_color=${colors.window.unselected.border.window}
)
borders "''${options[@]}"
''
6 changes: 4 additions & 2 deletions home/modules/base/gui/darwin/xdg/configFile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ in {
} > "$out/emojis.lua"
chmod +x "$out/sketchybarrc"
'';
"skhd/skhdrc".text = import skhd/skhdrc.nix kitty jq;
"yabai/yabairc".source = yabai/yabairc;
"skhd/skhdrc".text = import skhd/skhdrc.nix kitty jq colors;
"yabai/yabairc".text = import yabai/yabairc.nix colors;
"yabai/yabairc".executable = true;
"borders/bordersrc".text = import borders/bordersrc.nix colors;
"borders/bordersrc".executable = true;
}
14 changes: 9 additions & 5 deletions home/modules/base/gui/darwin/xdg/configFile/skhd/skhdrc.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
kitty: jq:
kitty: jq: colors:

''
# Strategy for keybindings:
#
# - left-only modifiers are used to allow right-variants when conflicts
# - lalt is used most often, lcmd as a small alternate
# - h/j/k/l is used for directionality consitently
# - h/j/k/l is used for consistent directionality
# - digits are used for desktops and monitors
# - where possible shift implies moving of some sort
# - modifiers combinations are used in the following precedence:
Expand All @@ -19,9 +19,13 @@ kitty: jq:
# codes should be.
# define modes
:: default : yabai -m config active_window_border_color 0xffb58900; yabai -m config window_border_width 4
:: passthru : yabai -m config active_window_border_color 0xffd33682; yabai -m config window_border_width 8
:: size @ : yabai -m config active_window_border_color 0xff859900; yabai -m config window_border_width 12
:: default : \
borders \
width=8.0 \
active_color=${colors.window.selected.focused.border.window} ; \
sketchybar --bar border_color=${colors.semantic.unifying}
:: passthru : sketchybar --bar border_color=${colors.semantic.warning}
:: size @ : borders width=8.0 active_color=${colors.semantic.info}
# mode: returning home
size, passthru < lalt + shift - escape ; default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
colors:

''
#!/usr/bin/env sh
# initialization
Expand All @@ -20,7 +23,7 @@ yabai -m config window_opacity_duration 0.2
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.95
yabai -m config window_animation_duration 0.3
yabai -m config insert_feedback_color 0xff859900
yabai -m config insert_feedback_color ${colors.semantic.unifying}
yabai -m config split_ratio 0.50
yabai -m config split_type auto
yabai -m config auto_balance off
Expand All @@ -42,3 +45,4 @@ yabai -m config window_gap 12
yabai -m rule --add app="Emacs" role="AXTextField" subrole="AXStandardWindow" manage=on
echo "yabai configuration loaded..."
''

0 comments on commit 0b37913

Please sign in to comment.