remove status, fix a few modules

This commit is contained in:
speedie 2022-11-27 02:29:52 +01:00
parent 95758c24ca
commit 4c8b5f90be
7 changed files with 7 additions and 10 deletions

View file

@ -13,7 +13,7 @@
static const char *autostart[] = { static const char *autostart[] = {
/* Run the built in status bar */ /* Run the built in status bar */
shell, "-c", "pgrep -x", status, " || ", status, NULL, shell, "-c", "pkill status; status &", NULL,
/* Autostart script, if it exists */ /* Autostart script, if it exists */
shell, "-c", "$HOME/.config/speedwm/autostart.sh", NULL, shell, "-c", "$HOME/.config/speedwm/autostart.sh", NULL,

View file

@ -186,8 +186,6 @@ speedwm.status.defaultstatus:
!! Status bar script to run !! Status bar script to run
speedwm.status.status: pgrep -x status || status &
speedwm.status.statusallmons: 1 ! Display status text on all monitors (0/1) speedwm.status.statusallmons: 1 ! Display status text on all monitors (0/1)
!! Switcher options !! Switcher options

View file

@ -14,7 +14,7 @@ cat <<CONFIG > ~/.config/speedwm/statusrc
# To apply these changes, simply restart the status bar. # To apply these changes, simply restart the status bar.
# General settings # General settings
SEPARATOR="❰" # Separator to use. Alternative separators: "❰", "<", "|" SEPARATOR=" ❰" # Separator to use. Alternative separators: "❰", "<", "|"
# Status bar modules # Status bar modules
# Set to true/false to enable/disable. # Set to true/false to enable/disable.

View file

@ -97,7 +97,8 @@ PRINT() {
define_cmus_data() { define_cmus_data() {
# filename # filename
[ "$(cmus-remote -C status | head -n 1 | awk '{ print $2 }')" = "playing" ] && [ "$ITEM9_DISPLAY_FILE" = "true" ] && echo "$MUSIC_FILENAME_CUT" && return [ "$(cmus-remote -C status | head -n 1 | awk '{ print $2 }')" = "playing" ] && [ "$ITEM9_DISPLAY_FILE" = "true" ] && echo "$MUSIC_FILENAME_CUT" && return
MUSIC_TITLE="$(cmus-remote -C status | grep "tag title" | sed "s|\&|stellar_amp|g; s/tag title //g")"
[ "$(cmus-remote -Q | grep status | awk '{ print $2 }')" = "stopped" ] && return
# put data together # put data together
data="$(printf "$ITEM9_FORMAT" | sed "s|@ab|$MUSIC_ALBUM|; s|@t|$MUSIC_TITLE|; s|@g|$MUSIC_GENRE|; s|@a|$MUSIC_ARTIST|; s|@tt|$MUSIC_TIMETOTAL|; s|@te|$MUSIC_TIMEELAPSED|; s| ||g; s|() ||g")" data="$(printf "$ITEM9_FORMAT" | sed "s|@ab|$MUSIC_ALBUM|; s|@t|$MUSIC_TITLE|; s|@g|$MUSIC_GENRE|; s|@a|$MUSIC_ARTIST|; s|@tt|$MUSIC_TIMETOTAL|; s|@te|$MUSIC_TIMEELAPSED|; s| ||g; s|() ||g")"

View file

@ -17,8 +17,8 @@ GETNSTAT() {
RXPMS="$(expr $R2 - $R1)" RXPMS="$(expr $R2 - $R1)"
TX="$(expr $TXPMS / 1024 "*" 10)" TX="$(expr $TXPMS / 1024 "*" 10)"
RX="$(expr $RXPMS / 1024 "*" 10)" RX="$(expr $RXPMS / 1024 "*" 10)"
printf "$TX\n" > /tmp/module_net_tx [ ! -z "$TX" ] && printf "$TX\n" > /tmp/module_net_tx
printf "$RX\n" > /tmp/module_net_rx [ ! -z "$RX" ] && printf "$RX\n" > /tmp/module_net_rx
} }
[ ! -e "/tmp/module_net_tx" ] && GETNSTAT [ ! -e "/tmp/module_net_tx" ] && GETNSTAT
@ -57,7 +57,7 @@ CLICK() {
# information itself # information itself
PRINT() { PRINT() {
echo "$ITEM6_SEPARATOR $ITEM6_ICON $ITEM6_FORMAT" | sed "s|@t|$NETWORK_TRANSMITTED|g; s|@r|$NETWORK_RECEIVED|g" [ ! -z "$NETWORK_TRANSMITTED" ] && [ ! -z "$NETWORK_RECEIVED" ] && echo "$ITEM6_SEPARATOR $ITEM6_ICON $ITEM6_FORMAT" | sed "s|@t|$NETWORK_TRANSMITTED|g; s|@r|$NETWORK_RECEIVED|g"
} }
# argument 1 # argument 1

View file

@ -137,7 +137,6 @@ static int autoresize = 1; /* Allow resizing clients aut
static char font[] = "Noto Sans Regular 8"; static char font[] = "Noto Sans Regular 8";
/* Status options */ /* Status options */
static char status[] = "pgrep -x status || status &"; /* Status bar to run on startup. Set this to nothing to run nothing and run your own status bar. */
static char defaultstatus[] = ""; /* What to print when a status bar is not running */ static char defaultstatus[] = ""; /* What to print when a status bar is not running */
/* Alternate bar /* Alternate bar

View file

@ -56,7 +56,6 @@ ResourcePref resources[] = {
{ "col.status15", STRING, &col_status15 }, { "col.status15", STRING, &col_status15 },
{ "col.systray", STRING, &col_systray }, { "col.systray", STRING, &col_systray },
{ "run.shell", STRING, &shell }, { "run.shell", STRING, &shell },
{ "status.status", STRING, &status },
{ "status.defaultstatus", STRING, &defaultstatus }, { "status.defaultstatus", STRING, &defaultstatus },
{ "bar.altbarclass", STRING, &altbarclass }, { "bar.altbarclass", STRING, &altbarclass },
{ "bar.altbarcmd", STRING, &altbarcmd }, { "bar.altbarcmd", STRING, &altbarcmd },