Beta i3 window manager - help us come up with a cool config!


___

Advanced Member
Joined
Jan 31, 2006
Messages
3,376
Hello people!

I am a huge fan of i3-wm. I have always wanted it on the pandora and could never get it compiled. A while ago I thought I'd try again and only got to a certain point of the build. ptitSeb has now compiled binaries for us and I would love to package this as a pnd.

If you like i3/tiling window managers, please contribute and test it out.

We do not have dmenu working on the build and there is no status bar as of yet.

To do:
- integrate dmenu with pndlib so that it gets all installed pnds. This has been done already, we just need to get it into this installer.
- compile and configure polybar. Polybar is a lot more fun compared to i3status. We will be able to switch wifi/usb host/screen brightness and whatever may come in handy with this.
- get a nicer terminal integrated than xterm. I was thinking about using termite, which is very modern, let's you switch to a command mode where you can use vim bindings and other neat things (style with css, blindingly fast, fully xterm compatible etc).
- more library path problem. can't call i3-msg right now as it can't find "libxcb.so.1"
this needs to be fixed to properly exit i3. The gui.conf entry shouldn't have to call "killall i3" but instead use "i3-msg exit" to send it the proper exit signal.

Binaries are here:
http://ptitseb.openpandora.org/i3.tgz

Most of the stuff from the archive isn't needed. The files from bin can go into /usr/bin.

The libraries can go into /usr/lib/i3
I wouldn't recommend copying into the lib folder, use a subfolder so you can remove it more easily. Also I bricked my pandora overwriting libraries without using a subfolder.

edgex004 already figured out a great way to get everything going.

After all files have been copied, make a new script "i3startup" in /usr/bin:
Code:
#!/bin/bash
export XKB_CONFIG_ROOT=/usr/share/X11/xkb
export LD_LIBRARY_PATH=/usr/lib/i3:$LD_LIBRARY_PATH
i3
Don't forget to chmod +x the script, so that it can be executed.

Get the standard config from the tar archive, it's "etc/config" and copy that to your home folder into a new directory to ~/.i3/config
In that file I recommend you change the terminal that is being opened by pressing Mod1+enter to xterm for now. And find the line which is used to exit i3 (should be the keycombo Mod1+shift+enter) and delete the whole line after "exec". Then replace exec with exit. Now you can actually exit back into xfce4 if you get fed up.

And then to get it all into the switchgui menu edit /etc/pandora/config/gui.conf and add the following:
Code:
i3;i3wm tiling window manager;i3startup;killall i3
 
Last edited:
PND's should already be integrated once dmenu is installed. Since PND's show up as desktop items, you can use i3-dmenu-desktop (included already with i3) or j4-dmenu-desktop, which is a lot faster.
 
So I've noticed a weird bug. I suspect it might be coming from me moving the Cairo libs from ptitSeb's build of i3 onto my NAND, and that messing up GTK based apps. Apps such as Netsurf, Thunar, and Comix all have problems scrolling either up or left. Qupzilla is not affected.

It seems like when you scoll up, for example, the 2D libs are supposed to shift the visible window down, render the newly visible area, and insert that at the top of the window. However, instead of adding the newly visible area once, it repeatedly pastes the new portion all the way down the visible window. I'm posting an example from Thunar.

Any ideas, @ptitSeb ? I'm assuming I just need to revert to the version of Cairo from the opkg repo.

170704-195846.png
 
OK I absolutely want this on my Pandora. Hopefully it's easy to fix the remaining issues.
 
I am writing an install and uninstall script right now. Almost done, just need some more testing.

Then I'll get to include some components like j4-dmenu-desktop and a bar. Right now I have yabar compiled and ready to go.

