Răsfoiți Sursa

added volume to bar

KlemensMaentele 3 ani în urmă
părinte
comite
c9d1b75cd8
2 a modificat fișierele cu 13 adăugiri și 6 ștergeri
  1. 5 4
      scripts/autostart
  2. 8 2
      scripts/bar.sh

+ 5 - 4
scripts/autostart

@@ -1,12 +1,13 @@
-#!/bin/sh
+!/bin/sh
 
 # this is just an example!
 # add your autostart stuffs here
+xrandr --output DP1 --auto --right-of LVDS1 &
 xbacklight -set 100 &
-xmodmap ~/.Xmodmap &
+xmodmap ~/.Xmodmap
 #xrdb merge ~/.Xresources &
-feh --bg-fill ~/Pictures/wall/wallpaper.png &
-xset r rate 170 60 &
+feh --bg-fill ~/Pictures/wall/wall.png &
+xset r rate 200 50 &
 # run bar script and dwm ( do not remove this )
 bash ~/.config/chadwm/scripts/./bar.sh &
 dwm

+ 8 - 2
scripts/bar.sh

@@ -56,7 +56,13 @@ wlan() {
 
 clock() {
 	printf "^c$black^ ^b$darkblue^ 󱑆 "
-	printf "^c$black^^b$blue^ $(date '+%H:%M %a %b %Y')  "
+	printf "^c$black^^b$blue^ $(date '+%H:%M %a %d %b %Y')  "
+}
+
+volume() {
+        volume=$(pamixer --get-volume)
+        printf "^c$black^^b$darkblue^  "
+        printf "^c$black^^b$blue^ $volume"
 }
 
 while true; do
@@ -64,5 +70,5 @@ while true; do
 	[ $interval = 0 ] || [ $(($interval % 3600)) = 0 ] && updates=$(pkg_updates)
 	interval=$((interval + 1))
 
-	sleep 1 && xsetroot -name "$(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)"
+	sleep 1 && xsetroot -name "$(volume) $(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)"
 done