📜 ⬆️ ⬇️

Subtle - tiling window manager in ruby

First, let's find out what “tiling window manager” is.

Vicki tells us:
This is the X Window System's window manager, which divides the screen's workspace into mutually non-intersecting rectangular areas — frames. Each frame is used to display information by a separate application, as opposed to traditional window managers, who create regions in a coordinate-by-layer and layer-by-layer manner (“window”), trying to follow the “desktop” metaphor. In addition to making full use of the entire visible space, the approach of frame window managers allows minimizing mouse use in window operations, mainly using various keyboard combinations, thus reducing the time spent on performing routine operations and increasing work efficiency.

It sounds delicious and I decided to try it. He took Xmonad on the advice, and the following came out of it.

I liked Xmonad by description. Its configuration options were captured (I’ll say right away that I didn’t want to use xmonad + anything, just pure xmonad). Having fiddled with him for several days, I was a little upset ... Well, I can not make such a config that I need without knowing haskell'a. And then the idea came up - and what if you search the same thing only on ruby. And, about a miracle, it was found - subtle .
')
So, let's try to get this miracle on debian'e (apt-get install subtle for the lazy, but I’m interested in the version from the developers repository + so as not to litter the system).

To begin with, I’ll tell you what attracted me to this WM.

1. Familiar YP (ruby)
2. ruby> = 1.9 (lo and behold!)
3. Unlike xmonad, it is manual (i.e., it does not itself think how to arrange the window)
4. Well, very small
5. In the standard package, there is already a panel (by default, the list of desktops + the name of the active application + tray + place for sublets (sublets - see below).

For tests, I used VirtualBox + debian sid, for this and tell you how to get this miracle in this configuration.

1. We put Debian without any graphical interface.
2. apt-get install mc vim-nox htop ruby rake slim xserver-xorg mercurial build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion libx11-dev pkg-config libxrandr-dev libxinerama-dev libxpm-dev libxft-dev (The list of packages invented by me is dependencies subtle + X11 + desktop manager + some useful programs )
3. Install rvm
4. rvm install 1.9.3
5. rvm use 1.9.3 --default
6. gem update --system
7. gem update
8. gem install archive-tar-minitar
9. hg clone hg.subforge.org/subtle && cd subtle
10. rake prefix=~/.subtle sysconfig=~/.subtle/etc install (put everything in the home directory so as not to litter the system)
11. echo "export PATH=$HOME/.subtle/bin:$PATH" >> ~/.bashrc
12. echo "exec ~/.rvm/bin/rvm-exec ~/.subtle/bin/subtle --config ~/.subtle/etc/xdg/subtle/subtle.rb" > ~/.xsessionrc
13. /etc/init.d/slim start

That's all. As a result, we get a fully functional gui eating quite a bit.

Here is a screen of what happened (running - sakura (terminal emulator) + htop):


All settings in ~ / .subtle / etc / xdg / subtle / subtle.rb. You can also install additional things in the panel (sublets - something like gems, use their package manager sur). They will automatically be added to the right corner of the panel (for example, clock (sur install clock), weather, etc.)

PS In general, the article was published as “I PR” + “how to” (and I thought that it would be much more interesting and interesting: /), so ask questions and I will try to add to the article (well, or how to call it ...).

Source: https://habr.com/ru/post/134800/


All Articles