mirror of
https://gitlab.com/linuxstuff/dotfiles.git
synced 2026-08-15 12:59:28 +02:00
cleanup
This commit is contained in:
@@ -241,10 +241,10 @@ interval = 30
|
|||||||
format = <label>
|
format = <label>
|
||||||
label-maxlen=15
|
label-maxlen=15
|
||||||
label-ellipsis=true
|
label-ellipsis=true
|
||||||
exec = "echo $(bash ~/.config/polybar/scripts/update.sh --count-short)"
|
exec = "echo $(bash ~/.config/polybar/scripts/modules/update.sh --count-short)"
|
||||||
click-left = "setsid alacritty -e bash ~/.config/polybar/scripts/update.sh --list"
|
click-left = "setsid alacritty -e bash ~/.config/polybar/scripts/modules/update.sh --list"
|
||||||
click-right = "setsid alacritty -e bash ~/.config/polybar/scripts/update.sh --update"
|
click-right = "setsid alacritty -e bash ~/.config/polybar/scripts/modules/update.sh --update"
|
||||||
click-middle = "setsid alacritty -e bash ~/.config/polybar/scripts/update.sh --update-noconfirm"
|
click-middle = "setsid alacritty -e bash ~/.config/polybar/scripts/modules/update.sh --update-noconfirm"
|
||||||
|
|
||||||
; Module HW-Statistics
|
; Module HW-Statistics
|
||||||
|
|
||||||
@@ -381,14 +381,14 @@ type = custom/script
|
|||||||
tail = true
|
tail = true
|
||||||
format-prefix = ""
|
format-prefix = ""
|
||||||
format = <label>
|
format = <label>
|
||||||
exec = ~/.config/polybar/scripts/playerctl.sh
|
exec = ~/.config/polybar/scripts/modules/playerctl.sh
|
||||||
click-left = "playerctl play-pause"
|
click-left = "playerctl play-pause"
|
||||||
click-right = "playerctl next"
|
click-right = "playerctl next"
|
||||||
click-middle = "playerctl previous"
|
click-middle = "playerctl previous"
|
||||||
|
|
||||||
[module/playerctl_long]
|
[module/playerctl_long]
|
||||||
inherit="module/playerctl"
|
inherit="module/playerctl"
|
||||||
exec = bash ~/.config/polybar/scripts/playerctl.sh 30
|
exec = bash ~/.config/polybar/scripts/modules/playerctl.sh 30
|
||||||
|
|
||||||
[module/playerctl-buttons]
|
[module/playerctl-buttons]
|
||||||
type = custom/menu
|
type = custom/menu
|
||||||
|
|||||||
@@ -12,16 +12,20 @@
|
|||||||
# bash, xdotool, xwininfo, xev
|
# bash, xdotool, xwininfo, xev
|
||||||
#
|
#
|
||||||
|
|
||||||
# Global variables used throughout the script
|
######################
|
||||||
STATUSFILE="/home/sim/.config/polybar/scripts/.polypopup.floating_sysinfo"
|
# Preferences
|
||||||
|
|
||||||
# Set if opened popups should keep the bar shown
|
# Set if opened popups should keep the bar shown
|
||||||
POPUPS_PIN=1
|
POPUPS_PIN=1
|
||||||
|
|
||||||
|
# Statusfile Prefix
|
||||||
|
STATUSFILE="$HOME/.config/polybar/scripts/.polypopup.floating_sysinfo"
|
||||||
|
|
||||||
|
######################
|
||||||
|
|
||||||
WIN_ID=""
|
WIN_ID=""
|
||||||
WIN_NAME_MVALONG_ONE='^Polybar tray window$'
|
WIN_NAME_MOVEALONG_ONE='^Polybar tray window$'
|
||||||
WIN_ID_MVALONG_ONE=
|
WIN_ID_MOVEALONG_ONE=
|
||||||
WIN_NAME=""
|
WIN_NAME=""
|
||||||
WIN_CLASS=""
|
WIN_CLASS=""
|
||||||
WIN_INSTANCE=""
|
WIN_INSTANCE=""
|
||||||
@@ -30,7 +34,7 @@ WAIT=1
|
|||||||
WIN_WIDTH=""
|
WIN_WIDTH=""
|
||||||
WIN_HEIGHT=""
|
WIN_HEIGHT=""
|
||||||
WIN_POSX=""
|
WIN_POSX=""
|
||||||
WIN_POSX_MVALONG_ONE=""
|
WIN_POSX_MOVEALONG_ONE=""
|
||||||
WIN_POSY=""
|
WIN_POSY=""
|
||||||
|
|
||||||
SCREEN_WIDTH=""
|
SCREEN_WIDTH=""
|
||||||
@@ -278,15 +282,15 @@ argparse() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetch_window_id_mvalong() {
|
function fetch_window_id_MOVEALONG() {
|
||||||
|
|
||||||
WIN_ID_MVALONG_ONE=$(xdotool search --name "$WIN_NAME_MVALONG_ONE")
|
WIN_ID_MOVEALONG_ONE=$(xdotool search --name "$WIN_NAME_MOVEALONG_ONE")
|
||||||
echo "WIN_ID_MVALONG_ONE $WIN_NAME_MVALONG_ONE -> $WIN_ID_MVALONG_ONE"
|
echo "WIN_ID_MOVEALONG_ONE $WIN_NAME_MOVEALONG_ONE -> $WIN_ID_MOVEALONG_ONE"
|
||||||
|
|
||||||
}
|
}
|
||||||
function fetch_window_id() {
|
function fetch_window_id() {
|
||||||
|
|
||||||
fetch_window_id_mvalong
|
fetch_window_id_MOVEALONG
|
||||||
|
|
||||||
# Sets the values for the following global
|
# Sets the values for the following global
|
||||||
# WIN_ID
|
# WIN_ID
|
||||||
@@ -392,8 +396,8 @@ function fetch_window_dimensions() {
|
|||||||
sed -rn 's/.*Absolute upper-left Y: +(-?[0-9]+)/\1/p')
|
sed -rn 's/.*Absolute upper-left Y: +(-?[0-9]+)/\1/p')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local win_info_mvalong=$(xwininfo -id $WIN_ID_MVALONG_ONE)
|
local win_info_MOVEALONG=$(xwininfo -id $WIN_ID_MOVEALONG_ONE)
|
||||||
WIN_POSX_MVALONG_ONE=$(echo "$win_info_mvalong" | \
|
WIN_POSX_MOVEALONG_ONE=$(echo "$win_info_MOVEALONG" | \
|
||||||
sed -rn 's/.*Absolute upper-left X: +(-?[0-9]+)/\1/p')
|
sed -rn 's/.*Absolute upper-left X: +(-?[0-9]+)/\1/p')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,9 +429,9 @@ function winmove() {
|
|||||||
2>/dev/null 1>&2 xdotool windowmove $WIN_ID $1 $2
|
2>/dev/null 1>&2 xdotool windowmove $WIN_ID $1 $2
|
||||||
|
|
||||||
# Tray
|
# Tray
|
||||||
#echo "WIN_ID_MVALONG_ONE $WIN_ID_MVALONG_ONE"
|
#echo "WIN_ID_MOVEALONG_ONE $WIN_ID_MOVEALONG_ONE"
|
||||||
#xdotool windowmove $WIN_ID_MVALONG_ONE $1 $2
|
#xdotool windowmove $WIN_ID_MOVEALONG_ONE $1 $2
|
||||||
2>/dev/null 1>&2 xdotool windowmove $WIN_ID_MVALONG_ONE $WIN_POSX_MVALONG_ONE $(($2 + 4))
|
2>/dev/null 1>&2 xdotool windowmove $WIN_ID_MOVEALONG_ONE $WIN_POSX_MOVEALONG_ONE $(($2 + 4))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
###########
|
###########
|
||||||
## Defaults
|
## Settings
|
||||||
#
|
#
|
||||||
# Name of the bar in polybar (e.g. [bar/BARNAME]) which should be used as popup
|
# Name of the bar in polybar (e.g. [bar/BARNAME]) which should be used as popup
|
||||||
POPUP_NAME="floating_sysinfo"
|
POPUP_NAME="floating_sysinfo"
|
||||||
@@ -80,7 +80,6 @@ if [ "$1" == "--show" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" == "--remove-locks" ]; then
|
if [ "$1" == "--remove-locks" ]; then
|
||||||
removeLocks
|
removeLocks
|
||||||
exit
|
exit
|
||||||
|
|||||||
Reference in New Issue
Block a user