mxfb-2025 development ideas

Help for MX Fluxbox
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
siamhie
Global Moderator
Posts: 3219
Joined: Fri Aug 20, 2021 5:45 pm

Re: mxfb-2025 development ideas

#141 Post by siamhie »

kobaian wrote: Tue Nov 05, 2024 2:39 am
siamhie wrote: Mon Nov 04, 2024 11:17 am Since I started using dock-dualum-tint2rc as my app launcher, the weather wouldn't show up (after booting up) unless I either log out and log back into the desktop or disable then re-enable the dock.

quickshot_1.png


I found that if I edit the executors command line and add a sleep command before the curl command, then the weather is displayed after booting up.

Code: Select all

curl wttr.in/?format=1

Code: Select all

sleep 2 && curl wttr.in/?format=1
quickshot_2.png
That's interesting...
I know two cases, when the weather widget does not show.
1. No Internet connection or bad quality of the connection.
2. The number of queries exceeded and you have to wait for the wttr.in server gets its permissions back to share the information from other weather services.

In the first case the widget will appear after connecting or improving the connection quality. If there is a delay between your logging in and connecting to the Internet you have to wait about 10 minutes for the widget to refresh automatically.

@kobaian I think the problem is that curl runs it's command before the toolbar has completely loaded. I tried it with sleep 1 and the weather still won't show.


2. The number of queries exceeded and you have to wait for the wttr.in server gets its permissions back to share the information from other weather services.

I get that sometimes when I left/right click on the weather report. I'll end up with a blank terminal window.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
kobaian
Posts: 365
Joined: Fri Jan 03, 2020 5:49 am

Re: mxfb-2025 development ideas

#142 Post by kobaian »

siamhie wrote: Tue Nov 05, 2024 9:06 am
kobaian wrote: Tue Nov 05, 2024 2:39 am
siamhie wrote: Mon Nov 04, 2024 11:17 am Since I started using dock-dualum-tint2rc as my app launcher, the weather wouldn't show up (after booting up) unless I either log out and log back into the desktop or disable then re-enable the dock.

quickshot_1.png


I found that if I edit the executors command line and add a sleep command before the curl command, then the weather is displayed after booting up.

Code: Select all

curl wttr.in/?format=1

Code: Select all

sleep 2 && curl wttr.in/?format=1
quickshot_2.png
That's interesting...
I know two cases, when the weather widget does not show.
1. No Internet connection or bad quality of the connection.
2. The number of queries exceeded and you have to wait for the wttr.in server gets its permissions back to share the information from other weather services.

In the first case the widget will appear after connecting or improving the connection quality. If there is a delay between your logging in and connecting to the Internet you have to wait about 10 minutes for the widget to refresh automatically.

@kobaian I think the problem is that curl runs it's command before the toolbar has completely loaded. I tried it with sleep 1 and the weather still won't show.


2. The number of queries exceeded and you have to wait for the wttr.in server gets its permissions back to share the information from other weather services.

I get that sometimes when I left/right click on the weather report. I'll end up with a blank terminal window.
On my own customized tint2 panel I use another version of the weather widget. The executor's command:

Code: Select all

~/.config/tint2/executors/weather
runs the external bash script:

Code: Select all

#!/bin/bash

wtr=`curl -s wttr.in/?format=1 | awk '{print $1 " " $2}'`

if [[ $wtr != Unknown* ]] ; then
echo "$wtr"
else 
echo "😕 Oups!"
fi
It narrows the gap between the weather icon and temperature value and prevents displaying the annoying error message from the wttr.in server on the panel.
Desktop PC: Intel Core i5-4670K, Gigabyte H81M-S2PV, 16GB RAM, NVIDIA Quadro K2000. Laptop: MacBook Late 2008, Core2Duo 2.0GHz, 8GB RAM. Netbook: Asus EEEPC Intel Atom 1.6GHz, 2GB RAM. System: MX23 64bit/32bit Fluxbox.

User avatar
siamhie
Global Moderator
Posts: 3219
Joined: Fri Aug 20, 2021 5:45 pm

Re: mxfb-2025 development ideas

