Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shellcheck fmt #92

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
inherit system;
overlays = [
(_final: _prev: {
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/8634
mesa = if _prev.stdenv.isDarwin then inputs.nixpkgs-stable.legacyPackages.${_prev.system}.mesa else
inputs.nixpkgs.legacyPackages.${_prev.system}.mesa;
})
Expand Down
6 changes: 1 addition & 5 deletions hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ in
yuanw = darwinSystem {
system = "x86_64-darwin";
modules = [
inputs.self.nixosModules.common
inputs.self.nixosModules.darwin
./yuan-mac.nix
];
};
Expand All @@ -52,16 +50,14 @@ in
./wk01174.nix
];
};
# Github Action runners do not support M1 yet.
ci = darwinSystem {
system = "x86_64-darwin";
modules = [
./wk01174.nix
];
};


};

};
perSystem = { system, ... }: {
packages.asche = self.nixosConfigurations.asche.config.system.build.toplevel;
Expand Down
1 change: 1 addition & 0 deletions modules/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
inputs.agenix.overlays.default
(_final: _prev: {
stable = inputs.nixpkgs-stable.legacyPackages.${_prev.system};
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/8634
mesa = if _prev.stdenv.isDarwin then inputs.nixpkgs-stable.legacyPackages.${_prev.system}.mesa else
inputs.nixpkgs.legacyPackages.${_prev.system}.mesa;
# # reiryoku-firmware = inputs.reiryoku.packages.${prev.system}.firmware;
Expand Down
38 changes: 31 additions & 7 deletions modules/wm/sketchybar/icons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ ACTIVITY=􀒓
LOCK=􀒳
BELL=􀋚
BELL_DOT=􀝗

export -n LOADING
export -n APPLE
export -n PREFERENCES
export -n ACTIVITY
export -n LOCK
export -n BELL
export -n BELL_DOT
MAIL=􀍕
# Git Icons
GIT_ISSUE=􀍷
Expand All @@ -17,12 +23,11 @@ GIT_PULL_REQUEST=􀙡
GIT_COMMIT=􀡚
GIT_INDICATOR=􀂓

# Spotify Icons
SPOTIFY_BACK=􀊎
SPOTIFY_PLAY_PAUSE=􀊈
SPOTIFY_NEXT=􀊐
SPOTIFY_SHUFFLE=􀊝
SPOTIFY_REPEAT=􀊞
export -n GIT_ISSUE
export -n GIT_DISCUSSION
export -n GIT_PULL_REQUEST
export -n GIT_COMMIT
export -n GIT_INDICATOR

# Yabai Icons
YABAI_BSP=􀻤
Expand All @@ -32,6 +37,12 @@ YABAI_PARENT_ZOOM=􀥃
YABAI_FLOAT=􀢌
YABAI_GRID=􀧍

export -n YABAI_BSP
export -n YABAI_STACK
export -n YABAI_FULLSCREEN_ZOOM
export -n YABAI_PARENT_ZOOM
export -n YABAI_FLOAT
export -n YABAI_GRID
# Battery Icons
BATTERY_100=􀛨
BATTERY_75=􀺸
Expand All @@ -40,9 +51,22 @@ BATTERY_25=􀛩
BATTERY_0=􀛪
BATTERY_CHARGING=􀢋

export -n BATTERY_100
export -n BATTERY_75
export -n BATTERY_50
export -n BATTERY_25
export -n BATTERY_0
export -n BATTERY_CHARGING

# Volume Icons
VOLUME_100=􀊩
VOLUME_66=􀊧
VOLUME_33=􀊥
VOLUME_10=􀊡
VOLUME_0=􀊣

export -n VOLUME_100
export -n VOLUME_66
export -n VOLUME_33
export -n VOLUME_10
export -n VOLUME_0
8 changes: 4 additions & 4 deletions modules/wm/sketchybar/items/cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ cpu_percent=(

cpu_sys=(
width=0
graph.color=$RED
graph.fill_color=$RED
graph.color="$RED"
graph.fill_color="$RED"
label.drawing=off
icon.drawing=off
background.height=30
Expand All @@ -32,12 +32,12 @@ cpu_sys=(
)

cpu_user=(
graph.color=$BLUE
graph.color="$BLUE"
label.drawing=off
icon.drawing=off
background.height=30
background.drawing=on
background.color=$TRANSPARENT
background.color="$TRANSPARENT"
)

sketchybar --add item cpu.top right \
Expand Down
2 changes: 1 addition & 1 deletion modules/wm/sketchybar/items/front_app.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

FRONT_APP_SCRIPT='sketchybar --set $NAME label="$INFO"'
FRONT_APP_SCRIPT="sketchybar --set $NAME label=$INFO"

front_app=(
icon.drawing=off
Expand Down
10 changes: 5 additions & 5 deletions modules/wm/sketchybar/items/github.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash

POPUP_CLICK_SCRIPT='sketchybar --set $NAME popup.drawing=toggle'
POPUP_CLICK_SCRIPT="sketchybar --set $NAME popup.drawing=toggle"

github_bell=(
update_freq=30
icon=$BELL
icon="$BELL"
icon.font="$FONT:Bold:15.0"
icon.color=$BLUE
label=$LOADING
label.highlight_color=$BLUE
icon.color="$BLUE"
label="$LOADING"
label.highlight_color="$BLUE"
popup.align=right
script="$PLUGIN_DIR/github.sh"
click_script="$POPUP_CLICK_SCRIPT"
Expand Down
4 changes: 2 additions & 2 deletions modules/wm/sketchybar/items/ical.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ POPUP_CLICK_SCRIPT="sketchybar --set ical popup.drawing=toggle"
sketchybar --add item ical right \
--set ical update_freq=180 \
icon=􀉉 \
icon.color=${YELLOW} \
label.color=${YELLOW} \
icon.color="${YELLOW}" \
label.color="${YELLOW}" \
popup.align=right \
script="$PLUGIN_DIR/ical.sh" \
click_script="$POPUP_CLICK_SCRIPT" \
Expand Down
4 changes: 2 additions & 2 deletions modules/wm/sketchybar/items/mail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ sketchybar --add item mail left \
click_script="$PLUGIN_DIR/mail.sh" \
icon.padding_left=22 \
icon.font="$ICON_FONT:Solid:16.0" \
icon=$MAIL \
icon.color=$BLUE \
icon="$MAIL" \
icon.color="$BLUE" \
label=!
19 changes: 9 additions & 10 deletions modules/wm/sketchybar/items/spaces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,24 @@ SPACE_ICONS=("丹" "赤" "蘭" "馨" "玉" "白" "金" "刚" "9" "10" "11" "12"
# New space by left clicking separator (>)

sid=0
spaces=()
for i in "${!SPACE_ICONS[@]}"; do
sid=$((i + 1))

space=(
associated_space=$sid
associated_space="$sid"
icon="${SPACE_ICONS[i]}"
icon.padding_left=10
icon.padding_right=10
padding_left=2
padding_right=2
label.padding_right=20
icon.highlight_color=$RED
label.color=$GREY
label.highlight_color=$WHITE
icon.highlight_color="$RED"
label.color="$GREY"
label.highlight_color="$WHITE"
label.font="sketchybar-app-font:Regular:16.0"
label.y_offset=-1
background.color=$BACKGROUND_1
background.border_color=$BACKGROUND_2
background.color="$BACKGROUND_1"
background.border_color="$BACKGROUND_2"
background.drawing=off
label.drawing=off
script="$PLUGIN_DIR/space.sh"
Expand All @@ -36,8 +35,8 @@ for i in "${!SPACE_ICONS[@]}"; do
done

spaces_bracket=(
background.color=$BACKGROUND_1
background.border_color=$BACKGROUND_2
background.color="$BACKGROUND_1"
background.border_color="$BACKGROUND_2"
)

separator=(
Expand All @@ -48,7 +47,7 @@ separator=(
label.drawing=off
associated_display=active
click_script='yabai -m space --create && sketchybar --trigger space_change'
icon.color=$WHITE
icon.color="$WHITE"
)

sketchybar --add bracket spaces_bracket '/space\..*/' \
Expand Down
Loading