Fix stuff

This commit is contained in:
Marco Thomas
2022-02-03 06:35:42 +01:00
parent 1f7db961d8
commit fd31cdf2ca
13 changed files with 164 additions and 305 deletions

View File

@@ -1,10 +1,8 @@
connected=$(xrandr --query | grep "DP-3" | grep " connected" | cut -d" " -f1)
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# workaround to always show tray, when external mon is connected
if [ "$m" == "eDP-1" ] && [ "$connected" == "DP-3" ]; then
pos="none"
# only show on internal display
if [ "$m" == "eDP-1" ]; then
pos="right"
fi
MON=$m TRAYPOS=$pos polybar --reload bar &
pos=

View File

@@ -138,4 +138,5 @@ except Exception as e:
if isinstance(e, dbus.exceptions.DBusException):
print('')
else:
print(e)
# i dont want long exceptions strings in my bar
print('')

View File

@@ -2,14 +2,15 @@
dir="$HOME/.config/rofi"
rofi_command="rofi -theme $dir/powermenu.rasi"
rofi_command="rofi"
lock_command="xlock -mode maze -font variable -messagefont variable -fpsfont variable -planfont variable"
# Options
shutdown="Shutdown"
reboot="Reboot"
lock="Lock"
suspend="Suspend"
logout="Logout"
shutdown="shutdown"
reboot="reboot"
lock="lock"
suspend="suspend"
logout="logout"
# Confirmation
confirm_exit() {
@@ -26,9 +27,9 @@ msg() {
}
# Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
options="$lock\n$shutdown\n$reboot\n$suspend\n$logout"
chosen="$(echo -e "$options" | $rofi_command -p "" -dmenu -selected-row 2)"
chosen="$(echo -e "$options" | $rofi_command -p "🔌 Powermenu" -dmenu)"
case $chosen in
$shutdown)
ans=$(confirm_exit &)
@@ -51,7 +52,7 @@ case $chosen in
fi
;;
$lock)
xlock -mode maze
$lock_command
;;
$suspend)
ans=$(confirm_exit &)

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# send notification
notify-send -i /usr/share/icons/Papirus/48x48/status/state_paused.svg "Reload" "Reloading desktop..."
# dunst
systemctl restart --user dunst
# bar
killall -q polybar
@@ -14,5 +14,5 @@ feh --bg-fill $HOME/data/Seafile/images/wallpaper/wallpaper.png
# for some reason xmodmap and xset settings reset sometimes
source $HOME/.profile
# send notification
notify-send -i /usr/share/icons/Papirus/48x48/status/state_running.svg "Reload" "Reload done!"
# notification
notify-send -i /usr/share/icons/Papirus/48x48/status/state_running.svg "i3wm" "Reloaded desktop"