Add BitBar to Brewfile and configure it for yabai & skhd
This commit is contained in:
		
							
								
								
									
										29
									
								
								.config/BitBar/yabai_skhd.1s.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										29
									
								
								.config/BitBar/yabai_skhd.1s.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# <bitbar.title>yabai/skhd helper</bitbar.title>
 | 
			
		||||
# <bitbar.version>v1.0</bitbar.version>
 | 
			
		||||
# <bitbar.author>James Won</bitbar.author>
 | 
			
		||||
# <bitbar.author.github>jwon</bitbar.author.github>
 | 
			
		||||
# <bitbar.desc>Plugin that displays desktop id and desktop mode of yabai.</bitbar.desc>
 | 
			
		||||
# <bitbar.dependencies>brew,yabai,skhd</bitbar.dependencies>
 | 
			
		||||
 | 
			
		||||
# Info about yabai, see: https://github.com/koekeishiya/yabai
 | 
			
		||||
# For skhd, see: https://github.com/koekeishiya/skhd
 | 
			
		||||
# This plugin has been forked from https://github.com/matryer/bitbar-plugins/blob/master/Tools/chunkwm_skhd.1s.sh
 | 
			
		||||
 | 
			
		||||
export PATH=/usr/local/bin:$PATH
 | 
			
		||||
 | 
			
		||||
if [[ "$1" = "stop" ]]; then
 | 
			
		||||
  brew services stop yabai
 | 
			
		||||
  brew services stop skhd
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ "$1" = "restart" ]]; then
 | 
			
		||||
  brew services restart yabai
 | 
			
		||||
  brew services restart skhd
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "$(yabai -m query --spaces --display | jq 'map(select(."focused" == 1))[-1].index'):$(yabai -m query --spaces --display | jq -r 'map(select(."focused" == 1))[-1].type') | length=5"
 | 
			
		||||
echo "---"
 | 
			
		||||
echo "Restart yabai & skhd | bash='$0' param1=restart terminal=false"
 | 
			
		||||
echo "Stop yabai & skhd | bash='$0' param1=stop terminal=false"
 | 
			
		||||
@@ -32,6 +32,7 @@ brew "hugo"
 | 
			
		||||
brew "iperf"
 | 
			
		||||
brew "iperf3"
 | 
			
		||||
brew "ipmitool"
 | 
			
		||||
brew "jq"
 | 
			
		||||
brew "koekeishiya/formulae/skhd"
 | 
			
		||||
brew "koekeishiya/formulae/yabai", args: ["HEAD"]
 | 
			
		||||
brew "mas"
 | 
			
		||||
@@ -59,6 +60,7 @@ cask "arq"
 | 
			
		||||
cask "atom"
 | 
			
		||||
cask "balenaetcher"
 | 
			
		||||
cask "bartender"
 | 
			
		||||
cask "bitbar"
 | 
			
		||||
cask "bitwarden"
 | 
			
		||||
cask "bonjeff"
 | 
			
		||||
cask "calibre"
 | 
			
		||||
 
 | 
			
		||||
@@ -246,6 +246,9 @@ echo ">>> Setting up Pandoc environment"
 | 
			
		||||
eval "$(/usr/libexec/path_helper)"
 | 
			
		||||
cabal install pandoc-include pandoc-include-code pandoc-plantuml-diagrams
 | 
			
		||||
 | 
			
		||||
## Set up BitBar
 | 
			
		||||
defaults write com.matryer.BitBar pluginsDirectory "~/.config/BitBar/"
 | 
			
		||||
 | 
			
		||||
## Set zsh from brew as default shell
 | 
			
		||||
echo ">>> Setting /usr/local/bin/zsh as default shell for $USER"
 | 
			
		||||
sudo chsh -s /usr/local/bin/zsh $USER
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user