Brightness Control, Rofi on Left, Remove Transparency, OpenRGB on Startup

- Add brightness control script for built-in display
- Add brightness control script to control center
- Add dwm keybinding for brightness control script
- Change deadd pop-up and center background to solid (no transparency)
- Change rofi "centertab-dracula" theme to appear on left
  (mirrored version of notification center)
- Add openrgb to delayed startup list
This commit is contained in:
Sravan Balaji
2022-01-11 11:46:39 -05:00
parent c0bab6cde6
commit 6f6f97befd
7 changed files with 150 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
.blurredBG, #main_window, .blurredBG.low, .blurredBG.normal { .blurredBG, #main_window, .blurredBG.low, .blurredBG.normal {
background: rgba(40, 42, 54, 0.8); background: rgba(40, 42, 54, 1.0);
border: 2pt #50fa7b solid; border: 2px #50fa7b solid;
border-radius: 10px; border-radius: 10px;
} }
@@ -22,19 +22,19 @@
} }
.blurredBG.notification { .blurredBG.notification {
background: rgba(40, 42, 54, 0.8); background: rgba(40, 42, 54, 1.0);
border: 2pt #50fa7b solid; border: 2pt #50fa7b solid;
border-radius: 10px; border-radius: 10px;
} }
.blurredBG.notification.critical { .blurredBG.notification.critical {
background: rgba(255, 85, 85, 0.8); background: rgba(255, 85, 85, 1.0);
border: 2pt #50fa7b solid; border: 2pt #50fa7b solid;
border-radius: 10px; border-radius: 10px;
} }
.notificationInCenter.critical { .notificationInCenter.critical {
background: rgba(255, 85, 85, 0.8); background: rgba(255, 85, 85, 1.0);
} }
label { label {
@@ -80,7 +80,7 @@ button:hover {
.userbutton:hover { .userbutton:hover {
border-radius: 10px; border-radius: 10px;
background: rgba(68, 71, 90, 0.8); background: rgba(68, 71, 90, 1.0);
border-width: 2px; border-width: 2px;
border-top: transparent; border-top: transparent;
border-color: #50fa7b; border-color: #50fa7b;

View File

@@ -39,14 +39,18 @@
} }
window { window {
location: center; location: south west;
anchor: center; anchor: south west;
height: 50%; height: 1035;
width: 50%; width: 700;
x-offset: 10;
y-offset: -10;
orientation: horizontal; orientation: horizontal;
children: [mainbox]; children: [mainbox];
border: 2; border: 2;
border-color: @winbg; border-color: @winbg;
border-radius: 10;
transparency: "real";
} }
mainbox { mainbox {

52
.scripts/brightness.sh Executable file
View File

@@ -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 $@

View File

@@ -12,6 +12,7 @@ help_menu() {
rofi_menu() { rofi_menu() {
declare -a options=( declare -a options=(
" Compositor - picom" " Compositor - picom"
" Display - brightness"
" Notifications - deadd" " Notifications - deadd"
" Media - playerctl" " Media - playerctl"
"墳Volume - pactl" "墳Volume - pactl"
@@ -44,6 +45,9 @@ main() {
--picom) --picom)
/home/sravan/.scripts/picom.sh --rofi /home/sravan/.scripts/picom.sh --rofi
;; ;;
--brightness)
/home/sravan/.scripts/brightness.sh --rofi
;;
--deadd) --deadd)
/home/sravan/.scripts/deadd.sh --rofi /home/sravan/.scripts/deadd.sh --rofi
;; ;;

View File

@@ -31,6 +31,7 @@ declare -a delay_array=(\
"/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager "/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager
"/usr/bin/volctl" \ # PulseAudio Volume Control "/usr/bin/volctl" \ # PulseAudio Volume Control
"/usr/bin/nyrna" \ # Nyrna "/usr/bin/nyrna" \ # Nyrna
"/usr/bin/openrgb" \ # OpenRGB
# System Restore Processes # System Restore Processes
"/usr/bin/autorandr --change --force" \ # Auto restore screen layout "/usr/bin/autorandr --change --force" \ # Auto restore screen layout
"/usr/bin/numlockx on" \ # Enable numlock "/usr/bin/numlockx on" \ # Enable numlock
@@ -46,6 +47,7 @@ declare -a kill_delay_array=(\
"killall xfce4-power-manager" \ # XFCE4 Power Manager "killall xfce4-power-manager" \ # XFCE4 Power Manager
"killall volctl" \ # PulseAudio Volume Control "killall volctl" \ # PulseAudio Volume Control
"killall nyrna" \ # Nyrna "killall nyrna" \ # Nyrna
"killall openrgb" \ # OpenRGB
) )
help_menu() { help_menu() {

View File

@@ -79,6 +79,7 @@
- [[#miscellaneous-scripts][Miscellaneous Scripts]] - [[#miscellaneous-scripts][Miscellaneous Scripts]]
- [[#media-control][Media Control]] - [[#media-control][Media Control]]
- [[#volume-control][Volume Control]] - [[#volume-control][Volume Control]]
- [[#brightness-control][Brightness Control]]
- [[#trackpad-control][Trackpad Control]] - [[#trackpad-control][Trackpad Control]]
- [[#cpu--gpu-control][CPU & GPU Control]] - [[#cpu--gpu-control][CPU & GPU Control]]
- [[#session-control][Session 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 #+BEGIN_SRC conf :tangle .config/deadd/deadd.css
.blurredBG, #main_window, .blurredBG.low, .blurredBG.normal { .blurredBG, #main_window, .blurredBG.low, .blurredBG.normal {
background: rgba(40, 42, 54, 0.8); background: rgba(40, 42, 54, 1.0);
border: 2pt #50fa7b solid; border: 2px #50fa7b solid;
border-radius: 10px; border-radius: 10px;
} }
@@ -1090,19 +1091,19 @@ commands = "/home/sravan/.scripts/deadd.sh --pause":"/home/sravan/.scripts/deadd
} }
.blurredBG.notification { .blurredBG.notification {
background: rgba(40, 42, 54, 0.8); background: rgba(40, 42, 54, 1.0);
border: 2pt #50fa7b solid; border: 2pt #50fa7b solid;
border-radius: 10px; border-radius: 10px;
} }
.blurredBG.notification.critical { .blurredBG.notification.critical {
background: rgba(255, 85, 85, 0.8); background: rgba(255, 85, 85, 1.0);
border: 2pt #50fa7b solid; border: 2pt #50fa7b solid;
border-radius: 10px; border-radius: 10px;
} }
.notificationInCenter.critical { .notificationInCenter.critical {
background: rgba(255, 85, 85, 0.8); background: rgba(255, 85, 85, 1.0);
} }
#+END_SRC #+END_SRC
@@ -1160,7 +1161,7 @@ button:hover {
.userbutton:hover { .userbutton:hover {
border-radius: 10px; border-radius: 10px;
background: rgba(68, 71, 90, 0.8); background: rgba(68, 71, 90, 1.0);
border-width: 2px; border-width: 2px;
border-top: transparent; border-top: transparent;
border-color: #50fa7b; border-color: #50fa7b;
@@ -1523,14 +1524,18 @@ configuration {
} }
window { window {
location: center; location: south west;
anchor: center; anchor: south west;
height: 50%; height: 1035;
width: 50%; width: 700;
x-offset: 10;
y-offset: -10;
orientation: horizontal; orientation: horizontal;
children: [mainbox]; children: [mainbox];
border: 2; border: 2;
border-color: @winbg; border-color: @winbg;
border-radius: 10;
transparency: "real";
} }
mainbox { mainbox {
@@ -7460,6 +7465,62 @@ main() {
main $@ main $@
#+END_SRC #+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 ** Trackpad Control
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/trackpad.sh #+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/xfce4-power-manager" \ # XFCE4 Power Manager
"/usr/bin/volctl" \ # PulseAudio Volume Control "/usr/bin/volctl" \ # PulseAudio Volume Control
"/usr/bin/nyrna" \ # Nyrna "/usr/bin/nyrna" \ # Nyrna
"/usr/bin/openrgb" \ # OpenRGB
# System Restore Processes # System Restore Processes
"/usr/bin/autorandr --change --force" \ # Auto restore screen layout "/usr/bin/autorandr --change --force" \ # Auto restore screen layout
"/usr/bin/numlockx on" \ # Enable numlock "/usr/bin/numlockx on" \ # Enable numlock
@@ -7785,6 +7847,7 @@ declare -a kill_delay_array=(\
"killall xfce4-power-manager" \ # XFCE4 Power Manager "killall xfce4-power-manager" \ # XFCE4 Power Manager
"killall volctl" \ # PulseAudio Volume Control "killall volctl" \ # PulseAudio Volume Control
"killall nyrna" \ # Nyrna "killall nyrna" \ # Nyrna
"killall openrgb" \ # OpenRGB
) )
help_menu() { help_menu() {
@@ -7919,6 +7982,7 @@ help_menu() {
rofi_menu() { rofi_menu() {
declare -a options=( declare -a options=(
" Compositor - picom" " Compositor - picom"
" Display - brightness"
" Notifications - deadd" " Notifications - deadd"
" Media - playerctl" " Media - playerctl"
"墳Volume - pactl" "墳Volume - pactl"
@@ -7951,6 +8015,9 @@ main() {
--picom) --picom)
/home/sravan/.scripts/picom.sh --rofi /home/sravan/.scripts/picom.sh --rofi
;; ;;
--brightness)
/home/sravan/.scripts/brightness.sh --rofi
;;
--deadd) --deadd)
/home/sravan/.scripts/deadd.sh --rofi /home/sravan/.scripts/deadd.sh --rofi
;; ;;