I can't compile polybar as it fails because of gcc7. Apparently a flag must be set somewhere to disable fallthrough warnings being treated as errors. Should be something like "-Wimplicit-fallthrough=0" and disabling -Werror from being set. I can't for the life of me figure out how to correctly do that in the Makefile. There is a json file that's being generated by cmake with all files and their compiler options but even setting it there doesn't seem to work :( maybe someone more apt might be able to compile polybar?
 
I definitely plan to use this as soon as there's a working bar! I just need to be able to see the battery level.
 
I have build rofi and j4-dmenu now. Rofi seems like an awesome alternative as it incorporates a lot of cool other functionality but I have to experiment with it

@Silent-Hunter: I am trying to push out a working collection of i3 and utilities today, pretty close actually. Would appreciate it if you could hack around with the configs and share then.

Thought that it would be cool to have i3 operate in tabbed mode by default on the first workspace and stacked mode on the second.

Keyboard layout should use shoulder buttons for workspace switching and having the pandora button as modificator would be cool. any idea how to do that? Alt works for now as mod1 though.
 
I was able to make the r shoulder button do the tab switching, but it required me to use xmodmap to map r-control to Mod1 and leave l-control mapped to Control. I also had to "set $mod Mod1". I couldn't find a way to map the mod button to control instead of alt/Mod1, but perhaps you could try "set $mod Control" instead and leave xmodmap alone.
 
well I can't get anything to work quite right. yabar isn't starting apparently because of missing symbols "cairo_xcb_surface_create" and rofi won't start because of missing symbol "sn_xcb_display_net".

Dmenu won't compile because of a missing X11 include... I am getting a bit fed up for tonight. I'll package up what I have so you can have a go.

EDIT: Tried running yabar from codeblocks cli inside i3 and that works. I guess it's using the correct libraries of cairo then. No idea what I can do to fix this, setting LD_LIBRARY_PATH doesn't work for me here :(
rofi fails because it cannot create a cache file apparently. I wonder if I need to provide a path for it to do that somehow.
 
Last edited:
I don't actually know how to set a mode on start, I usually use the default, and change to stacked when I need to. I can give what you've got a try though.
 
EDIT: Tried running yabar from codeblocks cli inside i3 and that works. I guess it's using the correct libraries of cairo then. No idea what I can do to fix this, setting LD_LIBRARY_PATH doesn't work for me here :(
rofi fails because it cannot create a cache file apparently. I wonder if I need to provide a path for it to do that somehow.

Mmmm, maybe there is a hardcoded "/mnt/utmp/codeblocks/usr/lib" path somewhere. Try to run it on a standard cli, but but with codeblocks mounted to see if it makes a difference?
 
Okay I am having problems with the library path. For some reason it doesn't stick when I set it in my i3startup script. If I execute it inside i3 in a terminal and then run yabar/rofi it now works. but once I have opened another terminal the env variable again needs to be set. What am I doing wrong?

Here is the zip of all my stuff so far. DO NOT USE THE REMOVE SCRIPT YET!!!! It has not been tested thoroughly. The installs script should work though.

rofi seems very cool as a drop in replacement for dmenu, but it doesn't find the desktop files in dmenu mode yet, no idea why. Yabar looks like crap with the default config, as the necessary fonts have not been installed yet. Also the config file isn't right for yabar. It needs some proper editing to get all the sensors right.

For yabar to work at all, a config file must be created in /home/$USER/.config/yabar

Cheers!
[doublepost=1499633739,1499633624][/doublepost]once the library path crap is sorted out, next step is to find out why yabar doesn't want to start on i3 start. I appended "exec yabar" to my i3 config file but the bar doesn't appear. Maybe I am too tired right now... if I run it from a terminal the bar comes up.
 

Attachments

  • i3-yabar-rofi.zip
    5.7 MB · Views: 293
@edgex004 that works perfectly. However I can still not set a bindsym in i3 config that executes this command. Tried quoting the command first and then using a shellscript but that doesn't change anything. LD_LIBRARY_PATH will need to be set in .bashrc on install I guess, found no other way. As /etc/ld.so.conf isn't there, I am not sure we should create that.

Any idea why autostarting things like yabar and executing rofi on keypress doesn't work as expected? It's driving me nuts... so close to a working release!!!
[doublepost=1499680410,1499677687][/doublepost]this sucks, I can't get it to work... piping the output of stderr of rofi shows that it still cannot find the correct xcb lib and thus throws an error. Declaring LD_LIBRARY_PATH in bashrc obviously only does work for shell input here and not for using the exec command. I don't get it. I am guessing this is why yabar does not start when executed from config file aswell...

What to do?
 
I'm not sure if it helps, but beware to not mix bash and sh shell, so change all your script to use "#!/bin/bash", or you LD_LIBRARY_PATH may get ignored.
 
I think all my scripts are targeting /bin/bash but I'll check. Thanks @ptitSeb
Could it be that some part of SuperZaxxon overrides the LD_LIBRARY_PATH? I wonder why the commands work from a terminal after setting the library path in .bashrc but still can't use the env variable when they are executed by i3. I could just clobber all old libraries in /usr/lib instead of using a subfolder but I am sure that would ruin the system. What else could I try?

ADDITIONAL INFO: Apparently i3 calls $SHELL -c <your command> to execute commands. That points to /bin/bash as it should, though.

EDIT: I have it working now by passing the library path in the exec command in i3 config. Rather unelegant solution but works for now.
bindsym Mod1+d exec --no-startup-id LD_LIBRARY_PATH=/usr/lib/i3 rofi -modi drun -show drun -i
 
Last edited:
Nice! What are your plans for setting the background? I was thinking of using nitrogen, same as the openbox pnd.
 
Back
Top