#143 Post by siamhie »

kobaian wrote: Wed Nov 06, 2024 1:48 am

Code: Select all


curl -s wttr.in/?format=1 | awk '{print $1 " " $2}'
It narrows the gap between the weather icon and temperature value

@kobaian Do you know if this would work in tint2's executor line?
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
i_ri
Posts: 1070
Joined: Tue Jun 30, 2015 12:26 am

Re: mxfb-2025 development ideas

#144 Post by i_ri »

hello
mxfb-menu-generator
AVLmxe did add a Wine Category.
Without Category Wine, the Wine apps are in Utility, mostly Other.
Also added Category Education. Pointed Category Science into Education.
Adding the two Categories count is up to 1..18 eighteen.
Works on mxfluxbox iso not showing empty categories; with those "remove empty" still commented out.

Thanks for taking paren() out of names. vivaldi (snapshot) now does not tangle the fluxbox menu. That was always a manual fix.
You do not have the required permissions to view the files attached to this post.

User avatar
kobaian
Posts: 365
Joined: Fri Jan 03, 2020 5:49 am

Re: mxfb-2025 development ideas

#145 Post by kobaian »

siamhie wrote: Wed Nov 06, 2024 10:26 am
kobaian wrote: Wed Nov 06, 2024 1:48 am

Code: Select all


curl -s wttr.in/?format=1 | awk '{print $1 " " $2}'
It narrows the gap between the weather icon and temperature value

@kobaian Do you know if this would work in tint2's executor line?
I don't know. You can try to precede it with the bash -c command, but I'm not sure what is the correct syntax when it comes to all the brackets and quotation marks.
Desktop PC: Intel Core i5-4670K, Gigabyte H81M-S2PV, 16GB RAM, NVIDIA Quadro K2000. Laptop: MacBook Late 2008, Core2Duo 2.0GHz, 8GB RAM. Netbook: Asus EEEPC Intel Atom 1.6GHz, 2GB RAM. System: MX23 64bit/32bit Fluxbox.

User avatar
Melber
Developer
Posts: 1201
Joined: Tue Mar 23, 2021 4:19 pm

Re: mxfb-2025 development ideas

#146 Post by Melber »

@Jerry3904 and any other workspaces users.
Any interest in a tool to manage workspaces?
241113_mxfb-workspaces.png

Script here for anyone who wants to take it for a test drive...

Code: Select all

#!/bin/bash

# mxfb-workspaces - Tool to manage workspaces for MX-Fluxbox
# Developed by Melber 2024 and released under GPLv3
# Version 2411-01

TEXTDOMAINDIR=/usr/share/locale 
export TEXTDOMAIN="mxfb-workspaces"
source gettext.sh

mxfb_workspaces () {

number_orig=$(grep "workspaces" $HOME/.fluxbox/init | cut -d: -f2)
number_orig=$(echo $number_orig | sed -e 's/ //g')

names_orig=$(grep "workspaceNames" $HOME/.fluxbox/init | cut -d: -f2)
names_orig=$(echo $names_orig | sed -e 's/ //g' | sed -e 's/,/ /g')
names_orig=($names_orig)

#TRANSLATORS Title text
TITLE="$(gettext 'MXFB-Workspaces')"
CLASS="MXFB-Workspaces"
ICONPATH="/usr/share/icons/Papirus/32x32/places/desktop.svg"

#TRANSLATORS Button label
export BTN_ABOUT=$(gettext "About")      ; BTN_ABOUT+='!help-about'
#TRANSLATORS Button label
export BTN_CLOSE=$(gettext "Close")      ; BTN_CLOSE+='!window-close'
#TRANSLATORS Button label
export BTN_APPLY=$(gettext "Apply")    ; BTN_APPLY+='!object-select'

#TRANSLATORS Window text
TEXT1="$(gettext 'Select the Number and Names of Workspaces')"

#TRANSLATORS Window text
fieldtext_0="$(gettext 'Number of Workspaces:  ')"
fieldtext_1="$(gettext 'Workspace 1 Name:  ')"
fieldtext_2="$(gettext 'Workspace 2 Name:  ')"
fieldtext_3="$(gettext 'Workspace 3 Name:  ')"
fieldtext_4="$(gettext 'Workspace 4 Name:  ')"


output=$(yad --title=$TITLE --class=$CLASS --window-icon="$ICONPATH" \
--width=400 --height=400 --borders=20 --center \
--form --separator="," \
--text="\n$TEXT1\n\n" --text-align=center \
--buttons-layout=spread --button="${BTN_CLOSE}":1 --button="${BTN_APPLY}":0 \
--field="$fieldtext_0":NUM "$number_orig!1..4!1!0" \
--field=" ":LBL " " \
--field="$fieldtext_1" "${names_orig[0]}" \
--field="$fieldtext_2" "${names_orig[1]}" \
--field="$fieldtext_3" "${names_orig[2]}" \
--field="$fieldtext_4" "${names_orig[3]}" \
)

case $? in

1 | 252)
    alldone="finished"
