Massive Updates
This commit is contained in:
1 parent
db7bec88da
commit
3685db2839
54 files changed
+1516
-305
No files matched your search
@@ -55,21 +55,12 @@ case "$class" in
|
||||
eval "$consequences"
|
||||
[ "$state" ] || echo "desktop=^6 follow=on"
|
||||
;;
|
||||
Spotify)
|
||||
eval "$consequences"
|
||||
[ "$state" ] || echo "state=pseudo_tiled rectangle=1125x600 desktop=^6 follow=on"
|
||||
;;
|
||||
"") ## spotify hack
|
||||
sleep 0.5
|
||||
wm_class=($(xprop -id $wid | grep "WM_CLASS" | grep -Po '"\K[^,"]+'))
|
||||
class=${wm_class[-1]}
|
||||
[[ ${#wm_class[@]} == "2" ]] && instance=${wm_class[0]}
|
||||
[[ -n "$class" ]] && main
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Spotify)
|
||||
eval "$consequences"
|
||||
[ "$state" ] || echo "state=pseudo_tiled desktop=^6 follow=on"
|
||||
;;
|
||||
esac
|
||||
|
||||
main
|
||||
case "$instance" in
|
||||
Toolkit)
|
||||
eval "$consequences"
|
||||
|
||||
@@ -13,12 +13,8 @@
|
||||
# spotify, ncmpcpp, clementine, strawberry and others.
|
||||
|
||||
|
||||
# uncomment your music players below.
|
||||
Control="MPD"
|
||||
[ -n "$(pgrep spotify)" ] && Control="spotify"
|
||||
# [ -n "$(pgrep brave-bin)" ] && Control="brave-bin"
|
||||
# [ -n "$(pgrep rhythmbox)" ] && Control="rhythmbox"
|
||||
# [ -n "$(pgrep strawberry)" ] && Control="strawberry"
|
||||
# Set the player
|
||||
[ -n "$(pgrep spotify)" ] && Control="spotify" || Control="MPD"
|
||||
|
||||
# Here the cover image will be saved.
|
||||
Cover=/tmp/cover.png
|
||||
@@ -27,7 +23,6 @@ bkpCover=~/.config/bspwm/assets/fallback.webp
|
||||
# mpd music directory for mpd clients.
|
||||
mpddir=~/Music
|
||||
|
||||
|
||||
case $Control in
|
||||
MPD)
|
||||
case $1 in
|
||||
@@ -43,55 +38,51 @@ case $Control in
|
||||
--stop)
|
||||
mpc -q stop
|
||||
;;
|
||||
title)
|
||||
--title)
|
||||
title=$(mpc -f %title% current)
|
||||
echo "${title:-Play Something}"
|
||||
;;
|
||||
artist)
|
||||
--artist)
|
||||
artist=$(mpc -f %artist% current)
|
||||
echo "${artist:-No Artist}"
|
||||
;;
|
||||
album)
|
||||
album=$(mpc -f %album% current)
|
||||
echo "${album:-No Album}"
|
||||
--status)
|
||||
status=$(mpc status | head -2 | tail -1 | cut -c2-8 | sed 's/]//g' | sed 's/./\U&/')
|
||||
echo "${status:-Stopped}"
|
||||
;;
|
||||
statusicon)
|
||||
statusico=$(mpc status | head -2 | tail -1 | cut -c2-7 )
|
||||
|
||||
case "$statusico" in
|
||||
playin)
|
||||
icon=""
|
||||
;;
|
||||
paused)
|
||||
icon=""
|
||||
;;
|
||||
*)
|
||||
icon=""
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$icon"
|
||||
;;
|
||||
player)
|
||||
--player)
|
||||
echo "$Control"
|
||||
;;
|
||||
coverloc)
|
||||
--cover)
|
||||
ffmpeg -i "$mpddir"/"$(mpc current -f %file%)" "${Cover}" -y &> /dev/null || cp $bkpCover $Cover
|
||||
echo "$Cover"
|
||||
;;
|
||||
nccover)
|
||||
ffmpeg -i "$mpddir"/"$(mpc current -f %file%)" "${Cover}" -y &> /dev/null || cp $bkpCover $Cover
|
||||
;;
|
||||
time)
|
||||
time=$(mpc status %currenttime%)
|
||||
echo "${time:-0:00}"
|
||||
--position)
|
||||
position=$(mpc status %currenttime%)
|
||||
echo "${position:-0:00}"
|
||||
;;
|
||||
length)
|
||||
echo "100"
|
||||
--positions)
|
||||
positions=$(mpc status %currenttime% | awk -F: '{print ($1 * 60) + $2}')
|
||||
echo "${positions:-0}"
|
||||
;;
|
||||
percent)
|
||||
perc=$(mpc status | grep "%)" | awk '{ print $4 }' | awk -F% '{ print $1 }' | awk 'sub(/^.{1}/,"")')
|
||||
echo "${perc:-0}"
|
||||
--length)
|
||||
length=$(mpc status %totaltime%)
|
||||
echo "${length:-0:00}"
|
||||
;;
|
||||
--lengths)
|
||||
lengths=$(mpc status %totaltime% | awk -F: '{print ($1 * 60) + $2}')
|
||||
echo "${lengths:-0}"
|
||||
;;
|
||||
--shuffle)
|
||||
shuffle=$(mpc status | sed -n '3s/.*random: \([^ ]*\).*/\1/p' | sed 's/.*/\u&/')
|
||||
echo "${shuffle:-Off}"
|
||||
;;
|
||||
--loop)
|
||||
loop=$(mpc status | sed -n '3s/.*repeat: \([^ ]*\).*/\1/p' | sed 's/.*/\u&/')
|
||||
echo "${loop:-Off}"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -109,54 +100,49 @@ case $Control in
|
||||
--stop)
|
||||
playerctl --player=$Control stop
|
||||
;;
|
||||
title)
|
||||
--title)
|
||||
title=$(playerctl --player=$Control metadata --format {{title}})
|
||||
echo "${title:-Play Something}"
|
||||
;;
|
||||
artist)
|
||||
--artist)
|
||||
artist=$(playerctl --player=$Control metadata --format {{artist}})
|
||||
echo "${artist:-No Artist}"
|
||||
;;
|
||||
album)
|
||||
album=$(playerctl --player=$Control metadata --format {{album}})
|
||||
echo "${album:-No Album}"
|
||||
--status)
|
||||
status=$(playerctl --player=$Control status)
|
||||
echo "${status:-Stopped}"
|
||||
;;
|
||||
statusicon)
|
||||
statusico=$(playerctl --player="$Control" status)
|
||||
|
||||
case "$statusico" in
|
||||
Playing)
|
||||
icon=""
|
||||
;;
|
||||
Paused)
|
||||
icon=""
|
||||
;;
|
||||
*)
|
||||
icon=""
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$icon"
|
||||
;;
|
||||
player)
|
||||
--player)
|
||||
echo "$Control"
|
||||
;;
|
||||
coverloc)
|
||||
--cover)
|
||||
albumart="$(playerctl --player=$Control metadata mpris:artUrl | sed -e 's/open.spotify.com/i.scdn.co/g')"
|
||||
[ $(playerctl --player=$Control metadata mpris:artUrl) ] && curl -s "$albumart" --output $Cover || cp $bkpCover $Cover
|
||||
echo "$Cover"
|
||||
;;
|
||||
time)
|
||||
time=$(playerctl --player=$Control position --format "{{ duration(position) }}")
|
||||
echo "${time:-0:00}"
|
||||
--position)
|
||||
position=$(playerctl --player=$Control position --format "{{ duration(position) }}")
|
||||
echo "${position:-0:00}"
|
||||
;;
|
||||
length)
|
||||
length=$(playerctl --player=$Control metadata mpris:length | sed 's/.\{6\}$//')
|
||||
echo "${length:-0}"
|
||||
--positions)
|
||||
positions=$(playerctl --player=$Control position | sed 's/..\{6\}$//')
|
||||
echo "${positions:-0}"
|
||||
;;
|
||||
percent)
|
||||
perc=$(playerctl -p $Control position | sed 's/..\{6\}$//')
|
||||
echo "${perc:-0}"
|
||||
--length)
|
||||
length=$(playerctl --player=$Control metadata --format "{{ duration(mpris:length) }}")
|
||||
echo "${length:-0:00}"
|
||||
;;
|
||||
--lengths)
|
||||
lengths=$(playerctl --player=$Control metadata mpris:length | sed 's/.\{6\}$//')
|
||||
echo "${lengths:-0}"
|
||||
;;
|
||||
--shuffle)
|
||||
shuffle=$(playerctl --player=$Control shuffle)
|
||||
echo "${shuffle:-Off}"
|
||||
;;
|
||||
--loop)
|
||||
loop=$(playerctl --player=$Control loop)
|
||||
echo "${loop:-None}"
|
||||
;;
|
||||
esac
|
||||
esac 2>/dev/null
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# ╔═╗╔═╗╔═╗╔═╗ ╦ ╔═╗╦ ╦╔╗╔╔═╗╦ ╦╔═╗╦═╗
|
||||
# ╠═╣╠═╝╠═╝╚═╗ ║ ╠═╣║ ║║║║║ ╠═╣║╣ ╠╦╝
|
||||
# ╩ ╩╩ ╩ ╚═╝ ╩═╝╩ ╩╚═╝╝╚╝╚═╝╩ ╩╚═╝╩╚═
|
||||
# Script to control apps launcher
|
||||
|
||||
|
||||
# From here you can control your favorite applications for all themes.
|
||||
# █████╗ ██████╗ ██████╗ ███████╗ ██╗ █████╗ ██╗ ██╗███╗ ██╗ ██████╗██╗ ██╗███████╗██████╗
|
||||
# ██╔══██╗██╔══██╗██╔══██╗██╔════╝ ██║ ██╔══██╗██║ ██║████╗ ██║██╔════╝██║ ██║██╔════╝██╔══██╗
|
||||
# ███████║██████╔╝██████╔╝███████╗ ██║ ███████║██║ ██║██╔██╗ ██║██║ ███████║█████╗ ██████╔╝
|
||||
# ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ ██║ ██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║██╔══╝ ██╔══██╗
|
||||
# ██║ ██║██║ ██║ ███████║ ███████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║███████╗██║ ██║
|
||||
# ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
||||
|
||||
WIDGET_DIR="$HOME/.config/bspwm/eww"
|
||||
case "$1" in
|
||||
--menu)
|
||||
rofi -show drun \
|
||||
@@ -72,7 +72,21 @@ case "$1" in
|
||||
|
||||
--soundcontrol)
|
||||
pavucontrol;;
|
||||
|
||||
*)
|
||||
echo "Option not Valid ";;
|
||||
esac
|
||||
|
||||
# Eww Widgets
|
||||
--powermenu)
|
||||
eww -c "$WIDGET_DIR" open --toggle powermenu
|
||||
;;
|
||||
--usercard)
|
||||
eww -c "$WIDGET_DIR" open --toggle launchermenu
|
||||
;;
|
||||
--player)
|
||||
eww -c "$WIDGET_DIR" open --toggle music
|
||||
;;
|
||||
--calendar)
|
||||
eww -c "$WIDGET_DIR" open --toggle date
|
||||
;;
|
||||
*)
|
||||
echo "Not Valid Option"
|
||||
;;
|
||||
esac
|
||||
@@ -2,23 +2,22 @@
|
||||
|
||||
SFILE="$HOME/.config/bspwm/scripts/.sys"
|
||||
|
||||
|
||||
function get_values() {
|
||||
|
||||
DEFNETWORK=$(ip route | grep '^default' | awk '{print $5}' | head -n1)
|
||||
CARD=$(ls -1 /sys/class/backlight/)
|
||||
power_supply_files=$(ls /sys/class/power_supply/)
|
||||
|
||||
for file in $power_supply_files
|
||||
do
|
||||
if [ -e "/sys/class/power_supply/$file/capacity" ]; then
|
||||
battery_file=$file
|
||||
fi
|
||||
for file in $power_supply_files
|
||||
do
|
||||
if [ -e "/sys/class/power_supply/$file/capacity" ]; then
|
||||
battery_file=$file
|
||||
fi
|
||||
|
||||
if [ -e "/sys/class/power_supply/$file/online" ]; then
|
||||
adapter_file=$file
|
||||
fi
|
||||
done
|
||||
if [ -e "/sys/class/power_supply/$file/online" ]; then
|
||||
adapter_file=$file
|
||||
fi
|
||||
done
|
||||
|
||||
BATTERY="$battery_file"
|
||||
ADAPTER="$adapter_file"
|
||||
|
||||
+36
-33
@@ -1,10 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>
|
||||
# ██╗ ██╗ ██████╗ ██╗ ██╗ ██╗███╗ ███╗███████╗
|
||||
# ██║ ██║██╔═══██╗██║ ██║ ██║████╗ ████║██╔════╝
|
||||
# ██║ ██║██║ ██║██║ ██║ ██║██╔████╔██║█████╗
|
||||
# ╚██╗ ██╔╝██║ ██║██║ ██║ ██║██║╚██╔╝██║██╔══╝
|
||||
# ╚████╔╝ ╚██████╔╝███████╗╚██████╔╝██║ ╚═╝ ██║███████╗
|
||||
# ╚═══╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
|
||||
#
|
||||
# gh0stzk
|
||||
# https://github.com/gh0stzk/dotfiles
|
||||
# This script controls the volume of your system, using pamixer.
|
||||
# 23.09.2023 09:30:24
|
||||
#
|
||||
|
||||
# Icons
|
||||
iDIR="$HOME/.config/bspwm/assets"
|
||||
notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:obvolume'
|
||||
vol_dir="$HOME/.config/bspwm/assets"
|
||||
notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:cvolum'
|
||||
|
||||
# Get Volume
|
||||
get_volume() {
|
||||
@@ -14,12 +24,10 @@ get_volume() {
|
||||
# Get icons
|
||||
get_icon() {
|
||||
current="$(get_volume)"
|
||||
if [[ "$current" -eq "0" ]]; then
|
||||
icon="$iDIR/mute.png"
|
||||
elif [[ "$current" == "muted" ]]; then
|
||||
icon="$iDIR/mute.png"
|
||||
elif [[ ("$current" -ge "0") && ("$current" -le "150") ]]; then
|
||||
icon="$iDIR/vol.png"
|
||||
if [[ "$current" -eq "0" || "$current" == "muted" ]]; then
|
||||
icon="$vol_dir/mute.png"
|
||||
else
|
||||
icon="$vol_dir/vol.png"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -28,40 +36,35 @@ notify_user() {
|
||||
${notify_cmd} -i "$icon" "Volume : $(get_volume)%"
|
||||
}
|
||||
|
||||
# Increase Volume
|
||||
inc_volume() {
|
||||
# Adjust Volume
|
||||
adjust_volume() {
|
||||
[[ $(pamixer --get-mute) == true ]] && pamixer -u
|
||||
pamixer --allow-boost --set-limit 150 -i 5 && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Decrease Volume
|
||||
dec_volume() {
|
||||
[[ $(pamixer --get-mute) == true ]] && pamixer -u
|
||||
pamixer --allow-boost --set-limit 150 -d 5 && get_icon && notify_user
|
||||
pamixer --allow-boost --set-limit 150 "$1" "$2" && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Toggle Mute
|
||||
toggle_mute() {
|
||||
if [[ $(pamixer --get-mute) == false ]]; then
|
||||
pamixer --toggle-mute && ${notify_cmd} -i "$iDIR/mute.png" "Mute"
|
||||
pamixer --toggle-mute
|
||||
get_icon
|
||||
message="Mute"
|
||||
else
|
||||
pamixer --toggle-mute && get_icon && ${notify_cmd} -i "$icon" "Unmute"
|
||||
pamixer --toggle-mute
|
||||
get_icon
|
||||
message="Unmute"
|
||||
fi
|
||||
${notify_cmd} -i "$icon" "$message"
|
||||
}
|
||||
|
||||
# Execute accordingly
|
||||
if [[ -x $(which pamixer) ]]; then
|
||||
if [[ "$1" == "--get" ]]; then
|
||||
get_volume
|
||||
elif [[ "$1" == "--inc" ]]; then
|
||||
inc_volume
|
||||
elif [[ "$1" == "--dec" ]]; then
|
||||
dec_volume
|
||||
elif [[ "$1" == "--toggle" ]]; then
|
||||
toggle_mute
|
||||
else
|
||||
echo "$(get_volume)%"
|
||||
fi
|
||||
if command -v pamixer &>/dev/null; then
|
||||
case "$1" in
|
||||
--get) get_volume ;;
|
||||
--inc) adjust_volume -i 5 ;;
|
||||
--dec) adjust_volume -d 5 ;;
|
||||
--toggle) toggle_mute ;;
|
||||
*) echo "$(get_volume)%" ;;
|
||||
esac
|
||||
else
|
||||
${notify_cmd} "'pamixer' is not installed."
|
||||
fi
|
||||
@@ -18,7 +18,6 @@ WEATHER_DESC=$(echo "$WEATHER" | jq -r ".weather[0].main")
|
||||
WEATHER_TEMP=$(echo "$WEATHER" | jq ".main.temp" | cut -d "." -f 1)
|
||||
WEATHER_ICON_CODE=$(echo "$WEATHER" | jq -r ".weather[].icon" | head -1)
|
||||
WEATHER_FEELS_LIKE=$(echo "$WEATHER" | jq ".main.feels_like" | cut -d "." -f 1)
|
||||
WEATHER_HUMIDITY=$(echo "$WEATHER" | jq ".main.humidity" | cut -d "." -f 1)
|
||||
WEATHER_ICON=""
|
||||
WEATHER_HEX=""
|
||||
|
||||
@@ -112,9 +111,6 @@ case $1 in
|
||||
"feels_like")
|
||||
check_if_empty "$WEATHER_FEELS_LIKE"
|
||||
;;
|
||||
"humidity")
|
||||
check_if_empty "$WEATHER_HUMIDITY"
|
||||
;;
|
||||
"weather_desc")
|
||||
[[ -z $WEATHER_DESC ]] && echo "Not Available." || echo "$WEATHER_DESC"
|
||||
;;
|
||||
@@ -132,4 +128,5 @@ case $1 in
|
||||
;;
|
||||
"wmodule")
|
||||
echo $WEATHER_ICON "$WEATHER_TEMP"°
|
||||
;;
|
||||
esac
|
||||
@@ -1,8 +1,3 @@
|
||||
; ┌─┐┌─┐┬ ┬ ┬┌┐ ┌─┐┬─┐ ┌─┐┌─┐┬ ┌─┐┬─┐┌─┐┌─┐┬ ┬┌─┐┌┬┐┌─┐┌─┐
|
||||
; ├─┘│ ││ └┬┘├┴┐├─┤├┬┘ │ │ ││ │ │├┬┘└─┐│ ├─┤├┤ │││├┤ └─┐
|
||||
; ┴ └─┘┴─┘ ┴ └─┘┴ ┴┴└─ └─┘└─┘┴─┘└─┘┴└─└─┘└─┘┴ ┴└─┘┴ ┴└─┘└─┘
|
||||
|
||||
|
||||
[karla]
|
||||
|
||||
bg = #D90E1113
|
||||
@@ -30,3 +25,29 @@ grey = #8C8C8C
|
||||
indigo = #6C77BB
|
||||
blue-gray = #6D8895
|
||||
|
||||
[melissa]
|
||||
bg = #003b4252
|
||||
bg-alt = #3b4252
|
||||
fg = #d8dee9
|
||||
mb = #25292e
|
||||
|
||||
trans = #00000000
|
||||
white = #FFFFFF
|
||||
black = #000000
|
||||
|
||||
red = #bf616a
|
||||
pink = #d95d95
|
||||
purple = #b48ead
|
||||
blue = #5e81ac
|
||||
blue-arch = #0A9CF5
|
||||
cyan = #88c0d0
|
||||
teal = #00B19F
|
||||
green = #a3be8c
|
||||
lime = #B9C244
|
||||
yellow = #ebcb8b
|
||||
amber = #FBC02D
|
||||
orange = #E57C46
|
||||
brown = #AC8476
|
||||
grey = #4c566a
|
||||
indigo = #6C77BB
|
||||
blue-gray = #63778f
|
||||
@@ -0,0 +1,36 @@
|
||||
Terminal,OpenApps --floating,/usr/share/icons/Papirus/32x32/apps/terminal.svg
|
||||
Web Browser,OpenApps --browser,/usr/share/icons/Papirus/32x32/apps/internet-web-browser.svg
|
||||
File Manager,OpenApps --filemanager,/usr/share/icons/Papirus/32x32/apps/org.xfce.thunar.svg
|
||||
|
||||
^sep()
|
||||
|
||||
Favorites,^checkout(favorites),/usr/share/icons/Papirus/32x32/status/starred.svg
|
||||
|
||||
^sep()
|
||||
|
||||
Widgets,^checkout(wg),/usr/share/icons/Papirus/32x32/apps/kmenuedit.svg
|
||||
BSPWM,^checkout(wm),/usr/share/icons/Papirus/32x32/apps/gnome-windows.svg
|
||||
Exit,^checkout(exit),/usr/share/icons/Papirus/32x32/apps/system-shutdown.svg
|
||||
|
||||
^tag(favorites)
|
||||
Editor,OpenApps --editor,/usr/share/icons/Papirus/32x32/apps/standard-notes.svg
|
||||
Neovim,OpenApps --nvim,nvim
|
||||
Firefox,OpenApps --browser,firefox
|
||||
Retroarch,retroarch,/usr/share/icons/Papirus/32x32/apps/retroarch.svg
|
||||
|
||||
^tag(wg)
|
||||
User Card,OpenApps --usercard,/usr/share/icons/Papirus/32x32/apps/system-users.svg
|
||||
Music Player,OpenApps --player,/usr/share/icons/Papirus/32x32/apps/musique.svg
|
||||
Power Menu,OpenApps --powermenu,/usr/share/icons/Papirus/32x32/status/changes-allow.svg
|
||||
Calendar,OpenApps --calendar,/usr/share/icons/Papirus/32x32/apps/office-calendar.svg
|
||||
|
||||
^tag(wm)
|
||||
Change Theme,OpenApps --rice,/usr/share/icons/Papirus/32x32/apps/colors.svg
|
||||
Keybinds,KeybindingsHelp,/usr/share/icons/Papirus/32x32/apps/preferences-desktop-keyboard-shortcuts.svg
|
||||
Restart WM,bspc wm -r,/usr/share/icons/Papirus/32x32/apps/system-reboot.svg
|
||||
Quit,bspc quit,/usr/share/icons/Papirus/32x32/apps/system-log-out.svg
|
||||
|
||||
^tag(exit)
|
||||
Block computer,physlock -d,/usr/share/icons/Papirus/32x32/status/changes-prevent.svg
|
||||
Reboot,systemctl reboot,/usr/share/icons/Papirus/32x32/apps/system-reboot.svg
|
||||
Shutdown,systemctl poweroff,/usr/share/icons/Papirus/32x32/apps/system-shutdown.svg
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
base=$(dirname $0)
|
||||
|
||||
menu_file=$base/menu.txt
|
||||
conf_file=$base/jgmenurc
|
||||
|
||||
jgmenu --csv-file=~/.config/bspwm/scripts/menu.txt --config-file=~/.config/bspwm/scripts/jgmenurc
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
hidden=/tmp/syshide.lock
|
||||
file="$XDG_CONFIG_HOME/bspwm/rices/${RICETHEME}/modules.ini"
|
||||
|
||||
if [[ $(pidof stalonetray) ]]; then
|
||||
if [[ ! -e $hidden ]]; then
|
||||
polybar-msg action "#systray.hook.1"
|
||||
xdo hide -n stalonetray
|
||||
touch "$hidden"
|
||||
perl -0 -i -pe 's/systray\ninitial=.*/systray\ninitial=2/g' "$file"
|
||||
else
|
||||
polybar-msg action "#systray.hook.0"
|
||||
xdo show -n stalonetray
|
||||
xdo raise -n stalonetray
|
||||
rm "$hidden"
|
||||
perl -0 -i -pe 's/systray\ninitial=.*/systray\ninitial=1/g' "$file"
|
||||
fi
|
||||
else
|
||||
stalonetray &
|
||||
fi
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TEMP="$(cat /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input | awk '{sub(/000$/, "°C", $0); print}')"
|
||||
echo "${TEMP:-null}"
|
||||
Reference in new issue
Block a user