1
0
mirror of https://gitlab.com/linuxstuff/dotfiles.git synced 2026-06-19 04:06:00 +02:00
This commit is contained in:
Simon
2020-12-30 18:54:45 +01:00
parent 09f816c294
commit c13b9178f9
5 changed files with 25 additions and 22 deletions
+6 -6
View File
@@ -241,10 +241,10 @@ interval = 30
format = 󰂪 <label>
label-maxlen=15
label-ellipsis=true
exec = "echo $(bash ~/.config/polybar/scripts/update.sh --count-short)"
click-left = "setsid alacritty -e bash ~/.config/polybar/scripts/update.sh --list"
click-right = "setsid alacritty -e bash ~/.config/polybar/scripts/update.sh --update"
click-middle = "setsid alacritty -e bash ~/.config/polybar/scripts/update.sh --update-noconfirm"
exec = "echo $(bash ~/.config/polybar/scripts/modules/update.sh --count-short)"
click-left = "setsid alacritty -e bash ~/.config/polybar/scripts/modules/update.sh --list"
click-right = "setsid alacritty -e bash ~/.config/polybar/scripts/modules/update.sh --update"
click-middle = "setsid alacritty -e bash ~/.config/polybar/scripts/modules/update.sh --update-noconfirm"
; Module HW-Statistics
@@ -381,14 +381,14 @@ type = custom/script
tail = true
format-prefix = ""
format = <label>
exec = ~/.config/polybar/scripts/playerctl.sh
exec = ~/.config/polybar/scripts/modules/playerctl.sh
click-left = "playerctl play-pause"
click-right = "playerctl next"
click-middle = "playerctl previous"
[module/playerctl_long]
inherit="module/playerctl"
exec = bash ~/.config/polybar/scripts/playerctl.sh 30
exec = bash ~/.config/polybar/scripts/modules/playerctl.sh 30
[module/playerctl-buttons]
type = custom/menu
+18 -14
View File
@@ -12,16 +12,20 @@
# 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
POPUPS_PIN=1
# Statusfile Prefix
STATUSFILE="$HOME/.config/polybar/scripts/.polypopup.floating_sysinfo"
######################
WIN_ID=""
WIN_NAME_MVALONG_ONE='^Polybar tray window$'
WIN_ID_MVALONG_ONE=
WIN_NAME_MOVEALONG_ONE='^Polybar tray window$'
WIN_ID_MOVEALONG_ONE=
WIN_NAME=""
WIN_CLASS=""
WIN_INSTANCE=""
@@ -30,7 +34,7 @@ WAIT=1
WIN_WIDTH=""
WIN_HEIGHT=""
WIN_POSX=""
WIN_POSX_MVALONG_ONE=""
WIN_POSX_MOVEALONG_ONE=""
WIN_POSY=""
SCREEN_WIDTH=""
@@ -278,15 +282,15 @@ argparse() {
fi
}
function fetch_window_id_mvalong() {
function fetch_window_id_MOVEALONG() {
WIN_ID_MVALONG_ONE=$(xdotool search --name "$WIN_NAME_MVALONG_ONE")
echo "WIN_ID_MVALONG_ONE $WIN_NAME_MVALONG_ONE -> $WIN_ID_MVALONG_ONE"
WIN_ID_MOVEALONG_ONE=$(xdotool search --name "$WIN_NAME_MOVEALONG_ONE")
echo "WIN_ID_MOVEALONG_ONE $WIN_NAME_MOVEALONG_ONE -> $WIN_ID_MOVEALONG_ONE"
}
function fetch_window_id() {
fetch_window_id_mvalong
fetch_window_id_MOVEALONG
# Sets the values for the following global
# WIN_ID
@@ -392,8 +396,8 @@ function fetch_window_dimensions() {
sed -rn 's/.*Absolute upper-left Y: +(-?[0-9]+)/\1/p')
fi
local win_info_mvalong=$(xwininfo -id $WIN_ID_MVALONG_ONE)
WIN_POSX_MVALONG_ONE=$(echo "$win_info_mvalong" | \
local win_info_MOVEALONG=$(xwininfo -id $WIN_ID_MOVEALONG_ONE)
WIN_POSX_MOVEALONG_ONE=$(echo "$win_info_MOVEALONG" | \
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
# Tray
#echo "WIN_ID_MVALONG_ONE $WIN_ID_MVALONG_ONE"
#xdotool windowmove $WIN_ID_MVALONG_ONE $1 $2
2>/dev/null 1>&2 xdotool windowmove $WIN_ID_MVALONG_ONE $WIN_POSX_MVALONG_ONE $(($2 + 4))
#echo "WIN_ID_MOVEALONG_ONE $WIN_ID_MOVEALONG_ONE"
#xdotool windowmove $WIN_ID_MOVEALONG_ONE $1 $2
2>/dev/null 1>&2 xdotool windowmove $WIN_ID_MOVEALONG_ONE $WIN_POSX_MOVEALONG_ONE $(($2 + 4))
}
+1 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash
###########
## Defaults
## Settings
#
# Name of the bar in polybar (e.g. [bar/BARNAME]) which should be used as popup
POPUP_NAME="floating_sysinfo"
@@ -80,7 +80,6 @@ if [ "$1" == "--show" ]; then
exit
fi
if [ "$1" == "--remove-locks" ]; then
removeLocks
exit