;;

0)

    number=$(echo $output | cut -d, -f1)

    if [[ $number == 1 ]]; then
        names=$(echo $output | cut -d, -f3)
    elif [[ $number == 2 ]]; then
        names=$(echo $output | cut -d, -f3-4)
    elif [[ $number == 3 ]]; then
        names=$(echo $output | cut -d, -f3-5)
    else
        names=$(echo $output | cut -d, -f3-6)
    fi

    names=$(echo $names | sed -e 's/ /_/g')

    number_old=$(grep "workspaces" $HOME/.fluxbox/init)
    number_new="session.screen0.workspaces: $number"
    sed -i "s/$number_old/$number_new/" $HOME/.fluxbox/init

    names_old=$(grep "workspaceNames" $HOME/.fluxbox/init)
    names_new="session.screen0.workspaceNames: $names"
    sed -i "s/$names_old/$names_new/" $HOME/.fluxbox/init

    fluxbox-remote restart

    alldone="notyet"
;;

esac

}

export -f mxfb_workspaces

until [ "$alldone" = "finished" ]; do
    mxfb_workspaces
done

exit 0

You do not have the required permissions to view the files attached to this post.

User avatar
Jerry3904
Administrator
Posts: 23054
Joined: Wed Jul 19, 2006 6:13 am

Re: mxfb-2025 development ideas

#147 Post by Jerry3904 »

That's very handsome--you're getting pretty good at that! I will take it for a spin, including on openbox.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
fehlix
Developer
Posts: 12607
Joined: Wed Apr 11, 2018 5:09 pm

Re: mxfb-2025 development ideas

#148 Post by fehlix »

Maybe have title quoted:

Code: Select all

 --title="$TITLE"
to cater for spaces in translated title.
Perhaps also do reload conky after "fluxbox-remote restart", to avoid visual artifacts,
propably send SIGUSR1 maybe enough to reload.
2p's

ThemetresAtrometos
Posts: 26
Joined: Fri Jun 14, 2024 4:08 pm

Re: mxfb-2025 development ideas

#149 Post by ThemetresAtrometos »

Include to the iso a small swap-file 16-32MB and eliminate any possible crash of any program.

User avatar
siamhie
Global Moderator
Posts: 3219
Joined: Fri Aug 20, 2021 5:45 pm

Re: mxfb-2025 development ideas

#150 Post by siamhie »

kobaian wrote: Sat Nov 09, 2024 4:16 pm
siamhie wrote: Wed Nov 06, 2024 10:26 am
kobaian wrote: Wed Nov 06, 2024 1:48 am

Code: Select all


curl -s wttr.in/?format=1 | awk '{print $1 " " $2}'
It narrows the gap between the weather icon and temperature value

@kobaian Do you know if this would work in tint2's executor line?
I don't know. You can try to precede it with the bash -c command, but I'm not sure what is the correct syntax when it comes to all the brackets and quotation marks.

@kobaian Works in terminal. I'll try it in tint2. wttr has been spotty lately for me.

wttr.jpg
You do not have the required permissions to view the files attached to this post.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

Locked

Return to “MX Fluxbox Official Release”