diff --git a/.config/deadd/deadd.css b/.config/deadd/deadd.css index ce5c161..8b1aa3b 100644 --- a/.config/deadd/deadd.css +++ b/.config/deadd/deadd.css @@ -1,6 +1,6 @@ .blurredBG, #main_window, .blurredBG.low, .blurredBG.normal { - background: rgba(40, 42, 54, 0.8); - border: 2pt #50fa7b solid; + background: rgba(40, 42, 54, 1.0); + border: 2px #50fa7b solid; border-radius: 10px; } @@ -22,19 +22,19 @@ } .blurredBG.notification { - background: rgba(40, 42, 54, 0.8); + background: rgba(40, 42, 54, 1.0); border: 2pt #50fa7b solid; border-radius: 10px; } .blurredBG.notification.critical { - background: rgba(255, 85, 85, 0.8); + background: rgba(255, 85, 85, 1.0); border: 2pt #50fa7b solid; border-radius: 10px; } .notificationInCenter.critical { - background: rgba(255, 85, 85, 0.8); + background: rgba(255, 85, 85, 1.0); } label { @@ -80,7 +80,7 @@ button:hover { .userbutton:hover { border-radius: 10px; - background: rgba(68, 71, 90, 0.8); + background: rgba(68, 71, 90, 1.0); border-width: 2px; border-top: transparent; border-color: #50fa7b; diff --git a/.config/dwm-flexipatch b/.config/dwm-flexipatch index 57c2add..b91974c 160000 --- a/.config/dwm-flexipatch +++ b/.config/dwm-flexipatch @@ -1 +1 @@ -Subproject commit 57c2add016fb9db5b40ca4844614bc8d80f08e9a +Subproject commit b91974c9e600498661b7dd6b2a2e94c470cbe552 diff --git a/.config/rofi/themes/centertab-dracula.rasi b/.config/rofi/themes/centertab-dracula.rasi index 181af77..0bddb9b 100644 --- a/.config/rofi/themes/centertab-dracula.rasi +++ b/.config/rofi/themes/centertab-dracula.rasi @@ -39,14 +39,18 @@ } window { - location: center; - anchor: center; - height: 50%; - width: 50%; + location: south west; + anchor: south west; + height: 1035; + width: 700; + x-offset: 10; + y-offset: -10; orientation: horizontal; children: [mainbox]; border: 2; border-color: @winbg; + border-radius: 10; + transparency: "real"; } mainbox { diff --git a/.scripts/brightness.sh b/.scripts/brightness.sh new file mode 100755 index 0000000..f555d50 --- /dev/null +++ b/.scripts/brightness.sh @@ -0,0 +1,52 @@ +#!/bin/bash +help_menu() { + echo "Script to interact with pactl. Use only one argument at a time." + # echo " - Play / Pause: playerctl.sh --play-pause" + # echo " - Next: playerctl.sh --next" + # echo " - Previous: playerctl.sh --prev" + # echo " - Change Player: playerctl.sh --change" + # echo " - Rofi Menu: playerctl.sh --rofi" + # echo " - Help: playerctl.sh --help OR playerctl.sh -h" +} + +rofi_menu() { + declare -a options=( + " Raise Brightness - raise" + " Lower Brightness - lower" + " Back - back" + " Quit - quit" + ) + + choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i) + option=$(printf '%s\n' "${choice}" | awk '{print $NF}') + + if [[ "$option" == "quit" ]]; then + kilall rofi + elif [[ "$option" != "back" ]]; then + main "--$option" && main "--rofi" + fi +} + +main() { + if [ $# -eq 0 ]; then + # No arguments + help_menu + else + case $1 in + --help | -h) + help_menu + ;; + --raise) + xdotool key XF86MonBrightnessUp + ;; + --lower) + xdotool key XF86MonBrightnessDown + ;; + --rofi) + rofi_menu + ;; + esac + fi +} + +main $@ diff --git a/.scripts/control-center.sh b/.scripts/control-center.sh index 465ebe9..e833768 100755 --- a/.scripts/control-center.sh +++ b/.scripts/control-center.sh @@ -12,6 +12,7 @@ help_menu() { rofi_menu() { declare -a options=( " Compositor - picom" + " Display - brightness" " Notifications - deadd" " Media - playerctl" "墳Volume - pactl" @@ -44,6 +45,9 @@ main() { --picom) /home/sravan/.scripts/picom.sh --rofi ;; + --brightness) + /home/sravan/.scripts/brightness.sh --rofi + ;; --deadd) /home/sravan/.scripts/deadd.sh --rofi ;; diff --git a/.scripts/startup.sh b/.scripts/startup.sh index b443c55..62f4b2e 100755 --- a/.scripts/startup.sh +++ b/.scripts/startup.sh @@ -31,6 +31,7 @@ declare -a delay_array=(\ "/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager "/usr/bin/volctl" \ # PulseAudio Volume Control "/usr/bin/nyrna" \ # Nyrna + "/usr/bin/openrgb" \ # OpenRGB # System Restore Processes "/usr/bin/autorandr --change --force" \ # Auto restore screen layout "/usr/bin/numlockx on" \ # Enable numlock @@ -46,6 +47,7 @@ declare -a kill_delay_array=(\ "killall xfce4-power-manager" \ # XFCE4 Power Manager "killall volctl" \ # PulseAudio Volume Control "killall nyrna" \ # Nyrna + "killall openrgb" \ # OpenRGB ) help_menu() { diff --git a/README.org b/README.org index 423bb4e..68f3797 100644 --- a/README.org +++ b/README.org @@ -79,6 +79,7 @@ - [[#miscellaneous-scripts][Miscellaneous Scripts]] - [[#media-control][Media Control]] - [[#volume-control][Volume Control]] + - [[#brightness-control][Brightness Control]] - [[#trackpad-control][Trackpad Control]] - [[#cpu--gpu-control][CPU & GPU Control]] - [[#session-control][Session Control]] @@ -1063,8 +1064,8 @@ commands = "/home/sravan/.scripts/deadd.sh --pause":"/home/sravan/.scripts/deadd #+BEGIN_SRC conf :tangle .config/deadd/deadd.css .blurredBG, #main_window, .blurredBG.low, .blurredBG.normal { - background: rgba(40, 42, 54, 0.8); - border: 2pt #50fa7b solid; + background: rgba(40, 42, 54, 1.0); + border: 2px #50fa7b solid; border-radius: 10px; } @@ -1090,19 +1091,19 @@ commands = "/home/sravan/.scripts/deadd.sh --pause":"/home/sravan/.scripts/deadd } .blurredBG.notification { - background: rgba(40, 42, 54, 0.8); + background: rgba(40, 42, 54, 1.0); border: 2pt #50fa7b solid; border-radius: 10px; } .blurredBG.notification.critical { - background: rgba(255, 85, 85, 0.8); + background: rgba(255, 85, 85, 1.0); border: 2pt #50fa7b solid; border-radius: 10px; } .notificationInCenter.critical { - background: rgba(255, 85, 85, 0.8); + background: rgba(255, 85, 85, 1.0); } #+END_SRC @@ -1160,7 +1161,7 @@ button:hover { .userbutton:hover { border-radius: 10px; - background: rgba(68, 71, 90, 0.8); + background: rgba(68, 71, 90, 1.0); border-width: 2px; border-top: transparent; border-color: #50fa7b; @@ -1523,14 +1524,18 @@ configuration { } window { - location: center; - anchor: center; - height: 50%; - width: 50%; + location: south west; + anchor: south west; + height: 1035; + width: 700; + x-offset: 10; + y-offset: -10; orientation: horizontal; children: [mainbox]; border: 2; border-color: @winbg; + border-radius: 10; + transparency: "real"; } mainbox { @@ -7460,6 +7465,62 @@ main() { main $@ #+END_SRC +** Brightness Control + +#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/brightness.sh +help_menu() { + echo "Script to interact with pactl. Use only one argument at a time." + # echo " - Play / Pause: playerctl.sh --play-pause" + # echo " - Next: playerctl.sh --next" + # echo " - Previous: playerctl.sh --prev" + # echo " - Change Player: playerctl.sh --change" + # echo " - Rofi Menu: playerctl.sh --rofi" + # echo " - Help: playerctl.sh --help OR playerctl.sh -h" +} + +rofi_menu() { + declare -a options=( + " Raise Brightness - raise" + " Lower Brightness - lower" + " Back - back" + " Quit - quit" + ) + + choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i) + option=$(printf '%s\n' "${choice}" | awk '{print $NF}') + + if [[ "$option" == "quit" ]]; then + kilall rofi + elif [[ "$option" != "back" ]]; then + main "--$option" && main "--rofi" + fi +} + +main() { + if [ $# -eq 0 ]; then + # No arguments + help_menu + else + case $1 in + --help | -h) + help_menu + ;; + --raise) + xdotool key XF86MonBrightnessUp + ;; + --lower) + xdotool key XF86MonBrightnessDown + ;; + --rofi) + rofi_menu + ;; + esac + fi +} + +main $@ +#+END_SRC + ** Trackpad Control #+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/trackpad.sh @@ -7770,6 +7831,7 @@ declare -a delay_array=(\ "/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager "/usr/bin/volctl" \ # PulseAudio Volume Control "/usr/bin/nyrna" \ # Nyrna + "/usr/bin/openrgb" \ # OpenRGB # System Restore Processes "/usr/bin/autorandr --change --force" \ # Auto restore screen layout "/usr/bin/numlockx on" \ # Enable numlock @@ -7785,6 +7847,7 @@ declare -a kill_delay_array=(\ "killall xfce4-power-manager" \ # XFCE4 Power Manager "killall volctl" \ # PulseAudio Volume Control "killall nyrna" \ # Nyrna + "killall openrgb" \ # OpenRGB ) help_menu() { @@ -7919,6 +7982,7 @@ help_menu() { rofi_menu() { declare -a options=( " Compositor - picom" + " Display - brightness" " Notifications - deadd" " Media - playerctl" "墳Volume - pactl" @@ -7951,6 +8015,9 @@ main() { --picom) /home/sravan/.scripts/picom.sh --rofi ;; + --brightness) + /home/sravan/.scripts/brightness.sh --rofi + ;; --deadd) /home/sravan/.scripts/deadd.sh --rofi ;;