diff --git a/.scripts/Polybar/change-brightness b/.scripts/Polybar/change-brightness index a1a9d9e..8b86283 100755 --- a/.scripts/Polybar/change-brightness +++ b/.scripts/Polybar/change-brightness @@ -7,7 +7,7 @@ BRIGHTNESS_STEPS=5 notify() { BRIGHTNESS="$(brightnessctl i | grep -oP '\(\K[^%\)]+')" - exec $HOME/.scripts/notify/notify-send.sh -r 1234 -t 700 -i $HOME/.icons/UI/brightness.png "Brightness" "$BRIGHTNESS " + exec $HOME/.scripts/notify/notify-send.sh -r 1234 -t 700 -i $HOME/.icons/sun.svg "Brightness" "$BRIGHTNESS " } case ${1} in diff --git a/.scripts/Polybar/change-volume b/.scripts/Polybar/change-volume index 7938b27..a33134b 100755 --- a/.scripts/Polybar/change-volume +++ b/.scripts/Polybar/change-volume @@ -9,16 +9,16 @@ Get_Perc="$(pactl list sinks | grep '^[[:space:]]Volume:' | \ case ${1} in up) amixer set Master 5%+ && \ - exec ${HOME}/.scripts/notify/notify-send.sh -r 123 -t 700 -i "$HOME/.icons/UI/volume-medium.png" "Volume" " $Get_Perc% " + exec ${HOME}/.scripts/notify/notify-send.sh -r 123 -t 700 -i "$HOME/.icons/vol-2.svg" "Volume" " $Get_Perc% " ;; down) amixer set Master 5%- && \ - exec ${HOME}/.scripts/notify/notify-send.sh -r 123 -t 700 -i "$HOME/.icons/UI/volume-medium.png" "Volume" " $Get_Perc% " + exec ${HOME}/.scripts/notify/notify-send.sh -r 123 -t 700 -i "$HOME/.icons/vol-2.svg" "Volume" " $Get_Perc% " ;; mute) amixer set Master toggle if pactl get-sink-mute 0 0 | grep "yes"; then - exec "$HOME/.scripts/notify/notify-send.sh" -i $HOME/.icons/UI/Music.png -r 123 -t 700 'Muted ' + exec "$HOME/.scripts/notify/notify-send.sh" -i $HOME/.icons/Vol-mute.svg -r 123 -t 700 'Muted ' elif pactl get-sink-mute 0 0 | grep "no"; then - exec "$HOME/.scripts/notify/notify-send.sh" -i $HOME/.icons/UI/Music.png -r 123 -t 700 'Alright, Unmuted' + exec "$HOME/.scripts/notify/notify-send.sh" -i $HOME/.icons/vol-2.svg -r 123 -t 700 'Alright, Unmuted' fi ;; diff --git a/.scripts/Rofi/player-menu.sh b/.scripts/Rofi/playermenu.sh similarity index 79% rename from .scripts/Rofi/player-menu.sh rename to .scripts/Rofi/playermenu.sh index 9bc4ee4..a3f0113 100755 --- a/.scripts/Rofi/player-menu.sh +++ b/.scripts/Rofi/playermenu.sh @@ -3,7 +3,7 @@ playerctl status &> /dev/null if test $? -eq 1 then - notify-send -t 700 -u normal "Player is not running" + notify-send -t 700 -u normal "Player is not running" exit fi @@ -11,7 +11,7 @@ fi status="$(playerctl status -a | grep "Playing")" -ROFI="rofi -theme .scripts/Rofi/themes/three-horizontal.rasi" +ROFI="rofi -theme .scripts/Rofi/themes/player.rasi" A='' B='' C='' diff --git a/.scripts/Rofi/powermenu.sh b/.scripts/Rofi/powermenu.sh index 7add11c..4c9a48d 100755 --- a/.scripts/Rofi/powermenu.sh +++ b/.scripts/Rofi/powermenu.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# #!/usr/bin/env bash # Determine `systemd-logind` or `(e)logind`. if [ -x "$(command -v systemctl)" ]; then @@ -9,21 +9,17 @@ else echo "failed" fi -ROFI="rofi -theme .scripts/Rofi/themes/five-horizontal.rasi" +uptime=$(uptime -p | sed 's/up //' | sed 's/\ years\?,/y/' | sed 's/\ weeks\?,/w/' | sed 's/\ days\?,/d/' | sed 's/\ hours\?,\?/h/' | sed 's/\ minutes\?/m/') +ROFI="rofi -theme ~/.scripts/Rofi/themes/power.rasi" A='' B='' C='' D='' E='' -MENU="$(printf "${A}\n${B}\n${C}\n${D}\n${E}\n" | ${ROFI} -dmenu -selected-row 0)" +MENU="$(printf "${A}\n${B}\n${C}\n${D}\n${E}\n" | ${ROFI} -dmenu -p "Up - $uptime" -selected-row 0)" case "$MENU" in - "$A") exec "${HOME}/.scripts/Rofi/promptmenu.sh" \ - --yes-command "${SEATCTL} poweroff" \ - -q ' poweroff?' - + "$A") exec "${HOME}/.scripts/Rofi/promptmenu.sh" --yes-command "${SEATCTL} poweroff" -q 'ShutDown?' ;; - "$B") exec "${HOME}/.scripts/Rofi/promptmenu.sh" \ - --yes-command "${SEATCTL} reboot" \ - --query ' reboot?' + "$B") exec "${HOME}/.scripts/Rofi/promptmenu.sh" --yes-command "${SEATCTL} reboot" -q 'Reboot?' ;; "$C") betterlockscreen -l ;; @@ -32,10 +28,8 @@ case "$MENU" in fi exec "$SEATCTL" suspend ;; - "$E") exec "${HOME}/.scripts/Rofi/promptmenu.sh" \ - --yes-command "pkill -KILL -u $(id -nu || whoami)" \ - -q ' Logout?' + "$E") exec "${HOME}/.scripts/Rofi/promptmenu.sh" --yes-command "pkill -KILL -u $(id -nu || whoami)" -q 'Logout?' ;; esac -exit ${?} +exit ${?} \ No newline at end of file diff --git a/.scripts/Rofi/promptmenu.sh b/.scripts/Rofi/promptmenu.sh index ed32086..59d2119 100755 --- a/.scripts/Rofi/promptmenu.sh +++ b/.scripts/Rofi/promptmenu.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # credits to owl4ce!!!! -ROFI='rofi -theme ~/.scripts/Rofi/themes/promptmenu.rasi' +ROFI='rofi -theme ~/.scripts/Rofi/themes/prompt.rasi' -yes_text='Yeah' no_text='Nope' query='Really???' +yes_text='' no_text='' query='Are You Sure???' if [ ${#} -eq 0 ]; then printf "Usage: \e[100m \e[32mpromptmenu\e[39;100m -y \e[0m\n" diff --git a/.scripts/Rofi/screenshot.sh b/.scripts/Rofi/screenshot.sh new file mode 100755 index 0000000..ce3f9e4 --- /dev/null +++ b/.scripts/Rofi/screenshot.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# credits to adi1090x + +dir="$HOME/.scripts/Rofi/themes" +rofi_command="rofi -theme $dir/screenshot.rasi" + +# Error msg +msg() { + notify-send -u normal "Please install 'scrot' first." +} + +# Screenshot directory +ss_dir=${HOME}/Pictures/Screenshots + +# Options +screen="" +area="" +window="" +timed="" + +# Variable passed to rofi +options="$screen\n$area\n$window\n$timed" + +chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" +case $chosen in + $screen) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot $ss_dir/Screenshot_%Y-%m-%d-%S_$wx$h.png && notify-send "Captured" i ~/.icons/monitor.svg + else + msg + fi + ;; + $area) + if [[ -f /usr/bin/scrot ]]; then + scrot -s $ss_dir/Screenshot_%Y-%m-%d-%S_$wx$h.png && notify-send "Captured" -i ~/.icons/monitor.svg + else + msg + fi + ;; + $window) + if [[ -f /usr/bin/scrot ]]; then + sleep 1; scrot -u ${ss_dir}/Screenshot_%Y-%m-%d-%S_$wx$h.png && notify-send "Captured" -i ~/.icons/monitor.svg + else + msg + fi + ;; + $timed) + if [[ -f /usr/bin/scrot ]]; then + scrot -d 3 $ss_dir/Screenshot_%Y-%m-%d-%S_$wx$h.png && notify-send "Captured" -i ~/.icons/monitor.svg + else + msg + fi + ;; +esac + diff --git a/.scripts/Rofi/themes/colors.rasi b/.scripts/Rofi/themes/colors.rasi deleted file mode 100644 index ff6c23d..0000000 --- a/.scripts/Rofi/themes/colors.rasi +++ /dev/null @@ -1,19 +0,0 @@ -/* colors */ - -/* colors */ - -* { - empty: #00000000; - base: #282C34FF; - text: #ABB2BFFF; - text-alt: #818896FF; - text-alt-2: #5C6370FF; - cyan: #56B6C2FF; - blue: #61AFEEFF; - magenta: #C678DDFF; - green: #98C379FF; - red: #E06C75FF; - darkred: #BE5046FF; - orange: #E5C07BFF; - darkorange: #D19A66FF; -} \ No newline at end of file diff --git a/.scripts/Rofi/themes/five-horizontal.rasi b/.scripts/Rofi/themes/five-horizontal.rasi deleted file mode 100755 index 2964e83..0000000 --- a/.scripts/Rofi/themes/five-horizontal.rasi +++ /dev/null @@ -1,74 +0,0 @@ -@import "colors.rasi" - -* { - /* General */ - text-font: "Hack Nerd Font 14"; - icon-font: "feather 14"; - - menu-window-padding: 6px; - menu-element-padding: 15px 15px 15px 4px; - background-color: @base; - text-color: @text; - font: @icon-font; -} - -#window { - width: 16%; - height: 70px; - anchor: north; - location: north; - x-offset: 41%; - y-offset: 5.5%; - border: 2px; - border-radius: 7px; - border-color: @cyan; - padding: @menu-window-padding; - children: [ inputbar, horibox ]; -} - -#horibox { - children: [ listview ]; -} - -#listview { - layout: horizontal; -} - -#element { - border: 0; - border-radius: 10px; - padding: @menu-element-padding; - border-color: @base; -} - -#element.selected { - background-color: @cyan; - text-color: @base; -} - -#inputbar { - enabled: false; - children: [ textbox-prompt-colon, prompt ]; -} - -element.active, -element.selected.urgent { - background-color: @red; - text-color: @base; -} - -element.selected.urgent { - background-color: @cyan; - border-color: @cyan; -} - -element.urgent, -element.selected.active { - background-color: @off; - text-color: @base; - border-color: @off; -} - -element.selected.active { - background-color: @cyan; -} diff --git a/.scripts/Rofi/themes/five-vertical.rasi b/.scripts/Rofi/themes/five-vertical.rasi deleted file mode 100755 index 331d75b..0000000 --- a/.scripts/Rofi/themes/five-vertical.rasi +++ /dev/null @@ -1,103 +0,0 @@ -@import "colors.rasi" - -* { - /* General */ - text-font: "Hack Nerd Font 14"; - icon-font: "Font Awesome 6 Free Solid 14"; - - option-6-listview-spacing: 5px; - menu-window-padding: 5px 5px; - menu-element-padding: 22px 23px 18px 4px; -} - -#window { - width: 5%; - height: 40%; - anchor: north; - location: north; - x-offset: 46.5%; - y-offset: 30%; - border: 0px; -} - -* { - background-color: @base; - text-color: @text; - font: @icon-font; -} - -#horibox { - children: [ listview ]; -} - -#listview { - layout: vertical; -} - -#element { - border: 0px; - padding: @option-element-padding; - background-color: @empty; - border-radius: 8px; -} - -#element.selected { - background-color: @cyan; - text-color: @base; -} - -* { - font: @text-font; -} - -#window { - padding: @menu-window-padding; - children: [ inputbar, horibox ]; -} - -#inputbar { - enabled: false; - children: [ textbox-prompt-colon, prompt ]; - margin: @menu-inputbar-margin; -} - -#listview { - spacing: @option-6-listview-spacing; - lines: 6; -} - -#element { - font: @icon-font; - border: @menu-element-border; - padding: @menu-element-padding; - border-color: @base; -} - -#element.selected { - border-color: @cyan; - text-color: @base; -} - -element.active, -element.selected.urgent { - background-color: @red; - text-color: @base; - border-color: @red; -} - -element.selected.urgent { - background-color: @cyan; - border-color: @cyan; -} - -element.urgent, -element.selected.active { - background-color: @off; - text-color: @base; - border-color: @off; -} - -element.selected.active { - background-color: @cyan; - border-color: @cyan; -} diff --git a/.scripts/Rofi/themes/four-horizontal.rasi b/.scripts/Rofi/themes/four-horizontal.rasi deleted file mode 100755 index 5c3cff6..0000000 --- a/.scripts/Rofi/themes/four-horizontal.rasi +++ /dev/null @@ -1,74 +0,0 @@ -@import "colors.rasi" - -* { - /* General */ - text-font: "Hack Nerd Font 14"; - icon-font: "feather 14"; - - menu-window-padding: 6px; - menu-element-padding: 15px 15px 15px 4px; - background-color: @base; - text-color: @text; - font: @icon-font; -} - -#window { - width: 13%; - height: 70px; - anchor: north; - location: north; - x-offset: 41%; - y-offset: 5.5%; - border: 2px; - border-radius: 7px; - border-color: @cyan; - padding: @menu-window-padding; - children: [ inputbar, horibox ]; -} - -#horibox { - children: [ listview ]; -} - -#listview { - layout: horizontal; -} - -#element { - border: 0; - border-radius: 10px; - padding: @menu-element-padding; - border-color: @base; -} - -#element.selected { - background-color: @cyan; - text-color: @base; -} - -#inputbar { - enabled: false; - children: [ textbox-prompt-colon, prompt ]; -} - -element.active, -element.selected.urgent { - background-color: @red; - text-color: @base; -} - -element.selected.urgent { - background-color: @cyan; - border-color: @cyan; -} - -element.urgent, -element.selected.active { - background-color: @off; - text-color: @base; - border-color: @off; -} - -element.selected.active { - background-color: @cyan; -} diff --git a/.scripts/Rofi/themes/player.rasi b/.scripts/Rofi/themes/player.rasi new file mode 100644 index 0000000..03bd104 --- /dev/null +++ b/.scripts/Rofi/themes/player.rasi @@ -0,0 +1,67 @@ +@import "colors.rasi" + +configuration { + font: "JetBrainsMono Nerd Font Mono 14"; + show-icons: false; + drun-display-format: "{name}"; + disable-history: false; + sidebar-mode: false; +} + +* { + background-color: @base; + text-color: @text; +} + +window { + transparency: "real"; + border-radius: 0px; + location: northeast; + width: 200px; + x-offset: -15px; + y-offset: 45px; +} + +mainbox { + background-color: @base; + children: [ textbox-prompt-colon, listview ]; + padding: 15px 20px; +} + +textbox-prompt-colon { + font: "JetBrainsMono Nerd Font Mono Bold 12"; + expand: false; + str: "Music"; + padding: 0 0 10px; +} + +listview { + background-color: @base; + cycle: true; + dynamic: true; + layout: horizontal; + spacing: 9px; +} + +element { + orientation: horizontal; + border-radius: 5px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 17"; + expand: true; + padding: 6px 12px 5px; +} + +element normal.active { + background-color: @base; + text-color: @text; +} + +element selected { + background-color: @cyan; + text-color: @base; +} \ No newline at end of file diff --git a/.scripts/Rofi/themes/power.rasi b/.scripts/Rofi/themes/power.rasi new file mode 100644 index 0000000..c7999a0 --- /dev/null +++ b/.scripts/Rofi/themes/power.rasi @@ -0,0 +1,83 @@ +@import "colors.rasi" + +configuration { + font: "JetBrainsMono Nerd Font Mono 14"; + show-icons: false; + drun-display-format: "{name}"; + disable-history: false; + sidebar-mode: false; +} + +* { + background-color: @base; + text-color: @text; +} + +window { + transparency: "real"; + border: 2px; + border-color: @cyan; + border-radius: 10px; + location: northeast; + width: 300px; + x-offset: -15px; + y-offset: 45px; +} + +mainbox { + background-color: @base; + children: [inputbar, listview ]; + padding: 15px 20px; +} + +inputbar { + enabled: true; + children: [textbox-prompt-colon, prompt]; + margin: 0 0 10px; +} + +textbox-prompt-colon { + font: "JetBrainsMono Nerd Font Mono Bold 12"; + expand: false; + str: "PowerMenu | "; +} + + +prompt { + padding: 2px 6px; + border-radius: 5px; + background-color: @cyan; + text-color: @base; + font: "JetBrainsMono Nerd Font Mono Bold 12"; +} + +listview { + background-color: @base; + cycle: true; + dynamic: true; + layout: horizontal; + spacing: 5px; +} + +element { + orientation: horizontal; + border-radius: 5px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 17"; + expand: true; + padding: 6px 12px 5px; +} + +element normal.active { + background-color: @base; + text-color: @text; +} + +element selected { + background-color: @cyan; + text-color: @base; +} \ No newline at end of file diff --git a/.scripts/Rofi/themes/prompt.rasi b/.scripts/Rofi/themes/prompt.rasi new file mode 100755 index 0000000..d0bc0f2 --- /dev/null +++ b/.scripts/Rofi/themes/prompt.rasi @@ -0,0 +1,83 @@ +@import "colors.rasi" + +configuration { + font: "JetBrainsMono Nerd Font Mono 10"; + show-icons: false; + drun-display-format: "{name}"; + disable-history: false; + sidebar-mode: false; +} + +* { + background-color: @base; + text-color: @text; +} + +window { + transparency: "real"; + border: 3px; + border-color: @cyan; + border-radius: 10px; + location: northeast; + width: 250px; + x-offset: -15px; + y-offset: 45px; +} + +mainbox { + background-color: @base; + children: [inputbar, listview ]; + padding: 15px 20px; +} + +inputbar { + enabled: true; + children: [textbox-prompt-colon, prompt]; + margin: 0 0 10px; +} + +textbox-prompt-colon { + font: "JetBrainsMono Nerd Font Mono Bold 12"; + expand: false; + str: "Confirm | "; +} + + +prompt { + padding: 2px 6px; + border-radius: 5px; + background-color: @cyan; + text-color: @base; + font: "JetBrainsMono Nerd Font Mono Bold 12"; +} + +listview { + background-color: @base; + cycle: true; + dynamic: true; + layout: horizontal; + spacing: 100px; +} + +element { + orientation: horizontal; + border-radius: 5px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 17"; + expand: true; + padding: 6px 14px 5px; +} + +element normal.active { + background-color: @base; + text-color: @text; +} + +element selected { + background-color: @cyan; + text-color: @base; +} \ No newline at end of file diff --git a/.scripts/Rofi/themes/promptmenu.rasi b/.scripts/Rofi/themes/promptmenu.rasi deleted file mode 100755 index 0480958..0000000 --- a/.scripts/Rofi/themes/promptmenu.rasi +++ /dev/null @@ -1,85 +0,0 @@ -@import "colors.rasi" - -* { - /* General */ - text-font: "DaddyTimeMono Nerd Font 13"; - icon-font: "feather 5"; - text-font-2: "DaddyTimeMono Nerd Font 20"; - - option-6-listview-spacing: 0px; - - // top right bottom left - menu-window-padding: 6px 6px 6px 20px; - menu-prompt-padding: 0px 20px 10px 0px; - menu-prompt-margin: 20px; - menu-element-border: 0px 10px 0px 10px; - menu-element-padding: 10px 20px 10px 4px; - - background-color: @base; - text-color: @text; - font: @icon-font; - font: @text-font; -} - -#window { - width: 15%; - height: 15%; - location: center; - border: 2px; - border-color: @cyan; - border-radius: 7px; - padding: @menu-window-padding; - children: [ inputbar, horibox ]; -} - -#horibox { - children: [ listview ]; -} - -#listview { - layout: horizontal; -} - -#element { - padding: @some-element-padding; - border-radius: 7px; - border: @menu-element-border; - padding: @menu-element-padding; -} - -#element.selected { - background-color: @cyan; - text-color: @base; -} - -#inputbar { - children: [ prompt ]; -} - -#prompt { - padding: @menu-prompt-padding; - margin: @menu-prompt-margin; - background-color: @base; - text-color: @red; - font: @text-font-2; -} - -element.active, -element.selected.urgent { - background-color: @darkred; - text-color: @base; -} - -element.selected.urgent { - background-color: @green; -} - -element.urgent, -element.selected.active { - background-color: @darkred; - text-color: @base; -} - -element.selected.active { - background-color: @green; -} diff --git a/.scripts/Rofi/themes/screenshot.rasi b/.scripts/Rofi/themes/screenshot.rasi new file mode 100755 index 0000000..e54c158 --- /dev/null +++ b/.scripts/Rofi/themes/screenshot.rasi @@ -0,0 +1,67 @@ +@import "colors.rasi" + +configuration { + font: "JetBrainsMono Nerd Font Mono 14"; + show-icons: false; + drun-display-format: "{name}"; + disable-history: false; + sidebar-mode: false; +} + +* { + background-color: @base; + text-color: @text; +} + +window { + transparency: "real"; + border-radius: 0px; + location: northeast; + width: 250px; + x-offset: -15px; + y-offset: 45px; +} + +mainbox { + background-color: @base; + children: [ textbox-prompt-colon, listview ]; + padding: 15px 20px; +} + +textbox-prompt-colon { + font: "JetBrainsMono Nerd Font Mono Bold 12"; + expand: false; + str: "ScreenShot"; + padding: 0 0 10px; +} + +listview { + background-color: @base; + cycle: true; + dynamic: true; + layout: horizontal; + spacing: 7px; +} + +element { + orientation: horizontal; + border-radius: 5px; +} + +element-text { + background-color: inherit; + text-color: inherit; + font: "feather 17"; + expand: true; + padding: 6px 12px 5px; +} + +element normal.active { + background-color: @base; + text-color: @text; +} + +element selected { + background-color: @cyan; + text-color: @base; +} \ No newline at end of file diff --git a/.scripts/Rofi/themes/three-horizontal.rasi b/.scripts/Rofi/themes/three-horizontal.rasi deleted file mode 100755 index 577b0fc..0000000 --- a/.scripts/Rofi/themes/three-horizontal.rasi +++ /dev/null @@ -1,86 +0,0 @@ -@import "colors.rasi" - -* { - /* General */ - text-font: "Hack Nerd Font 14"; - icon-font: "feather 14"; - - menu-window-padding: 6px; - menu-element-padding: 15px 15px 15px 4px; -} - -#window { - width: 10%; - height: 70px; - anchor: north; - location: north; - x-offset: 44%; - y-offset: 5.5%; - border: 2px; - border-radius: 7px; - border-color: @cyan; - children: [ inputbar, horibox ]; - padding: @menu-window-padding; -} - -* { - background-color: @base; - text-color: @text; - font: @icon-font; -} - -#horibox { - children: [ listview ]; -} - -#listview { - layout: horizontal; -} - -#element { - border: 0px; - background-color: @base; - border-radius: 10px; - padding: @menu-element-padding; - font: @icon-font; - border-color: @base; -} - -#element.selected { - background-color: @cyan; - text-color: @base; -} - -#inputbar { - enabled: false; - children: [ textbox-prompt-colon, prompt ]; -} - -#element.selected { - border-color: @cyan; - text-color: @base; -} - -element.active, -element.selected.urgent { - background-color: @on; - text-color: @base; - border-color: @on; -} - -element.selected.urgent { - background-color: @cyan; - border-color: @cyan; -} - -element.urgent, -element.selected.active { - background-color: @off; - text-color: @base; - border-color: @off; -} - -element.selected.active { - background-color: @cyan; - border-color: @cyan; -}