I3 questions on audio, workspaces, exec that don't work

(1) I have restarted i3 on a few occasions that have caused the volume level DISPLAYED in i3-bar (volume-pulseaudio) to be 100%. This is also shown in the window that pops up when clicking, which I assume is pavucontrol? HOWEVER, volume is exactly what it was BEFORE restarting, more like 45%.

Is there an easy way to “reset” pulse-audio or pipeline or whatever is actually running in the audio system? (Sorry, I really don’t understand the audio setup, and it seems like a lot of reading to get to that point. Too many names, and they all seem to be installed in /usr/bin/. I will someday, promise! LOL)

Note: I have EasyEffects installed and running.

(2) A few i3 config items that didn’t work. These don’t have the desire effect in the i3 config file:

exec --no-startup-id sleep 3 && thunar && /usr/bin/thunar /home/tom/.config

exec --no-startup-id sleep 9 && /usr/bin/librewolf, move window to workspace $ws9

Do these need to be handled with i3-msg?

(3) I have been writing a script to do various things in i3, and one of those things needs the script to go to workspace 4. Here is the line from the script:

i3-msg 'workspace 4'

This moves the focus to a SECOND workspace 4, I presume because workspace 4 has a name from this line in the config file:

set $ws4 "4:ICON"

The word ICON is not used, rather, it is a glyph from font awesome for spotify. I cannot get that glyph to paste into this editor.

How do I move to workspace 4 in the script? Using $ws4 in the script doesn’t work, nor does creating a variable IN the script called $ws4 as the i3-msg seems to ignore bash variables. I’m sure there is a way around that, but I don’t know what that is. Or is it the glyph that is causing the problem?

Thank you very much for your assistance. I’m loving i3 and EOS!

exec --no-startup-id sleep 9 && /usr/bin/librewolf, move window to workspace $ws9

looks screwed… you should first try exec lines from terminal manually and you will see if they work… but this one will not work as /usr/bin/librewolf, move window to workspace $ws9 is not a working command …

check what you currently run:
inxi -Aa
up from Atlantis we are using pipewire per default to reset you can simply remove the settings:
rm -R ~/.config/{pipewire,pulse}
rm -R ~/.local/state/{pipewire,wireplumber}
and log out back in or reboot…

move window to workspace $ws9

what you want to configure is perhaps to bind librewolf to open on ws9 automatically?
this needs a bind line in config like this:

assign [class="librewolf"] $ws4

where librewolf must be the window class of the librewolf window:
the commandline tool xprop can help finding it (package xorg-xprop)
It will show a cross sign as your mousecursor and when you click on the librewolf window it will output window information:
the second entry in this line should be the one you need:

Thanks for the reply. I’ll use inxi to double check, I’m pretty sure the setup uses pipewire + pulse. Clearing the configs should do the trick for the audio!!

As for the question about moving a window, there were 2 separate issues. I think I see the first one, and yes, I could assign librewolf to a workspace, but I only want to do that on occasion. I remember seeing a something in the i3 docs that related to that, I’ll have to check that again. If I find it, I’ll let you know!

The main question

It concerned how to use i3-msg in a shell script to move the focus to a workspace if the workspace has a name. And specifically, a name with an ICON in it!! I cannot get a BASH script to work with the line I mentioned, this one:

i3-msg 'workspace 4'

And my testing seems to indicate that this does NOT work because my workspace 4 has a name, and that name has an icon in it, like how the EOS i3 config has workspaces 1-5. The icons seem to create a problem when using i3-msg run from a shell script.

What’s probably best is if I simply tell you what I am trying to accomplish:

  1. I want to open 3 applications on i3 startup.
  2. I want all 3 applications to open on ws4.
  3. I want them all to be in a tabbed window together.

I have a feeling that the easiest way to accomplish this would be using i3-save-tree and edit the .json layout and append. HOWEVER… I can’t make that work because it requires this line if run from a script:

# From a terminal or script:
i3-msg "workspace 4; append_layout /home/tom/.config/i3/workspace-4.json"

And that goes right back to the “workspace 4:” problem.

The i3 docs give this as an alternative, setup in the i3 config file:

# In your i3 configuration file, you can autostart i3-msg like this:
# (Note that those lines will quickly become long, so typically you would store
#  them in a script with proper indentation.)
exec --no-startup-id "i3-msg 'workspace 4; append_layout /home/tom/.config/i3/workspace-4.json'"

I hope this will work since I can substitute $ws4 for workspace 4.

Do you have any idea why the workspace with a name/icon won’t work in a shell script? I’d really like to figure this part out as i3-msg offers a lot of functionality when run from a shell script.

Thank you for your help. And… a BIG thank you for the i3 EOS version. You left so many hints and tips in the config file that it has been pretty easy to modify to my liking with the help of the fairly good i3 docs. Its just these little tricky bits that are hard to figure out.

Cheers!.. Tom