fix: concat audio and brightness, add notifications
This commit is contained in:
parent
63c6e4214e
commit
64fe6f4e84
14 changed files with 185 additions and 71 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
bat=/sys/class/power_supply/BAT0/
|
||||
per="$(cat "$bat/capacity")"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/sh
|
||||
#! /bin/bash
|
||||
|
||||
internal() {
|
||||
SPEAKER=$(pactl list sinks | grep "Name" | grep "alsa" | awk -F ': ' '{ print $2 }')
|
||||
|
|
|
|||
12
eww/scripts/change-brightness
Executable file
12
eww/scripts/change-brightness
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
set_brightness() {
|
||||
brightnessctl set "$1"
|
||||
CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}')
|
||||
dunstify -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ${CURRENT}%"
|
||||
}
|
||||
|
||||
if [ "$1" == "brightness" ]; then
|
||||
set_brightness "$2"
|
||||
fi
|
||||
|
||||
20
eww/scripts/change-volume
Executable file
20
eww/scripts/change-volume
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#! /bin/bash
|
||||
|
||||
set_volume_sink() {
|
||||
pactl set-sink-volume @DEFAULT_SINK@ "$1"
|
||||
CURRENT=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||
dunstify -a "changeVolume" -r 2 -u low -i audio-volume-high -h int:value:"$CURRENT" "Output Volume: ${CURRENT}%"
|
||||
}
|
||||
|
||||
set_volume_source() {
|
||||
pactl set-source-volume @DEFAULT_SOURCE@ "$1"
|
||||
CURRENT=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||
dunstify -a "changeMicVolume" -r 2 -u low -i audio-volume-high -h int:value:"$CURRENT" "Input Volume: ${CURRENT}%"
|
||||
}
|
||||
|
||||
|
||||
if [ "$1" == "sink" ]; then
|
||||
set_volume_sink "$2"
|
||||
elif [ "$1" == "source" ]; then
|
||||
set_volume_source "$2"
|
||||
fi
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
currentName() {
|
||||
win=$(hyprctl activewindow | grep class | awk -F ':' '{print $2}' | tr -d ' ')
|
||||
echo "(box :class \"module_app_text\" :space-evenly \"false\" :orientation \"h\" :spacing \"3\" (label :text \"$win\"))"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
total="$(free -m | grep Mem: | awk '{ print $2 }')"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# scripts by adi1090x
|
||||
|
||||
## Get data
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
calendar() {
|
||||
|
|
@ -11,7 +11,7 @@ run() {
|
|||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system music_win audio_ctl
|
||||
${EWW_BIN} -c $HOME/.config/eww close system music_win audio_ctl brightness
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
|
|
@ -31,7 +31,7 @@ run() {
|
|||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close calendar music_win audio_ctl
|
||||
${EWW_BIN} -c $HOME/.config/eww close calendar music_win audio_ctl brightness
|
||||
touch "$LOCK_FILE_MEM"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
|
|
@ -51,7 +51,7 @@ run() {
|
|||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar brightness
|
||||
touch "$LOCK_FILE_SONG"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
|
|
@ -72,7 +72,7 @@ run() {
|
|||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar music
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar music brightness
|
||||
touch "$LOCK_FILE_AUDIO"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
|
|
@ -81,6 +81,25 @@ else
|
|||
fi
|
||||
}
|
||||
|
||||
brightness() {
|
||||
LOCK_FILE_AUDIO="$HOME/.cache/eww-brightness.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww open brightness_window
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar music audio_ctl
|
||||
touch "$LOCK_FILE_AUDIO"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww close brightness_window
|
||||
rm "$LOCK_FILE_AUDIO" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
hoverGet() {
|
||||
NAME="$1"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
|
|
@ -106,6 +125,8 @@ elif [ "$1" = "system" ]; then
|
|||
#music
|
||||
elif [ "$1" = "audio" ]; then
|
||||
audio
|
||||
elif [ "$1" = "brightness" ]; then
|
||||
brightness
|
||||
elif [ "$1" = "hoverGet" ]; then
|
||||
hoverGet "$2"
|
||||
elif [ "$1" = "hoverCreate" ]; then
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
status=$(nmcli g | grep -oE "disconnected")
|
||||
essid=$(nmcli c | grep wlp2s0 | awk '{print ($1)}')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
workspaces() {
|
||||
|
||||
ws1="ID 1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue