updated tiling options to not push changes to non-users
This commit is contained in:
parent
91c676f3f5
commit
3bd8fa4e7a
7 changed files with 431 additions and 552 deletions
|
@ -38,6 +38,11 @@
|
||||||
hostHomePath = hostDir + "/home.nix";
|
hostHomePath = hostDir + "/home.nix";
|
||||||
userHomePath = userDir + "/home.nix";
|
userHomePath = userDir + "/home.nix";
|
||||||
|
|
||||||
|
pathOrNull = a:
|
||||||
|
if pathExists a
|
||||||
|
then a
|
||||||
|
else null;
|
||||||
|
|
||||||
# Arguments passed to all module files
|
# Arguments passed to all module files
|
||||||
args = {
|
args = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
@ -94,15 +99,11 @@ in
|
||||||
)
|
)
|
||||||
|
|
||||||
# The user-wide configuration.nix
|
# The user-wide configuration.nix
|
||||||
(
|
(pathOrNull userConfigPath)
|
||||||
if pathExists userConfigPath
|
|
||||||
then userConfigPath
|
|
||||||
else null
|
|
||||||
)
|
|
||||||
# The host-wide configuration.nix
|
# The host-wide configuration.nix
|
||||||
(
|
(
|
||||||
if host != null && pathExists hostConfigPath
|
if host != null
|
||||||
then hostConfigPath
|
then pathOrNull hostConfigPath
|
||||||
else null
|
else null
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -127,15 +128,15 @@ in
|
||||||
// {
|
// {
|
||||||
mainHomeImports = builtins.filter (f: f != null) [
|
mainHomeImports = builtins.filter (f: f != null) [
|
||||||
(
|
(
|
||||||
if pathExists userHomePath
|
pathOrNull userHomePath
|
||||||
then userHomePath
|
|
||||||
else null
|
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
if host != null && pathExists hostHomePath
|
if host != null
|
||||||
then hostHomePath
|
then pathOrNull hostHomePath
|
||||||
else null
|
else null
|
||||||
)
|
)
|
||||||
|
#Can't have conditional import path
|
||||||
|
../modules/macos/tiling/sketchybar-home.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# can't find how to make this an array without the param
|
# can't find how to make this an array without the param
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{config,pkgs, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.aerospace = {
|
services.aerospace = {
|
||||||
enable = config.shared.darwin.tiling.enable;
|
enable = config.shared.darwin.tiling.enable;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -60,34 +64,34 @@
|
||||||
alt-equal = "resize smart +50";
|
alt-equal = "resize smart +50";
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
||||||
cmd-1 = "workspace 1";
|
alt-1 = "workspace 1";
|
||||||
cmd-2 = "workspace 2";
|
alt-2 = "workspace 2";
|
||||||
cmd-3 = "workspace 3";
|
alt-3 = "workspace 3";
|
||||||
cmd-4 = "workspace 4";
|
alt-4 = "workspace 4";
|
||||||
cmd-5 = "workspace 5";
|
alt-5 = "workspace 5";
|
||||||
cmd-6 = "workspace 6";
|
alt-6 = "workspace 6";
|
||||||
cmd-7 = "workspace 7";
|
alt-7 = "workspace 7";
|
||||||
cmd-8 = "workspace 8";
|
alt-8 = "workspace 8";
|
||||||
cmd-9 = "workspace 9";
|
alt-9 = "workspace 9";
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
||||||
cmd-shift-1 = "move-node-to-workspace 1";
|
alt-shift-1 = "move-node-to-workspace 1";
|
||||||
cmd-shift-2 = "move-node-to-workspace 2";
|
alt-shift-2 = "move-node-to-workspace 2";
|
||||||
cmd-shift-3 = "move-node-to-workspace 3";
|
alt-shift-3 = "move-node-to-workspace 3";
|
||||||
cmd-shift-4 = "move-node-to-workspace 4";
|
alt-shift-4 = "move-node-to-workspace 4";
|
||||||
cmd-shift-5 = "move-node-to-workspace 5";
|
alt-shift-5 = "move-node-to-workspace 5";
|
||||||
cmd-shift-6 = "move-node-to-workspace 6";
|
alt-shift-6 = "move-node-to-workspace 6";
|
||||||
cmd-shift-7 = "move-node-to-workspace 7";
|
alt-shift-7 = "move-node-to-workspace 7";
|
||||||
cmd-shift-8 = "move-node-to-workspace 8";
|
alt-shift-8 = "move-node-to-workspace 8";
|
||||||
cmd-shift-9 = "move-node-to-workspace 9";
|
alt-shift-9 = "move-node-to-workspace 9";
|
||||||
|
|
||||||
cmd-h = []; # Disable "hide application"
|
cmd-h = []; # Disable "hide application"
|
||||||
cmd-alt-h = []; # Disable "hide others"
|
cmd-alt-h = []; # Disable "hide others"
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
|
# # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
|
||||||
alt-tab = "workspace-back-and-forth";
|
# alt-tab = "workspace-back-and-forth";
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
|
# # See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
|
||||||
alt-shift-tab = "move-workspace-to-monitor --wrap-around next";
|
# alt-shift-tab = "move-workspace-to-monitor --wrap-around next";
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
||||||
alt-shift-semicolon = "mode service";
|
alt-shift-semicolon = "mode service";
|
||||||
|
@ -112,7 +116,7 @@
|
||||||
};
|
};
|
||||||
after-startup-command = [
|
after-startup-command = [
|
||||||
"exec-and-forget sketchybar"
|
"exec-and-forget sketchybar"
|
||||||
"exec-and-forget open /Applications/SwipeAeroSpace.app"
|
# "exec open /Applications/SwipeAeroSpace.app"
|
||||||
];
|
];
|
||||||
exec-on-workspace-change = [
|
exec-on-workspace-change = [
|
||||||
"/bin/bash"
|
"/bin/bash"
|
||||||
|
@ -124,8 +128,11 @@
|
||||||
#Ghostty currently renders tabs as individual processes
|
#Ghostty currently renders tabs as individual processes
|
||||||
#Fix comes from https://ghostty.org/docs/help/macos-tiling-wms
|
#Fix comes from https://ghostty.org/docs/help/macos-tiling-wms
|
||||||
{
|
{
|
||||||
"if".app-id = "com.mitchellh.ghostty";
|
"if" = {
|
||||||
|
app-id = "com.mitchellh.ghostty";
|
||||||
|
};
|
||||||
run = ["layout tiling"];
|
run = ["layout tiling"];
|
||||||
|
check-further-callbacks = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }: let
|
{lib, ...}: let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
@ -7,393 +8,396 @@
|
||||||
# folder = "~/.dotfiles/files/sketchybar";
|
# folder = "~/.dotfiles/files/sketchybar";
|
||||||
folder = ../../../files/sketchybar;
|
folder = ../../../files/sketchybar;
|
||||||
in {
|
in {
|
||||||
home.file = {
|
home.file =
|
||||||
sketchybarrc = {
|
lib.attrsets.mapAttrs (file: value: (
|
||||||
executable = true;
|
lib.attrsets.overrideExisting value {enable = config.shared.darwin.tiling.enable;}
|
||||||
target = ".config/sketchybar/sketchybarrc";
|
)) {
|
||||||
text = ''
|
sketchybarrc = {
|
||||||
#!/usr/bin/env sh
|
executable = true;
|
||||||
|
target = ".config/sketchybar/sketchybarrc";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
|
source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
|
||||||
source "$HOME/.config/sketchybar/icons.sh" # Loads all defined icons
|
source "$HOME/.config/sketchybar/icons.sh" # Loads all defined icons
|
||||||
|
|
||||||
ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured
|
ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured
|
||||||
PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored
|
PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored
|
||||||
|
|
||||||
FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants
|
FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants
|
||||||
PADDINGS=3 # All paddings use this value (icon, label, background)
|
PADDINGS=3 # All paddings use this value (icon, label, background)
|
||||||
|
|
||||||
# Setting up and starting the helper process
|
# Setting up and starting the helper process
|
||||||
HELPER=git.felix.helper
|
HELPER=git.felix.helper
|
||||||
killall helper
|
killall helper
|
||||||
cd $HOME/.config/sketchybar/helper && make
|
cd $HOME/.config/sketchybar/helper && make
|
||||||
$HOME/.config/sketchybar/helper/helper $HELPER > /dev/null 2>&1 &
|
$HOME/.config/sketchybar/helper/helper $HELPER > /dev/null 2>&1 &
|
||||||
|
|
||||||
# Unload the macOS on screen indicator overlay for volume change
|
# Unload the macOS on screen indicator overlay for volume change
|
||||||
# launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 &
|
# launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 &
|
||||||
|
|
||||||
# Setting up the general bar appearance and default values
|
# Setting up the general bar appearance and default values
|
||||||
${pkgs.sketchybar}/bin/sketchybar --bar height=40 \
|
${pkgs.sketchybar}/bin/sketchybar --bar height=40 \
|
||||||
color=$BAR_COLOR \
|
color=$BAR_COLOR \
|
||||||
shadow=off \
|
shadow=off \
|
||||||
position=top \
|
position=top \
|
||||||
sticky=on \
|
sticky=on \
|
||||||
padding_right=0 \
|
padding_right=0 \
|
||||||
padding_left=0 \
|
padding_left=0 \
|
||||||
corner_radius=12 \
|
corner_radius=12 \
|
||||||
y_offset=0 \
|
y_offset=0 \
|
||||||
margin=2 \
|
margin=2 \
|
||||||
blur_radius=0 \
|
blur_radius=0 \
|
||||||
notch_width=0 \
|
notch_width=0 \
|
||||||
--default updates=when_shown \
|
--default updates=when_shown \
|
||||||
icon.font="$FONT:Bold:14.0" \
|
icon.font="$FONT:Bold:14.0" \
|
||||||
icon.color=$ICON_COLOR \
|
icon.color=$ICON_COLOR \
|
||||||
icon.padding_left=$PADDINGS \
|
icon.padding_left=$PADDINGS \
|
||||||
icon.padding_right=$PADDINGS \
|
icon.padding_right=$PADDINGS \
|
||||||
label.font="$FONT:Semibold:13.0" \
|
label.font="$FONT:Semibold:13.0" \
|
||||||
label.color=$LABEL_COLOR \
|
label.color=$LABEL_COLOR \
|
||||||
label.padding_left=$PADDINGS \
|
label.padding_left=$PADDINGS \
|
||||||
label.padding_right=$PADDINGS \
|
label.padding_right=$PADDINGS \
|
||||||
background.padding_right=$PADDINGS \
|
background.padding_right=$PADDINGS \
|
||||||
background.padding_left=$PADDINGS \
|
background.padding_left=$PADDINGS \
|
||||||
background.height=26 \
|
background.height=26 \
|
||||||
background.corner_radius=9 \
|
background.corner_radius=9 \
|
||||||
popup.background.border_width=2 \
|
popup.background.border_width=2 \
|
||||||
popup.background.corner_radius=11 \
|
popup.background.corner_radius=11 \
|
||||||
popup.background.border_color=$POPUP_BORDER_COLOR \
|
popup.background.border_color=$POPUP_BORDER_COLOR \
|
||||||
popup.background.color=$POPUP_BACKGROUND_COLOR \
|
popup.background.color=$POPUP_BACKGROUND_COLOR \
|
||||||
popup.background.shadow.drawing=on
|
popup.background.shadow.drawing=on
|
||||||
|
|
||||||
# Left
|
# Left
|
||||||
source "$ITEM_DIR/apple.sh"
|
source "$ITEM_DIR/apple.sh"
|
||||||
source "$ITEM_DIR/spaces.sh"
|
source "$ITEM_DIR/spaces.sh"
|
||||||
source "$ITEM_DIR/front_app.sh"
|
source "$ITEM_DIR/front_app.sh"
|
||||||
|
|
||||||
# Center
|
# Center
|
||||||
# source "$ITEM_DIR/spotify.sh"
|
# source "$ITEM_DIR/spotify.sh"
|
||||||
source "$ITEM_DIR/calendar.sh"
|
source "$ITEM_DIR/calendar.sh"
|
||||||
|
|
||||||
# Right
|
# Right
|
||||||
# source "$ITEM_DIR/brew.sh"
|
# source "$ITEM_DIR/brew.sh"
|
||||||
# source "$ITEM_DIR/github.sh"
|
# source "$ITEM_DIR/github.sh"
|
||||||
source "$ITEM_DIR/volume.sh"
|
source "$ITEM_DIR/volume.sh"
|
||||||
# source "$ITEM_DIR/divider.sh"
|
# source "$ITEM_DIR/divider.sh"
|
||||||
# source "$ITEM_DIR/cpu.sh"
|
# source "$ITEM_DIR/cpu.sh"
|
||||||
|
|
||||||
# Forcing all item scripts to run (never do this outside of sketchybarrc)
|
# Forcing all item scripts to run (never do this outside of sketchybarrc)
|
||||||
${pkgs.sketchybar}/bin/sketchybar --update
|
${pkgs.sketchybar}/bin/sketchybar --update
|
||||||
|
|
||||||
echo "sketchybar configuation loaded.."
|
echo "sketchybar configuation loaded.."
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
icons = {
|
icons = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/icons.sh";
|
target = ".config/sketchybar/icons.sh";
|
||||||
source = folder + /icons.sh;
|
source = folder + /icons.sh;
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/colors.sh";
|
target = ".config/sketchybar/colors.sh";
|
||||||
text = ''
|
text = ''
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# Color Palette
|
# Color Palette
|
||||||
export BLACK=0xff4c4f69
|
export BLACK=0xff4c4f69
|
||||||
export WHITE=0xffeff1f5
|
export WHITE=0xffeff1f5
|
||||||
export RED=0xffd20f39
|
export RED=0xffd20f39
|
||||||
export GREEN=0xff40a02b
|
export GREEN=0xff40a02b
|
||||||
export BLUE=0xff1e66f5
|
export BLUE=0xff1e66f5
|
||||||
export YELLOW=0xffdf8e1d
|
export YELLOW=0xffdf8e1d
|
||||||
export ORANGE=0xfffe640b
|
export ORANGE=0xfffe640b
|
||||||
export MAGENTA=0xffea76cb
|
export MAGENTA=0xffea76cb
|
||||||
export GREY=0xff9ca0b0
|
export GREY=0xff9ca0b0
|
||||||
export TRANSPARENT=0xff000000
|
export TRANSPARENT=0xff000000
|
||||||
export BLUE2=0xff7287fd
|
export BLUE2=0xff7287fd
|
||||||
export FLAMINGO=0xffdd7878
|
export FLAMINGO=0xffdd7878
|
||||||
|
|
||||||
# General bar colors
|
# General bar colors
|
||||||
export BAR_COLOR=0xeff1f5ff # Color of the bar
|
export BAR_COLOR=0xeff1f5ff # Color of the bar
|
||||||
export ICON_COLOR=0xff4c4f69
|
export ICON_COLOR=0xff4c4f69
|
||||||
export LABEL_COLOR=0xff4c4f69 # Color of all labels
|
export LABEL_COLOR=0xff4c4f69 # Color of all labels
|
||||||
export BACKGROUND_1=0xffbcc0cc
|
export BACKGROUND_1=0xffbcc0cc
|
||||||
export BACKGROUND_2=0xffbcc0cc
|
export BACKGROUND_2=0xffbcc0cc
|
||||||
|
|
||||||
export POPUP_BACKGROUND_COLOR=$BLACK
|
export POPUP_BACKGROUND_COLOR=$BLACK
|
||||||
export POPUP_BORDER_COLOR=$WHITE
|
export POPUP_BORDER_COLOR=$WHITE
|
||||||
|
|
||||||
export SHADOW_COLOR=$BLACK
|
export SHADOW_COLOR=$BLACK
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
items_apple = {
|
items_apple = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/apple.sh";
|
target = ".config/sketchybar/items/apple.sh";
|
||||||
source = folder + /items/executable_apple.sh;
|
source = folder + /items/executable_apple.sh;
|
||||||
};
|
};
|
||||||
items_brew = {
|
items_brew = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/brew.sh";
|
target = ".config/sketchybar/items/brew.sh";
|
||||||
source = folder + /items/executable_brew.sh;
|
source = folder + /items/executable_brew.sh;
|
||||||
};
|
};
|
||||||
items_calendar = {
|
items_calendar = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/calendar.sh";
|
target = ".config/sketchybar/items/calendar.sh";
|
||||||
text = ''
|
text = ''
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
sketchybar --add item calendar center \
|
sketchybar --add item calendar center \
|
||||||
--set calendar icon=cal \
|
--set calendar icon=cal \
|
||||||
display=1 \
|
display=1 \
|
||||||
icon.font="$FONT:Black:12.0" \
|
icon.font="$FONT:Black:12.0" \
|
||||||
icon.padding_right=0 \
|
icon.padding_right=0 \
|
||||||
label.width=50 \
|
label.width=50 \
|
||||||
label.align=right \
|
label.align=right \
|
||||||
background.padding_left=15 \
|
background.padding_left=15 \
|
||||||
update_freq=30 \
|
update_freq=30 \
|
||||||
script="$PLUGIN_DIR/calendar.sh" \
|
script="$PLUGIN_DIR/calendar.sh" \
|
||||||
click_script="$PLUGIN_DIR/zen.sh"
|
click_script="$PLUGIN_DIR/zen.sh"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
items_cpu = {
|
items_cpu = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/cpu.sh";
|
target = ".config/sketchybar/items/cpu.sh";
|
||||||
source = folder + /items/executable_cpu.sh;
|
source = folder + /items/executable_cpu.sh;
|
||||||
};
|
};
|
||||||
items_divider = {
|
items_divider = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/divider.sh";
|
target = ".config/sketchybar/items/divider.sh";
|
||||||
source = folder + /items/executable_divider.sh;
|
source = folder + /items/executable_divider.sh;
|
||||||
};
|
};
|
||||||
items_front_app = {
|
items_front_app = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/front_app.sh";
|
target = ".config/sketchybar/items/front_app.sh";
|
||||||
text = ''
|
text = ''
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
FRONT_APP_SCRIPT='sketchybar --set $NAME label="$INFO"'
|
FRONT_APP_SCRIPT='sketchybar --set $NAME label="$INFO"'
|
||||||
sketchybar --add event window_focus \
|
sketchybar --add event window_focus \
|
||||||
--add event windows_on_spaces \
|
--add event windows_on_spaces \
|
||||||
--add item system.aerospace left \
|
--add item system.aerospace left \
|
||||||
--set system.aerospace script="$PLUGIN_DIR/aerospace.sh" \
|
--set system.aerospace script="$PLUGIN_DIR/aerospace.sh" \
|
||||||
icon.font="$FONT:Bold:16.0" \
|
icon.font="$FONT:Bold:16.0" \
|
||||||
label.drawing=off \
|
label.drawing=off \
|
||||||
icon.width=30 \
|
icon.width=30 \
|
||||||
icon=$YABAI_GRID \
|
icon=$YABAI_GRID \
|
||||||
icon.color=$BLACK \
|
icon.color=$BLACK \
|
||||||
updates=on \
|
updates=on \
|
||||||
display=active \
|
display=active \
|
||||||
--subscribe system.aerospace window_focus \
|
--subscribe system.aerospace window_focus \
|
||||||
windows_on_spaces \
|
windows_on_spaces \
|
||||||
mouse.clicked \
|
mouse.clicked \
|
||||||
--add item front_app left \
|
--add item front_app left \
|
||||||
--set front_app script="$FRONT_APP_SCRIPT" \
|
--set front_app script="$FRONT_APP_SCRIPT" \
|
||||||
icon.drawing=off \
|
icon.drawing=off \
|
||||||
background.padding_left=0 \
|
background.padding_left=0 \
|
||||||
background.padding_right=10 \
|
background.padding_right=10 \
|
||||||
label.color=$BLACK \
|
label.color=$BLACK \
|
||||||
label.font="$FONT:Black:12.0" \
|
label.font="$FONT:Black:12.0" \
|
||||||
display=active \
|
display=active \
|
||||||
--subscribe front_app front_app_switched
|
--subscribe front_app front_app_switched
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
items_github = {
|
items_github = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/github.sh";
|
target = ".config/sketchybar/items/github.sh";
|
||||||
source = folder + /items/executable_github.sh;
|
source = folder + /items/executable_github.sh;
|
||||||
};
|
};
|
||||||
items_spaces = {
|
items_spaces = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/spaces.sh";
|
target = ".config/sketchybar/items/spaces.sh";
|
||||||
# label.background.color=$BACKGROUND_2
|
# label.background.color=$BACKGROUND_2
|
||||||
text = ''
|
text = ''
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change
|
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_mode_change
|
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_mode_change
|
||||||
for sid in $(${pkgs.aerospace}/bin/aerospace list-workspaces --all); do
|
for sid in $(${pkgs.aerospace}/bin/aerospace list-workspaces --all); do
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
|
${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
|
||||||
--subscribe space.$sid aerospace_workspace_change \
|
--subscribe space.$sid aerospace_workspace_change \
|
||||||
--subscribe space.$sid aerospace_mode_change \
|
--subscribe space.$sid aerospace_mode_change \
|
||||||
--set space.$sid \
|
--set space.$sid \
|
||||||
icon=$sid \
|
icon=$sid \
|
||||||
icon.padding_left=22 \
|
icon.padding_left=22 \
|
||||||
icon.padding_right=22 \
|
icon.padding_right=22 \
|
||||||
icon.highlight_color=$WHITE \
|
icon.highlight_color=$WHITE \
|
||||||
icon.highlight=off \
|
icon.highlight=off \
|
||||||
icon.color=0xff4c566a \
|
icon.color=0xff4c566a \
|
||||||
background.padding_left=-8 \
|
background.padding_left=-8 \
|
||||||
background.padding_right=-8 \
|
background.padding_right=-8 \
|
||||||
background.color=$BACKGROUND_1 \
|
background.color=$BACKGROUND_1 \
|
||||||
background.drawing=on \
|
background.drawing=on \
|
||||||
script="$PLUGIN_DIR/aerospace.sh $sid" \
|
script="$PLUGIN_DIR/aerospace.sh $sid" \
|
||||||
click_script="aerospace workspace $sid" \
|
click_script="aerospace workspace $sid" \
|
||||||
label.font="Iosevka Nerd Font:Regular:16.0" \
|
label.font="Iosevka Nerd Font:Regular:16.0" \
|
||||||
label.padding_right=33 \
|
label.padding_right=33 \
|
||||||
label.background.height=26 \
|
label.background.height=26 \
|
||||||
label.background.drawing=on \
|
label.background.drawing=on \
|
||||||
label.background.corner_radius=9 \
|
label.background.corner_radius=9 \
|
||||||
label.drawing=off
|
label.drawing=off
|
||||||
done
|
done
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item separator left \
|
${pkgs.sketchybar}/bin/sketchybar --add item separator left \
|
||||||
--set separator icon= \
|
--set separator icon= \
|
||||||
icon.font="Iosevka Nerd Font:Regular:16.0" \
|
icon.font="Iosevka Nerd Font:Regular:16.0" \
|
||||||
background.padding_left=26 \
|
background.padding_left=26 \
|
||||||
background.padding_right=15 \
|
background.padding_right=15 \
|
||||||
label.drawing=off \
|
label.drawing=off \
|
||||||
display=active \
|
display=active \
|
||||||
icon.color=$GREEN
|
icon.color=$GREEN
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
items_spotify = {
|
items_spotify = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/spotify.sh";
|
target = ".config/sketchybar/items/spotify.sh";
|
||||||
source = folder + /items/executable_spotify.sh;
|
source = folder + /items/executable_spotify.sh;
|
||||||
};
|
};
|
||||||
items_volume = {
|
items_volume = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/items/volume.sh";
|
target = ".config/sketchybar/items/volume.sh";
|
||||||
text = ''
|
text = ''
|
||||||
INITIAL_WIDTH=$(osascript -e 'set ovol to output volume of (get volume settings)')
|
INITIAL_WIDTH=$(osascript -e 'set ovol to output volume of (get volume settings)')
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item volume right \
|
${pkgs.sketchybar}/bin/sketchybar --add item volume right \
|
||||||
--subscribe volume volume_change \
|
--subscribe volume volume_change \
|
||||||
--set volume script="$PLUGIN_DIR/volume.sh" \
|
--set volume script="$PLUGIN_DIR/volume.sh" \
|
||||||
updates=on \
|
updates=on \
|
||||||
icon.background.drawing=on \
|
icon.background.drawing=on \
|
||||||
icon.background.color=$FLAMINGO \
|
icon.background.color=$FLAMINGO \
|
||||||
icon.background.height=8 \
|
icon.background.height=8 \
|
||||||
icon.background.corner_radius=3 \
|
icon.background.corner_radius=3 \
|
||||||
icon.width=$INITIAL_WIDTH \
|
icon.width=$INITIAL_WIDTH \
|
||||||
width=100 \
|
width=100 \
|
||||||
icon.align=right \
|
icon.align=right \
|
||||||
label.drawing=off \
|
label.drawing=off \
|
||||||
background.drawing=on \
|
background.drawing=on \
|
||||||
background.color=$BACKGROUND_2 \
|
background.color=$BACKGROUND_2 \
|
||||||
background.height=8 \
|
background.height=8 \
|
||||||
background.corner_radius=3 \
|
background.corner_radius=3 \
|
||||||
align=left
|
align=left
|
||||||
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add alias "Control Center,Sound" right \
|
${pkgs.sketchybar}/bin/sketchybar --add alias "Control Center,Sound" right \
|
||||||
--rename "Control Center,Sound" volume_alias \
|
--rename "Control Center,Sound" volume_alias \
|
||||||
--set volume_alias icon.drawing=off \
|
--set volume_alias icon.drawing=off \
|
||||||
label.drawing=off \
|
label.drawing=off \
|
||||||
alias.color=$BLUE2 \
|
alias.color=$BLUE2 \
|
||||||
background.padding_right=0 \
|
background.padding_right=0 \
|
||||||
background.padding_left=5 \
|
background.padding_left=5 \
|
||||||
width=50 \
|
width=50 \
|
||||||
align=right \
|
align=right \
|
||||||
click_script="$PLUGIN_DIR/volume_click.sh"
|
click_script="$PLUGIN_DIR/volume_click.sh"
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
plugins_brew = {
|
plugins_brew = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/plugins/brew.sh";
|
target = ".config/sketchybar/plugins/brew.sh";
|
||||||
source = folder + /plugins/executable_brew.sh;
|
source = folder + /plugins/executable_brew.sh;
|
||||||
};
|
};
|
||||||
plugins_calendar = {
|
plugins_calendar = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/plugins/calendar.sh";
|
target = ".config/sketchybar/plugins/calendar.sh";
|
||||||
source = folder + /plugins/executable_calendar.sh;
|
source = folder + /plugins/executable_calendar.sh;
|
||||||
};
|
};
|
||||||
plugins_github = {
|
plugins_github = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/plugins/github.sh";
|
target = ".config/sketchybar/plugins/github.sh";
|
||||||
source = folder + /plugins/executable_github.sh;
|
source = folder + /plugins/executable_github.sh;
|
||||||
};
|
};
|
||||||
plugins_icon_map = {
|
plugins_icon_map = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/plugins/icon_map.sh";
|
target = ".config/sketchybar/plugins/icon_map.sh";
|
||||||
source = folder + /plugins/executable_icon_map.sh;
|
source = folder + /plugins/executable_icon_map.sh;
|
||||||
};
|
};
|
||||||
plugins_space = {
|
plugins_space = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/plugins/space.sh";
|
target = ".config/sketchybar/plugins/space.sh";
|
||||||
source = folder + /plugins/executable_space.sh;
|
source = folder + /plugins/executable_space.sh;
|
||||||
};
|
};
|
||||||
plugins_spotify = {
|
plugins_spotify = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/plugins/spotify.sh";
|
target = ".config/sketchybar/plugins/spotify.sh";
|
||||||
source = folder + /plugins/executable_spotify.sh;
|
source = folder + /plugins/executable_spotify.sh;
|
||||||
};
|
};
|
||||||
plugins_volume = {
|
plugins_volume = {
|
||||||
executable = true;
|
executable = true;
|
||||||
target = ".config/sketchybar/plugins/volume.sh";
|
target = ".config/sketchybar/plugins/volume.sh";
|
||||||
text = ''
|
text = ''
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
WIDTH=100
|
WIDTH=100
|
||||||
|
|
||||||
volume_change() {
|
volume_change() {
|
||||||
# INITIAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
|
# INITIAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
|
||||||
# if [ "$INITIAL_WIDTH" -eq "0" ]; then
|
# if [ "$INITIAL_WIDTH" -eq "0" ]; then
|
||||||
# ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=$WIDTH icon.width=$INFO
|
# ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=$WIDTH icon.width=$INFO
|
||||||
# else
|
# else
|
||||||
# ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO width=$WIDTH
|
# ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO width=$WIDTH
|
||||||
# fi
|
# fi
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO
|
${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO
|
||||||
|
|
||||||
|
|
||||||
# sleep 5
|
# sleep 5
|
||||||
# FINAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
|
# FINAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
|
||||||
# if [ "$FINAL_WIDTH" -eq "$INFO" ]; then
|
# if [ "$FINAL_WIDTH" -eq "$INFO" ]; then
|
||||||
# ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=0 icon.width=0
|
# ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=0 icon.width=0
|
||||||
# fi
|
# fi
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$SENDER" in
|
case "$SENDER" in
|
||||||
"volume_change") volume_change
|
"volume_change") volume_change
|
||||||
;;
|
|
||||||
esac
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
plugins_volume_click = {
|
|
||||||
executable = true;
|
|
||||||
target = ".config/sketchybar/plugins/volume_click.sh";
|
|
||||||
text = ''
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
MUTED=$(osascript -e 'output muted of (get volume settings)')
|
|
||||||
if [ "$MUTED" = "false" ]; then
|
|
||||||
osascript -e 'set volume output muted true'
|
|
||||||
else
|
|
||||||
osascript -e 'set volume output muted false'
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
plugins_zen = {
|
|
||||||
executable = true;
|
|
||||||
target = ".config/sketchybar/plugins/zen.sh";
|
|
||||||
source = folder + /plugins/executable_zen.sh;
|
|
||||||
};
|
|
||||||
plugins_aerospace = {
|
|
||||||
executable = true;
|
|
||||||
target = ".config/sketchybar/plugins/aerospace.sh";
|
|
||||||
text = ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
|
|
||||||
|
|
||||||
highlight_focused_workspace() {
|
|
||||||
if [[ "$1" = "$FOCUSED_WORKSPACE" ]]
|
|
||||||
then
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0
|
|
||||||
else
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
illuminate_mode() {
|
|
||||||
if [[ "$mode" = "service" ]]
|
|
||||||
then
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE
|
|
||||||
elif [[ "$mode" = "resize" ]]
|
|
||||||
then
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN
|
|
||||||
else
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
case "$SENDER" in
|
|
||||||
"aerospace_workspace_change")
|
|
||||||
highlight_focused_workspace $1
|
|
||||||
;;
|
;;
|
||||||
"aerospace_mode_change")
|
esac
|
||||||
illuminate_mode
|
'';
|
||||||
;;
|
};
|
||||||
esac
|
plugins_volume_click = {
|
||||||
'';
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/volume_click.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
MUTED=$(osascript -e 'output muted of (get volume settings)')
|
||||||
|
if [ "$MUTED" = "false" ]; then
|
||||||
|
osascript -e 'set volume output muted true'
|
||||||
|
else
|
||||||
|
osascript -e 'set volume output muted false'
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
plugins_zen = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/zen.sh";
|
||||||
|
source = folder + /plugins/executable_zen.sh;
|
||||||
|
};
|
||||||
|
plugins_aerospace = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/aerospace.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
|
||||||
|
|
||||||
|
highlight_focused_workspace() {
|
||||||
|
if [[ "$1" = "$FOCUSED_WORKSPACE" ]]
|
||||||
|
then
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0
|
||||||
|
else
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
illuminate_mode() {
|
||||||
|
if [[ "$mode" = "service" ]]
|
||||||
|
then
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE
|
||||||
|
elif [[ "$mode" = "resize" ]]
|
||||||
|
then
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN
|
||||||
|
else
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
case "$SENDER" in
|
||||||
|
"aerospace_workspace_change")
|
||||||
|
highlight_focused_workspace $1
|
||||||
|
;;
|
||||||
|
"aerospace_mode_change")
|
||||||
|
illuminate_mode
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,150 +1,10 @@
|
||||||
{config,pkgs, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.sketchybar = {
|
services.sketchybar = {
|
||||||
enable = config.shared.darwin.tiling.enable;
|
enable = config.shared.darwin.tiling.enable;
|
||||||
config = ''
|
package = pkgs.sketchybar;
|
||||||
# This is a demo config to showcase some of the most important commands.
|
|
||||||
# It is meant to be changed and configured, as it is intentionally kept sparse.
|
|
||||||
# For a (much) more advanced configuration example see my dotfiles:
|
|
||||||
# https://github.com/FelixKratz/dotfiles
|
|
||||||
|
|
||||||
PLUGIN_DIR="$CONFIG_DIR/plugins"
|
|
||||||
|
|
||||||
##### Bar Appearance #####
|
|
||||||
# Configuring the general appearance of the bar.
|
|
||||||
# These are only some of the options available. For all options see:
|
|
||||||
# https://felixkratz.github.io/SketchyBar/config/bar
|
|
||||||
# If you are looking for other colors, see the color picker:
|
|
||||||
# https://felixkratz.github.io/SketchyBar/config/tricks#color-picker
|
|
||||||
|
|
||||||
sketchybar --bar position=top height=40 blur_radius=30 color=0x04313244
|
|
||||||
|
|
||||||
# Colours
|
|
||||||
SURFACE=0xff313244
|
|
||||||
|
|
||||||
##### Changing Defaults #####
|
|
||||||
# We now change some default values, which are applied to all further items.
|
|
||||||
# For a full list of all available item properties see:
|
|
||||||
# https://felixkratz.github.io/SketchyBar/config/items
|
|
||||||
|
|
||||||
default=(
|
|
||||||
padding_left=5
|
|
||||||
padding_right=5
|
|
||||||
icon.font="Hack Nerd Font:Bold:17.0"
|
|
||||||
label.font="Hack Nerd Font:Bold:14.0"
|
|
||||||
icon.color=0xffcdd6f4
|
|
||||||
label.color=0xffcdd6f4
|
|
||||||
icon.padding_left=8
|
|
||||||
icon.padding_right=4
|
|
||||||
label.padding_left=4
|
|
||||||
label.padding_right=8
|
|
||||||
background.padding_left=2
|
|
||||||
background.padding_right=2
|
|
||||||
background.color=$SURFACE \
|
|
||||||
background.corner_radius=10 \
|
|
||||||
background.height=30 \
|
|
||||||
background.border_width=1 \
|
|
||||||
)
|
|
||||||
sketchybar --default "$\{default[@]}"
|
|
||||||
|
|
||||||
sketchybar --add event aerospace_workspace_change
|
|
||||||
|
|
||||||
for sid in $(aerospace list-workspaces --all); do
|
|
||||||
sketchybar --add item space.$sid left \
|
|
||||||
--subscribe space.$sid aerospace_workspace_change \
|
|
||||||
--set space.$sid \
|
|
||||||
background.border_width=1 \
|
|
||||||
background.border_color=0xffb4befe \
|
|
||||||
background.corner_radius=5 \
|
|
||||||
background.height=20 \
|
|
||||||
icon.padding_left=0 \
|
|
||||||
icon.padding_right=0 \
|
|
||||||
label.padding_right=6 \
|
|
||||||
label="$sid" \
|
|
||||||
click_script="aerospace workspace $sid" \
|
|
||||||
script="$CONFIG_DIR/plugins/aerospace.sh $sid"
|
|
||||||
done
|
|
||||||
|
|
||||||
##### Adding Left Items #####
|
|
||||||
# We add some regular items to the left side of the bar, where
|
|
||||||
# only the properties deviating from the current defaults need to be set
|
|
||||||
|
|
||||||
sketchybar --add item chevron left \
|
|
||||||
--set chevron icon= label.drawing=off background.drawing=off \
|
|
||||||
icon.color=0xfff5e0dc \
|
|
||||||
--add item front_app left \
|
|
||||||
--set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \
|
|
||||||
label.color=0xff94e2d5 \
|
|
||||||
label.padding_left=8 \
|
|
||||||
background.border_color=0xff94e2d5 \
|
|
||||||
--subscribe front_app front_app_switched
|
|
||||||
|
|
||||||
##### Adding Right Items #####
|
|
||||||
# In the same way as the left items we can add items to the right side.
|
|
||||||
# Additional position (e.g. center) are available, see:
|
|
||||||
# https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar
|
|
||||||
|
|
||||||
# Some items refresh on a fixed cycle, e.g. the clock runs its script once
|
|
||||||
# every 10s. Other items respond to events they subscribe to, e.g. the
|
|
||||||
# volume.sh script is only executed once an actual change in system audio
|
|
||||||
# volume is registered. More info about the event system can be found here:
|
|
||||||
# https://felixkratz.github.io/SketchyBar/config/events
|
|
||||||
|
|
||||||
sketchybar --add item clock right \
|
|
||||||
--set clock update_freq=10 icon= script="$PLUGIN_DIR/clock.sh" \
|
|
||||||
icon.color=0xfffab387 \
|
|
||||||
label.color=0xffcdd6f4 \
|
|
||||||
background.color=$SURFACE \
|
|
||||||
background.corner_radius=10 \
|
|
||||||
background.height=30 \
|
|
||||||
--add item volume right \
|
|
||||||
--set volume script="$PLUGIN_DIR/volume.sh" \
|
|
||||||
label.color=0xffcdd6f4 \
|
|
||||||
background.color=$SURFACE \
|
|
||||||
background.corner_radius=10 \
|
|
||||||
background.height=30 \
|
|
||||||
--subscribe volume volume_change \
|
|
||||||
--add item battery right \
|
|
||||||
--set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \
|
|
||||||
label.color=0xffcdd6f4 \
|
|
||||||
background.color=$SURFACE \
|
|
||||||
background.corner_radius=10 \
|
|
||||||
background.height=30 \
|
|
||||||
--subscribe battery system_woke power_source_change
|
|
||||||
|
|
||||||
sketchybar -m --add item mullvad right \
|
|
||||||
--set mullvad icon= \
|
|
||||||
icon.color=0xfff38ba8 \
|
|
||||||
background.color=$SURFACE \
|
|
||||||
background.corner_radius=10 \
|
|
||||||
background.height=30 \
|
|
||||||
background.border_width=1 \
|
|
||||||
background.border_color=0xfff38ba8 \
|
|
||||||
label.padding_left=0 \
|
|
||||||
label.padding_right=0 \
|
|
||||||
icon.padding_left=6 \
|
|
||||||
update_freq=5 \
|
|
||||||
script="$PLUGIN_DIR/mullvad.sh"
|
|
||||||
|
|
||||||
# Add event
|
|
||||||
sketchybar -m --add event song_update com.apple.iTunes.playerInfo
|
|
||||||
|
|
||||||
# Add Music Item
|
|
||||||
sketchybar -m --add item music right \
|
|
||||||
--set music script="$PLUGIN_DIR/music.sh" \
|
|
||||||
click_script="$PLUGIN_DIR/music_click.sh" \
|
|
||||||
label.padding_right=10 \
|
|
||||||
label.color=0xffcdd6f4 \
|
|
||||||
background.color=$SURFACE \
|
|
||||||
background.corner_radius=10 \
|
|
||||||
background.height=30 \
|
|
||||||
background.border_width=1 \
|
|
||||||
background.border_color=0xfff38ba8 \
|
|
||||||
drawing=off \
|
|
||||||
--subscribe music song_update
|
|
||||||
|
|
||||||
##### Force all scripts to run the first time (never do this in a script) #####
|
|
||||||
sketchybar --update
|
|
||||||
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
# Applied to all systems
|
# Applied to all systems
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
nerd-fonts.fira-code
|
nerd-fonts.fira-code
|
||||||
|
@ -7,11 +12,12 @@
|
||||||
iosevka
|
iosevka
|
||||||
nerd-fonts.symbols-only
|
nerd-fonts.symbols-only
|
||||||
nerd-fonts.iosevka
|
nerd-fonts.iosevka
|
||||||
|
inputs.apple-fonts.packages.${pkgs.system}.sf-pro
|
||||||
];
|
];
|
||||||
|
|
||||||
# configuration for shared modules.
|
# configuration for shared modules.
|
||||||
# all custom options in 'shared' for clarity.
|
# all custom options in 'shared' for clarity.
|
||||||
shared.darwin = {
|
shared.darwin = {
|
||||||
tiling.enable = true; # use tiling window manager
|
tiling.enable = host.darwin; # use tiling window manager
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
bat.enable = true;
|
bat.enable = true;
|
||||||
hyfetch.enable = true;
|
hyfetch.enable = true;
|
||||||
direnv.enable = true;
|
direnv.enable = true;
|
||||||
|
fish.enable = true;
|
||||||
# sort-lines:end
|
# sort-lines:end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue