regolith-linux / regolith-desktop

Meta package for the Regolith Desktop Environment
1.49k stars 31 forks source link

Create howto for i3 config to assign workspace to output #495

Open kgilmer opened 3 years ago

kgilmer commented 3 years ago

Based on request from https://github.com/regolith-linux/regolith-i3-gaps-config/issues/11

sr9992 commented 2 years ago

I was reading the docs for this on the Regolith Desktop 2.0 site (I'm running it on Ubuntu Jammy), but I'm not sure they're correct. I added

workspace "$ws1" output DVI-D-0
...

to my config, but I get

ERROR: CONFIG: Line  83: workspace "1:<span font_desc="BitstreamVeraSansMono Nerd Font 12"> 1 </span>" output DVI-D-0
ERROR: CONFIG:                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

when I log in. Seems like a quoting problem? Interestingly, if I restart i3 using the keybinding or reload the config, I don't get the error, and the workspace assignments all work correctly! But they don't seem to work on a fresh login...

tstrijdhorst commented 2 years ago

I'm having the same issue as @sr9992 . Any news on this? If i use refer to the workspace by number I get the problem of duplicate workspaces mentioned in https://github.com/regolith-linux/regolith-i3-gaps-config/issues/11

After some time I found a workaround. As mentioned in another PR the problem is the Pango directives in the name are not properly escaped somehow and using the workspace name variables will thus create a syntax error.

Easiest way around this is to rename the workspaces in your Xresources file like so: i3-wm.workspace.01.name: test

After that you can refer to it by $ws1 and use the config like you specified.

dashmage commented 1 year ago

After trying the workaround mentioned by @tstrijdhorst , I was facing some issues with i3-next-workspace. After messing around a bit, I found another workaround by renaming the workspace in my Xresources file with the name of the workspace that you see in the i3 error logs but replacing the double quotes with single quotes.

For example, I had to add this line in my Xresources file: i3-wm.workspace.01.name: 1:<span> </span><span font_desc='SauceCodePro Nerd Font Mono 9'>1 </span><span foreground='#e6e1cf'></span><span> </span> I changed the double quotes to single quotes for the font_desc and the foreground properties and this seems to allow i3-next-workspace to function properly as well.

Hopefully this helps people facing similar issues!

limefrog-the-genuine-one commented 9 months ago

Hi,

does the howto for i3 config to assign workspace to output already exist? Where can i find it? Btw: I'm also in search for a howto for the assignment of application to workspace.

The aim is to permanently fix an application to a physical screen, surviving logoffs and reboots.

Regards

limefrog-the-genuine-one commented 9 months ago

I found a solution, but still have a question.