some comments in the example rc

This commit is contained in:
FelixKratz 2021-09-02 20:42:11 +02:00
parent 60cf6bef2b
commit 470cef7562
2 changed files with 18 additions and 14 deletions

View file

@ -92,6 +92,7 @@ If you want to use your own plugins, make sure that they are referenced in the r
```bash ```bash
chmod +x name/of/plugin.sh chmod +x name/of/plugin.sh
``` ```
Have a look at the [discussion](https://github.com/FelixKratz/SketchyBar/discussions/12) about plugins and share your own if you want to.
You should of course vet the code from all plugins before granting them the executable bit to make sure they are not harming your computer. You should of course vet the code from all plugins before granting them the executable bit to make sure they are not harming your computer.
If you have problems with missing fonts you might need to install the Hack Nerd Font: If you have problems with missing fonts you might need to install the Hack Nerd Font:
@ -141,7 +142,7 @@ sketchybar -m add component <type> <name> <position>
``` ```
Components are essentially items, but with special properties. Components are essentially items, but with special properties.
Currently there are the component *types*: Currently there are the component *types*:
* ~~*title*: Showing the current window title,~~ (DEPRECATED, see https://github.com/FelixKratz/SketchyBar/discussions/12#discussioncomment-1215932) * ~~*title*: Showing the current window title,~~ (DEPRECATED, see [this](https://github.com/FelixKratz/SketchyBar/discussions/12#discussioncomment-1215932))
* *graph*: showing a graph, * *graph*: showing a graph,
* *space*: representing a mission control space * *space*: representing a mission control space

View file

@ -1,8 +1,6 @@
# TODO: Cache scripts from files to reduce IO operations
# TODO: Create a enable disable command to hide items and unsubscribe them from updates
# TODO: Implement the plugin system for easier setup of preconfigured items # TODO: Implement the plugin system for easier setup of preconfigured items
############## BAR ################## ############## BAR CONFIGURATION ##################
sketchybar -m config height 25 sketchybar -m config height 25
sketchybar -m config position top sketchybar -m config position top
sketchybar -m config padding_left 10 sketchybar -m config padding_left 10
@ -12,7 +10,7 @@ sketchybar -m config bar_color 0x44000000 #0xaf202020
############## SCRIPT CACHING ############ ############## SCRIPT CACHING ############
sketchybar -m default cache_scripts on sketchybar -m default cache_scripts on
############## SPACES ############### ############# SETTING DEFAULT VALUES #######
sketchybar -m default icon_font "Hack Nerd Font:Bold:17.0" sketchybar -m default icon_font "Hack Nerd Font:Bold:17.0"
sketchybar -m default icon_color 0xffffffff sketchybar -m default icon_color 0xffffffff
sketchybar -m default label_font "Hack Nerd Font:Bold:14.0" sketchybar -m default label_font "Hack Nerd Font:Bold:14.0"
@ -20,6 +18,7 @@ sketchybar -m default label_color 0xffffffff
sketchybar -m default label_padding_left 4 sketchybar -m default label_padding_left 4
sketchybar -m default icon_padding_left 16 sketchybar -m default icon_padding_left 16
############## CREATING SPACES ###############
sketchybar -m add component space code left sketchybar -m add component space code left
sketchybar -m set code associated_display 1 sketchybar -m set code associated_display 1
sketchybar -m set code associated_space 1 sketchybar -m set code associated_space 1
@ -61,7 +60,7 @@ sketchybar -m set zoom associated_space 5
sketchybar -m set zoom icon V sketchybar -m set zoom icon V
sketchybar -m set zoom icon_padding_left 0 sketchybar -m set zoom icon_padding_left 0
################## LEFT ITEMS ################## ################## CREATING LEFT ITEMS ##################
sketchybar -m default label_padding_left 0 sketchybar -m default label_padding_left 0
sketchybar -m default icon_padding_left 0 sketchybar -m default icon_padding_left 0
@ -88,12 +87,13 @@ sketchybar -m set topmem script "~/.config/sketchybar/plugins/topmem.sh"
sketchybar -m set topmem update_freq 15 sketchybar -m set topmem update_freq 15
################# RIGHT ITEMS #################### ################# CREATING RIGHT ITEMS ####################
sketchybar -m add item clock right sketchybar -m add item clock right
sketchybar -m set clock update_freq 10 sketchybar -m set clock update_freq 10
sketchybar -m set clock script "~/.config/sketchybar/plugins/clock.sh" sketchybar -m set clock script "~/.config/sketchybar/plugins/clock.sh"
sketchybar -m set clock label_padding_left 15 sketchybar -m set clock label_padding_left 15
# Switching up the defaults for further items
sketchybar -m default label_padding_left 4 sketchybar -m default label_padding_left 4
sketchybar -m default icon_padding_left 15 sketchybar -m default icon_padding_left 15
@ -115,10 +115,12 @@ sketchybar -m set githubIndicator update_freq 1000
sketchybar -m set githubIndicator icon_font "Hack Nerd Font:Bold:18.0" sketchybar -m set githubIndicator icon_font "Hack Nerd Font:Bold:18.0"
sketchybar -m set githubIndicator icon  sketchybar -m set githubIndicator icon 
sketchybar -m set githubIndicator click_script "open https://github.com" sketchybar -m set githubIndicator click_script "open https://github.com"
# Subscribing to system events for refresh
sketchybar -m subscribe githubIndicator system_woke sketchybar -m subscribe githubIndicator system_woke
sketchybar -m default icon_padding_left 4 sketchybar -m default icon_padding_left 4
########### CREATING GRAPHS ###################
sketchybar -m add component graph cpu_user right 200 nospace sketchybar -m add component graph cpu_user right 200 nospace
sketchybar -m set cpu_user script "~/.config/sketchybar/plugins/cpu_graph.sh" sketchybar -m set cpu_user script "~/.config/sketchybar/plugins/cpu_graph.sh"
sketchybar -m set cpu_user graph_color 0xffffffff sketchybar -m set cpu_user graph_color 0xffffffff
@ -133,13 +135,6 @@ sketchybar -m set cpu_sys label_padding_left 0
sketchybar -m set cpu_sys associated_space 1 sketchybar -m set cpu_sys associated_space 1
sketchybar -m set cpu_sys icon  sketchybar -m set cpu_sys icon 
sketchybar -m add item topproc right
sketchybar -m set topproc associated_space 1
sketchybar -m set topproc icon_padding_left 10
sketchybar -m set topproc label_padding_right 5
sketchybar -m set topproc script "~/.config/sketchybar/plugins/topproc.sh"
sketchybar -m set topproc update_freq 15
sketchybar -m add component graph network_down right 200 nospace sketchybar -m add component graph network_down right 200 nospace
sketchybar -m set network_down associated_space 3 sketchybar -m set network_down associated_space 3
sketchybar -m set network_down label_padding_left 0 sketchybar -m set network_down label_padding_left 0
@ -154,11 +149,18 @@ sketchybar -m set network_up label_padding_left 0
sketchybar -m set network_up associated_space 3 sketchybar -m set network_up associated_space 3
sketchybar -m set network_up graph_color 0xff48aa2a sketchybar -m set network_up graph_color 0xff48aa2a
sketchybar -m add item topproc right
sketchybar -m set topproc associated_space 1
sketchybar -m set topproc icon_padding_left 10
sketchybar -m set topproc label_padding_right 5
sketchybar -m set topproc script "~/.config/sketchybar/plugins/topproc.sh"
sketchybar -m set topproc update_freq 15
###################### CENTER ITEMS ################### ###################### CENTER ITEMS ###################
sketchybar -m default label_padding_right 15 sketchybar -m default label_padding_right 15
sketchybar -m default icon_padding_right 4 sketchybar -m default icon_padding_right 4
# Adding custom events which can listen on distributed notifications from other running processes
sketchybar -m add event spotify_change "com.spotify.client.PlaybackStateChanged" sketchybar -m add event spotify_change "com.spotify.client.PlaybackStateChanged"
sketchybar -m add item spotifyIndicator center sketchybar -m add item spotifyIndicator center
@ -166,6 +168,7 @@ sketchybar -m set spotifyIndicator script "~/.config/sketchybar/plugins/spotifyI
sketchybar -m set spotifyIndicator click_script "osascript -e 'tell application \"Spotify\" to pause'" sketchybar -m set spotifyIndicator click_script "osascript -e 'tell application \"Spotify\" to pause'"
sketchybar -m subscribe spotifyIndicator spotify_change sketchybar -m subscribe spotifyIndicator spotify_change
#################### RUN ALL SCRIPTS AND REDRAW ###############
sketchybar -m update sketchybar -m update
echo "sketchybar configuration loaded.." echo "sketchybar configuration loaded.."