Add dunst polybar module
This commit is contained in:
		@@ -442,10 +442,33 @@
 | 
			
		||||
* Dunst
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  [module/dunst]
 | 
			
		||||
  type = custom/text
 | 
			
		||||
  content = ""
 | 
			
		||||
  click-left = dunstify --replace=10524 "Notifications Disabled" && sleep 2 && dunstify "DUNST_COMMAND_PAUSE"
 | 
			
		||||
  click-right = dunstify "DUNST_COMMAND_RESUME" && dunstify --replace=10524 "Notifications Resumed"
 | 
			
		||||
  type = custom/script
 | 
			
		||||
 | 
			
		||||
  format-underline = ${colors.background}
 | 
			
		||||
  click-left = ~/bin/notifToggle
 | 
			
		||||
  format = <label>
 | 
			
		||||
  exec = ~/.config/polybar/scripts/dunst.sh
 | 
			
		||||
  interval = 2
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Dunst Status script
 | 
			
		||||
  :PROPERTIES:
 | 
			
		||||
  :header-args:  :tangle ~/.config/polybar/scripts/dunst.sh
 | 
			
		||||
  :header-args+: :comments both :mkdirp yes
 | 
			
		||||
  :header-args+: :shebang "#!/usr/bin/env bash"
 | 
			
		||||
  :END:
 | 
			
		||||
#+BEGIN_SRC bash
 | 
			
		||||
  tmpfile="/tmp/dunststatus";
 | 
			
		||||
 | 
			
		||||
  if [ -f $tmpfile ]; then
 | 
			
		||||
    if grep -q "on" $tmpfile; then
 | 
			
		||||
      echo "";
 | 
			
		||||
    elif grep -q "off" $tmpfile; then
 | 
			
		||||
      echo "%{F#FB4934}%{F-}";
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    echo "";
 | 
			
		||||
  fi
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Weather
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user