master
Daniel Napora 2022-04-26 20:23:05 +02:00
parent fed965c8ee
commit a43cf4fc54
3 changed files with 43 additions and 13 deletions

View File

@ -1,13 +1,22 @@
#!/bin/bash
case "$LANG" in
pl*)
COMMENT="Lekki, szybki i funkcjonalny Linux z pulpitem na bazie Openbox"
;;
*)
COMMENT="Fast and Lightweight, ready to use Openbox Desktop"
;;
esac
yad --title="About Mabox" --window-icon=mbcc \
--about \
--pname="Mabox Linux" \
--pversion="$(lsb_release -rs) <i>$(lsb_release -cs)</i>" \
--image=mbcc \
--comments="Fast and Lightweight, ready to use Openbox Desktop" \
--copyright="Copyright 2016-2022, Daniel Napora <napcok@gmail.com>" \
--comments="${COMMENT}" \
--copyright="Copyright 2016-2022, Daniel Napora <danieln@maboxlinux.org>" \
--license=GPL3 \
--website="https://maboxlinux.org" \
--website-label=maboxlinux.org \
--authors="Daniel Napora <napcok@gmail.com>"
--authors="Daniel Napora <danieln@maboxlinux.org>"

View File

@ -38,9 +38,34 @@ phwmon() {
#kill phwmon.py if running
if phwmonpid=$(pgrep -f phwmon.py); then
kill $phwmonpid
sleep 1
fi
. $HOME/.config/mabox/mabox.conf
if [ $phwmon_monitor = true ];then
#Set config variables if not set or empty; ":" means do nothing
[[ -v phwmon_monitor ]] && : || mb-setvar phwmon_monitor=true
[[ -v phwmon_cpu ]] && : || mb-setvar phwmon_cpu=true
[[ -v phwmon_mem ]] && :|| mb-setvar phwmon_mem=true
[[ -v phwmon_swap ]] && : || mb-setvar phwmon_swap=false
[[ -v phwmon_net ]] && : || mb-setvar phwmon_net=true
[[ -v phwmon_io ]] && : || mb-setvar phwmon_io=false
[[ -v phwmon_bgcolor ]] && : || mb-setvar phwmon_bgcolor=#303030
[[ -v phwmon_alertcolor ]] && : || mb-setvar phwmon_alertcolor=#ff0000
[[ -v phwmon_cpucolor ]] && : || mb-setvar phwmon_cpucolor=#70b433
[[ -v phwmon_memcolor ]] && :|| mb-setvar phwmon_memcolor=#efc541
[[ -v phwmon_swapcolor ]] && : || mb-setvar phwmon_swapcolor=#ff81ca
[[ -v phwmon_netcolor ]] && : || mb-setvar phwmon_netcolor=#368aeb
[[ -v phwmon_iocolor ]] && : || mb-setvar phwmon_iocolor=#ff5e56
[[ -v phwmon_iconsize ]] && : || mb-setvar phwmon_iconsize=32
bg="--bg=${phwmon_bgcolor:-#DDDDDD}"
fg_alert="--fg_alert=${phwmon_alertcolor:-#ff0000}"
fg_cpu="--fg_cpu=${phwmon_cpucolor:-#70b433}"
fg_mem="--fg_mem=${phwmon_memcolor:-#efc541}"
fg_swap="--fg_swap=${phwmon_swapcolor:-#ff81ca}"
fg_net="--fg_net=${phwmon_netcolor:-#368aeb}"
fg_io="--fg_io=${phwmon_iocolor:-#ff5e56}"
iconsize="--size=${phwmon_iconsize:-32}"
[[ $phwmon_cpu = true ]] && cpu="--cpu" || cpu=""
[[ $phwmon_mem = true ]] && mem="--mem" || mem=""
@ -48,7 +73,8 @@ if [ $phwmon_monitor = true ];then
[[ $phwmon_net = true ]] && net="--net" || net=""
[[ $phwmon_io = true ]] && io="--io" || io=""
phwmon.py ${cpu} ${mem} ${swap} ${net} ${io} --task_manager lxtask
#phwmon.py ${cpu} ${mem} ${swap} ${net} ${io} --task_manager lxtask
phwmon.py ${cpu} ${mem} ${swap} ${net} ${io} ${bg} ${fg_alert} ${fg_cpu} ${fg_mem} ${fg_swap} ${fg_net} ${fg_io} ${iconsize} --task_manager="lxtask"
fi
@ -67,12 +93,7 @@ checkautostart
. $HOME/.config/mabox/mabox.conf
#Set config variables if not set or empty; ":" means do nothing
# NEW CONFIG VARIABLES - SET defaults at openbox start
[[ -v phwmon_monitor ]] && : || mb-setvar phwmon_monitor=true
[[ -v phwmon_cpu ]] && : || mb-setvar phwmon_cpu=true
[[ -v phwmon_mem ]] && :|| mb-setvar phwmon_mem=true
[[ -v phwmon_swap ]] && : || mb-setvar phwmon_swap=false
[[ -v phwmon_net ]] && : || mb-setvar phwmon_net=true
[[ -v phwmon_io ]] && : || mb-setvar phwmon_io=false
[[ -v places_tint2pipe ]] && : || mb-setvar places_tint2pipe=true
[[ -v places_quicknav ]] && : || mb-setvar places_quicknav=true
[[ -v places_bookmarks ]] && : || mb-setvar places_bookmarks=true
@ -90,7 +111,7 @@ case "$1" in
virtualboxes) virtualboxes;;
phwmon) phwmon;;
*)
echo -e "Usage $(basename "$0") startopenbox|cgeckautostart|virtualboxes|phwmon" >&2
echo -e "Usage $(basename "$0") startopenbox|checkautostart|virtualboxes|phwmon" >&2
exit 1
;;
esac

View File

@ -24,8 +24,8 @@ sed -i /^"$search="/d $FILE
fi
if grep -Rq $search $FILE
then #found
#sed -i s/^"$search=".*$/"$1"/ $FILE
sed -i s/^"$search".*$/"$1"/ $FILE
sed -i s/^"$search=".*$/"$1"/ $FILE
#sed -i s/^"$search".*$/"$1"/ $FILE
else #not found
echo $1 >> $FILE
fi