qubes-issues
qubes-issues copied to clipboard
qubes-i3status - json invalid
Qubes OS release
R4.2, testing repositories, latest update
Brief summary
after a dom0 update today, "qubes-i3status" started to generate invalid json causing issue with the i3 bar
The result of amixer sget Master
in dom0 has changed.
The AWK command doesn't retrieve the correct thing now https://github.com/QubesOS/qubes-desktop-linux-i3-settings-qubes/blob/main/qubes-i3status#L138 (and it match multiple line, so it add control character in the json, making it invalid.
Didn't had time to check what got modified
I usually have to make a local copy and edit it. Currently, I have:
local volume=$(echo "$volcmd" | awk '/%/ {gsub(/[\[\]]/,""); print $4; exit; }')
local playback=$(echo "$volcmd" | awk '/%/ {gsub(/[\[\]]/,""); print $7; exit; }')
Been that way for years.
I also have some tweaks so that the volume change feedback is more responsive. Once the volume changes, it goes to polling volume once per second, so you can hit UP and wait for it to register, then you can hit UP each subsequent second.
Here's the main loop. you still have to wait up to 5 seconds for the first volume change to register, but then it becomes more responsive.
main() {
echo '{"version":1}'
echo '['
echo '[]'
local n
local vol_mod=1
local last_vol=''
for ((n=0; ; ++n)); do
if (( n % 10 == 0 )); then
local qubes=$(status_qubes)
# network status disabled by default as it's dangerous to run a
# command on a qube from dom0
# local net=$(status_net)
local disk=$(status_disk)
local bat=$(status_bat)
local load=$(status_load)
fi
if (( n % ${vol_mod} == 0 )); then
local volume=$(status_volume)
if [[ ${volume} == ${last_vol} ]]; then
if (( ${vol_mod} < 5 )); then
let vol_mod+=1
fi
else
last_vol=${volume}
vol_mod=1
fi
fi
# echo "n: $n vol_mod: $vol_mod last_vol: $last_vol vol: $volume"
local time=$(status_time)
echo ",[$qubes$disk$bat$load$volume$time]"
sleep 1
done
}
In my i3 config i changed status_command to "qubes-i3status 2> /dev/null"
@daktak @neowutran @BetoHydroxyButyrate - Thank you for testing i3 on Qubes and offering potential solutions. Your work and knowledge helped me fix this issue and increased my knowledge in several areas.
Ok, my errors stem from the 4.2 update causing issues with my sound
Updated qubes-i3status with below
volcmd=$(pactl list sinks)
local volume=$(echo "$volcmd" | grep Volume | awk '/%/ {gsub(/[\[\]]/,""); print $5; exit; }')
local playback=$(echo "$volcmd" | grep Mute | cut -f 2 -d \ )
if [[ $playback == yes ]]; then
@andrewdavidwong Any updates here? I hope that will get fixed soon. I never used testing releases but instead of important information (like date, time, battery, volume etc) my whole status bar just shows this big red json format error and that already since this issue exists (so over two months).
@andrewdavidwong Any updates here? I hope that will get fixed soon. I never used testing releases but instead of important information (like date, time, battery, volume etc) my whole status bar just shows this big red json format error and that already since this issue exists (so over two months).
This is absolutely not a priority. Feel free to fix it and open a PR.
I leave that to @daktak @BetoHydroxyButyrate as they are familiar with the code and already proposed some solutions.
I took some extra time for reworking the whole in Python. Feel free to test it, give me some feedback before we merge it please.
Tested qubes-i3status.py on my side, work fine. For a future update probably need to find a way on how to handle "audiovm" once it is officially supported
For a future update probably need to find a way on how to handle "audiovm" once it is officially supported
Please open a separate issue for that.
Automated announcement from builder-github
The package desktop-linux-i3-settings-qubes
has been pushed to the r4.3
testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list
by uncommenting the line containing bookworm-testing
(or appropriate equivalent for your template version), then use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
Automated announcement from builder-github
The component desktop-linux-i3-settings-qubes
(including package desktop-linux-i3-settings-qubes
) has been pushed to the r4.3
testing repository for the Fedora template.
To test this update, please install it with the following command:
sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing
Automated announcement from builder-github
The component desktop-linux-i3-settings-qubes
(including package desktop-linux-i3-settings-qubes
) has been pushed to the r4.3
testing repository for the Fedora template.
To test this update, please install it with the following command:
sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing
Automated announcement from builder-github
The package desktop-linux-i3-settings-qubes
has been pushed to the r4.3
testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list
by uncommenting the line containing trixie-testing
(or appropriate equivalent for your template version), then use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
Automated announcement from builder-github
The package desktop-linux-i3-settings-qubes
has been pushed to the r4.2
testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list
by uncommenting the line containing bookworm-testing
(or appropriate equivalent for your template version), then use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
Automated announcement from builder-github
The package desktop-linux-i3-settings-qubes
has been pushed to the r4.2
testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list
by uncommenting the line containing trixie-testing
(or appropriate equivalent for your template version), then use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
Automated announcement from builder-github
The component desktop-linux-i3-settings-qubes
(including package desktop-linux-i3-settings-qubes
) has been pushed to the r4.2
testing repository for the Fedora template.
To test this update, please install it with the following command:
sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing
Automated announcement from builder-github
The component desktop-linux-i3-settings-qubes
(including package desktop-linux-i3-settings-qubes
) has been pushed to the r4.2
testing repository for the Fedora template.
To test this update, please install it with the following command:
sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing
Automated announcement from builder-github
The package desktop-linux-i3-settings-qubes
has been pushed to the r4.2
stable repository for the Debian template.
To install this update, please use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
Automated announcement from builder-github
The package desktop-linux-i3-settings-qubes
has been pushed to the r4.2
stable repository for the Debian template.
To install this update, please use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade