arch-spatula / neovim-setup

neovim 설정 저장
0 stars 1 forks source link

[Feature] - sketchybarrc #68

Open arch-spatula opened 1 month ago

arch-spatula commented 1 month ago

기능명

feat/(기능명)

sketchybar

FelixKratz/formulae

https://github.com/FelixKratz/SketchyBar/discussions/47?sort=top#discussioncomment-3069564

배끼고 싶은 sketchybar 설정

https://github.com/Tnixc/dots/tree/main/config/sketchybar

조금더 현실적인 적용 방법은 아래 방법인 것 같습니다.

https://github.com/khaneliman/dotfiles


arch-spatula commented 1 month ago
#!/bin/bash
# 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
# sketchybar --reload

PLUGIN_DIR="$CONFIG_DIR/plugins"

# TODO: 현재 한글인지 영어인지 표시하는 기능 추가하기
# TODO: CPU 부하율 추가

##### 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=32 blur_radius=30 color=0x40000000

sketchybar --bar height=46 \
      y_offset=4 \
      blur_radius=12 \
            position=top \
      padding_left=6 \
      padding_right=6 \
      margin=12 \
      corner_radius=12 \
      color=0xE725273A \
      shadow=off \
      border_width=1 \
      border_color=0x44CAD3F5

##### 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="JetBrainsMono Nerd Font Mono:Bold:16.0"
  label.font="JetBrainsMono Nerd Font Mono:Bold:16.0"
  icon.color=0xffCAD3F5
  label.color=0xffCAD3F5
  icon.padding_left=4
  icon.padding_right=4
  label.padding_left=4
  label.padding_right=4
)
sketchybar --default "${default[@]}"

##### Adding Mission Control Space Indicators #####
# Let's add some mission control spaces:
# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
# to indicate active and available mission control spaces.

#SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10")
SPACE_ICONS=("一" "二" "三" "四" "五" "六" "七" "八" "九" "十")
SPACE=()

for i in "${!SPACE_ICONS[@]}"
do
  sid="$(($i+1))"
  space=(
    space="$sid"
    icon="${SPACE_ICONS[i]}"
    icon.padding_left=6
    icon.padding_right=6
        background.color=0x44ffffff
    background.corner_radius=4
    background.height=24
    label.drawing=off
    script="$PLUGIN_DIR/space.sh"
    click_script="yabai -m space --focus $sid"
  )
  sketchybar --add space space."$sid" left --set space."$sid" "${space[@]}"
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 \
                     --add item front_app left \
                     --set front_app icon.drawing=off script="$PLUGIN_DIR/front_app.sh" \
                     --subscribe front_app front_app_switched

sketchybar --default label.padding_left=6 \
      label.padding_right=6 \
      icon.padding_left=6 \
      icon.padding_right=6 \
            icon.font="JetBrainsMono Nerd Font Mono:Bold:20.0" \
      label.font="JetBrainsMono Nerd Font Mono:Bold:16.0" \
      background.height=32 \
      background.padding_right=4 \
      background.padding_left=4 \
      background.corner_radius=6

##### 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
# TODO: 아래 아이콘 활용해서 시간 표현하기
# 󱑖 󱑋 󱑍 󱑎 󱑏 󱑐 󱑑 󱑒 󱑓 󱑔 󱑕
sketchybar --add item clock right                              \
           --set clock   update_freq=20                        \
                         script="$PLUGIN_DIR/clock.sh"         \

sketchybar --add item clock_icon right                         \
           --set clock_icon update_freq=20                     \
                     icon.font="JetBrainsMono Nerd Font Mono:Bold:32.0" \
                     icon.padding_right=-6 \
                     icon.padding_left=8  \
                     background.color=0xff6EA3FE \
                         icon=󱑏                                \
                                                 #padding_left=3 \ icon.color=0xff121219 \

sketchybar --add item volume right \
                     --set volume script="$PLUGIN_DIR/volume.sh" \
                     --subscribe volume volume_change

sketchybar --add item battery right \
                     --set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \
                     --subscribe battery system_woke power_source_change

#sketchybar --add item battery right \
      #--set battery update_freq=20 \
      #icon.drawing=off \
      #script="~/.config/sketchybar/plugins/power.sh" \
      #background.color=0x003C3E4F \
      #background.padding_left=0

#sketchybar --add item power_logo right \
      #--set power_logo icon=f241􀛨 \
      #icon.color=0xff121219 \
      #label.drawing=off \
      #icon.padding_left=3\
      #icon.padding_right=3\
      #background.color=0xff90D05A

#sketchybar --add item volume right \
      #--set volume update_freq=1 \
      #icon.drawing=off \
      #script="~/.config/sketchybar/plugins/volume.sh" \
      #background.color=0x003C3E4F \
      #background.padding_left=0

#sketchybar --add item volume_icon right \
      #--set volume_icon icon=􀊡 \
      #icon.color=0xff121219 \
      #label.drawing=off \
      #background.color=0xffC6A0F6

##### Force all scripts to run the first time (never do this in a script) #####
sketchybar --update

백업

arch-spatula commented 1 month ago

https://github.com/Tnixc/dots/blob/88eaca09e0faca9fec644913987edc8d133461dd/sketchybar/sketchybarrc

여기 제가 찾고 싶은 것을 찾은 것 같습니다.

arch-spatula commented 1 month ago

스크린샷 2024-05-14 오후 11 48 55

일부는 *이 붙고 일부는 안 붙습이다. 이 원인을 분석하기 바랍니다.