1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-20 08:37:49 +02:00

Compare commits

..

No commits in common. "fc52081c3096348311f45387ff6054d7dc75b6eb" and "7f43eca77c2189fc54e302c65717e92b0530c1a2" have entirely different histories.

7 changed files with 12 additions and 62 deletions

View File

@ -10,7 +10,6 @@
padding = 10
horizontal_padding = 10
frame_width = 2
corner_radius = 0
frame_color = "#555555"
separator_color = "#555555"
@ -67,18 +66,10 @@
frame_color = "#8c3d45"
timeout = 0
[sound_normal]
[normal_urgency_sound]
msg_urgency = "normal"
script = ~/.config/dunst/alert_normal.sh
[sound_critical]
[critical_urgency_sound]
msg_urgency = "critical"
script = ~/.config/dunst/alert_high.sh
[dnd_normal]
msg_urgency = "normal"
skip_display = true
[dnd_low]
msg_urgency = "low"
skip_display = true

View File

@ -2,9 +2,7 @@
xset r rate 300 50 & # Speed xrate up
unclutter & # Remove mouse when idle
dunst & # dunst for notifications
dunstctl rule dnd_low disable & # disable dnd for low urgencies
dunstctl rule dnd_normal disable & # disable dnd for normal urgencies
dunst & # dunst for notifications
redshift & # redshift for saving your eyes
$STATUSBAR & # for refreshing the statusbar
xcompmgr & # compositor for transparency

View File

@ -1,9 +1,11 @@
#!/bin/sh
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
notify-send -u low 'Audio' 'Sound active\nMicrophone muted'
paplay ~/.local/bin/tools/audio/mic_muted.wav
amixer set Master unmute >/dev/null 2>&1
amixer set Capture nocap >/dev/null 2>&1
else
notify-send -u low 'Audio' 'Sound active\nMicrophone active'
amixer set Master unmute >/dev/null 2>&1
amixer set Capture cap >/dev/null 2>&1
paplay ~/.local/bin/tools/audio/mic_activated.wav

View File

@ -1,9 +1,11 @@
#!/bin/sh
if amixer get Master | tail -2 | grep -q '\[on\]'; then
notify-send -u low 'sxhkd' 'Sound muted\nMicrophone muted'
paplay ~/.local/bin/tools/audio/sound_muted.wav
amixer set Master mute >/dev/null 2>&1
amixer set Capture nocap >/dev/null 2>&1
else
notify-send -u low 'sxhkd' 'Sound active\nMicrophone muted'
amixer set Capture nocap >/dev/null 2>&1
amixer set Master unmute >/dev/null 2>&1
paplay ~/.local/bin/tools/audio/sound_resumed.wav

View File

@ -1,7 +0,0 @@
#!/bin/sh
notify-send -u low "dunst" "Do not disturb started"
dunstctl history-clear
dunstctl rule dnd_low enable
dunstctl rule dnd_normal enable
dunstctl rule sound_normal disable

View File

@ -1,10 +0,0 @@
#!/bin/sh
dunstctl rule dnd_low disable
dunstctl rule dnd_normal disable
dunstctl rule sound_normal enable
hist_size=$(dunstctl history | jq '.data[0] | length')
for i in `seq $hist_size`; do
dunstctl history-pop
done
notify-send -u low "dunst" "Do not disturb stopped"

View File

@ -1,35 +1,9 @@
#!/bin/sh
#!/usr/bin/env sh
acpi=$(acpi -b)
capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
status=$(cat /sys/class/power_supply/"$1"/status)
if [ "$acpi" = "" ]; then
echo ""
return
fi
total=$(echo $acpi | sed 's/.*:\ //')
status="$(echo $total | cut -d',' -f1)"
capacity="$(echo $total | cut -d',' -f2 | sed 's/%//')"
if [ "$status" = "Discharging" ] && [ $capacity -le 15 ] ; then
notify-send -u critical "Battery" "Below 15%"
fi
case "$status" in
"Discharging")
icon="^b#282828^^c#dfdfdf^  ^d^";;
"Not charging")
icon="^b#282828^^c#dfdfdf^  ^d^";;
"Charging")
icon="^b#282828^^c#dfdfdf^  ^d^";;
"Unknown")
icon="^b#282828^^c#dfdfdf^  ^d^";;
"Full")
icon="^b#282828^^c#dfdfdf^ ⚡ ^d^";;
esac
capacity=$(echo "$capacity" | sed -e 's/$//')
icon=$(echo "$status" | sed -e "s/,//;s/Discharging/^b#282828^^c#dfdfdf^  ^d^/;s/Not charging/^b#282828^^c#dfdfdf^  ^d^/;s/Charging/^b#282828^^c#dfdfdf^  ^d^/;s/Unknown/^b#282828^^c#dfdfdf^  ^d^/;s/Full/^b#282828^^c#dfdfdf^ ⚡ ^d^/;s/ 0*/ /g;s/ :/ /g")
capacity=$(echo "$capacity" | sed -e 's/$//' )
capacity=$(printf %3s $capacity | tr ' ' ' ')
echo "$icon $capacity%"