Skip to content

Commit

Permalink
fix: more sketchybar/jankyborders fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed May 31, 2024
1 parent 3e9bcb5 commit 3833243
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 52 deletions.
30 changes: 15 additions & 15 deletions home/apps/sketchybar/plugins/colordummy.nu
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,28 @@ def color [name: string, alpha: float = 1.0] {

(sketchybar
--bar
$"color=(color bg)"
$"color=(color bg)"
--default
$"icon.color=(color fg)"
$"label.color=(color fg)"
$"icon.color=(color fg)"
$"label.color=(color fg)"
--set /space/
$"icon.color=(color gray 0.5)"
$"icon.highlight_color=(color blue)"
$"icon.color=(color gray 0.5)"
$"icon.highlight_color=(color blue)"
--set music
$"icon.color=(color violet)"
$"label.color=(color violet)"
$"icon.color=(color violet)"
$"label.color=(color violet)"
--set "Mullvad VPN"
$"alias.color=(color orange)"
--set "Control Centre,Battery"
$"alias.color=(color gold)"
$"alias.color=(color orange)"
--set "Control Center,Battery"
$"alias.color=(color gold)"
--set clock
$"icon.color=(color violet)"
$"label.color=(color violet)")
$"icon.color=(color violet)"
$"label.color=(color violet)")

# set the jankyborders colors as well
if ((which borders).type? == "external") {
if ((which borders).type?.0? == "external") {
(borders
$"active_color=(colors rose)"
$"inactive_color=(colors gray)"
$"active_color=(color blue)"
$"inactive_color=(color gray)"
width=5.0)
}
71 changes: 35 additions & 36 deletions home/apps/sketchybar/sketchybarrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@ sketchybar -m --add event theme_changed AppleInterfaceThemeChangedNotification
(sketchybar
--add item colordummy center
--set colordummy
drawing=off
$"script=($pluginDir)/colordummy.nu"
--subscribe colordummy theme_changed
)
drawing=off
$"script=($pluginDir)/colordummy.nu"
--subscribe colordummy theme_changed)

##### Changing Defaults #####
(sketchybar --default
updates=when_shown
drawing=on
icon.font="Symbols Nerd Font:2048-em:18.0"
label.font="SF Pro:Regular:16.0"
label.padding_left=2
label.padding_right=2
icon.padding_left=2
icon.padding_right=2
)
(sketchybar
--default
updates=when_shown
drawing=on
icon.font="Symbols Nerd Font:2048-em:18.0"
label.font="SF Pro:Regular:16.0"
label.padding_left=2
label.padding_right=2
icon.padding_left=2
icon.padding_right=2)
# }}}

## left side of the bar {{{
Expand All @@ -47,42 +46,42 @@ for $el in ["Ⅰ" "Ⅱ" "Ⅲ" "Ⅳ" "Ⅴ" "Ⅵ" "Ⅶ" "Ⅷ" "Ⅸ" "Ⅹ"] --numbe
(sketchybar
--add space $"space.($i)" left
--set $"space.($i)" $"associated_space=($i)"
$"icon=($el.item)"
icon.padding_left=8
icon.padding_right=8
background.padding_left=1
background.padding_right=1
background.height=32
label.drawing=off
$"script=($pluginDir)/space.nu"
$"click_script=yabai -m space --focus ($i)")
$"icon=($el.item)"
icon.padding_left=8
icon.padding_right=8
background.padding_left=1
background.padding_right=1
background.height=32
label.drawing=off
$"script=($pluginDir)/space.nu"
$"click_script=yabai -m space --focus ($i)")
}

sketchybar -m --add event music_changed com.apple.Music.playerInfo

(sketchybar
--add item music left
--set music
$"script=($pluginDir)/music.nu"
label.y_offset=-1
$"script=($pluginDir)/music.nu"
label.y_offset=-1
--subscribe music music_changed
--add item clock right
--set clock
$"script=($pluginDir)/clock.nu"
update_freq=10
background.padding_right=4
$"script=($pluginDir)/clock.nu"
update_freq=10
background.padding_right=4
--add alias "iStat Menus Status" right
icon.padding_left=0
icon.padding_right=0
icon.padding_left=0
icon.padding_right=0
--add alias "Little Snitch Agent" right
icon.padding_left=0
icon.padding_right=0
icon.padding_left=0
icon.padding_right=0
--add alias "Control Center,Battery" right
icon.padding_left=0
icon.padding_right=0
icon.padding_left=0
icon.padding_right=0
--add alias "Mullvad VPN" right
icon.padding_left=0
icon.padding_right=0
icon.padding_left=0
icon.padding_right=0
)

sketchybar --update
5 changes: 4 additions & 1 deletion machines/common/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
services = {
sketchybar = {
enable = true;
extraPackages = with pkgs; [ nushell ];
extraPackages = with pkgs; [
jankyborders
nushell
];
};
yabai = {
enable = true;
Expand Down

0 comments on commit 3833243

Please sign in to comment.