things i want to remember, things i want to share

Développeur Python et adepte Linux depuis 2005, passionné par beaucoup trop de choses. Profil Github

Entries tagged “wmii”

Switching to i3wm

written by tshirtman, on 2/17/14 12:15 AM.

I’ve been a wmii user for more or less 5 years, and until now although it was not much maintained anymore, i was unable to replace it with something else.

Last time i checked, neither awesome, i3, xmonad, or either of the few tiling WMs i tried, seemed to fulfill my needs, i wanted dynamic tagging of workspace, full keyboard navigation, and the same tag on all screen in a multiscreen setup (more on that later). So, although it had a few bugs, i decided that wmii was still the best thing out there.

Recently, hobbestigrou suggested me having a look at qtile, being in python, it would be easy to script and adapt to my use case.

I did look into it yesterday, and spent some time configure it for my use. In the end, i had most things working, although i wasn’t crazy about the window placement capabilities, and using the doc hadn’t been a thrilling experience.
The last standing point however was, the separate tag management per screen, but, at that point i was ready to give that a chance, considering i often pinned a window to all workspaces on the second screen (but not all the time).
So i decided to give a second chance to i3wm, considering it’s the spiritual successor of wmii, i may be more excited at the window placements.

And while it took me some time to wrap my head about the tree system of i3 (the split shortcut (Meta4+v) turned out to be quite important), i have to admit it solves all the limitation of wmii’s one, while avoiding the limitations of layout systems of other tiling managers.

Now, i3 doesn’t expose a dynamic tagging system out of the box, but it offers a nice cli api, and i found a blog post offering a good explanation on how to use it, i adapted it to make it slightly faster, but the idea stands.

I’m still a bit confined by the inability to share tags across screens, i gave myself a way to move a window/container from one screen, but it’s still a bit different. I won’t try to force i3 to see only one screen, as i did on my first try, because that caused all sorts of swampy issues, and it’s clearly not the way it’s meant to be used.

Other than that, it’s pleasing to see all the nice improvement of the window manager over its ancestor, it’s certainly way more pleasing to look at, and to configure.

Anyway, my configuration is now on github, for my own profit (easier to setup on multiple machines), and for the curiosity of others :).

Tip me if you like this :)

A no-mouse setup

written by tshirtman, on 1/25/14 1:01 AM.

As years passes, i find reasons and ways to touch the mouse less and less.

The reasons can vary from people to people, but the main ones for me are:

  • the need to move the arm often to use the mouse make inputing what i want much less efficient.
  • the hand position on the mouse is uncomfortable in the long run, and i tend to accidentally click just by having my hand on it (right clicks, often)
  • shortcuts are often more efficient, and always more satisfying

For the ways, one need to address all the needs with keyboard-friendly tools:

  • console tools are always keyboard driven, so they are good choices to start with
  • browsing is not usually a much keyboard-friendly activity, but browsers like uzbl, or firefox plugins like pentadactyl, makes it a lot better
  • window/program management/desktop environments, are usually very mouse-centered, but tiling windows managers are a breed that is much more keyboard-friendly.

My main work tools are vim and git, not gvim and some git interface, the straight console version of both, and it’s just great, most of the programs i use are command line… Except the browser, but as i said, i use pentadactyl, and it’s very rare to need a mouse at all with it. For the window management, i’m currently using wmii, but i’m looking for the next best thing, because it’s not actively maintained (yes i did look at awesome and i3, and they don’t suit me, tried to look at qtile tonight, but it doesn’t seem to want to work).

In some situations though, what’s needed is really a mouse, for most of these situations, i have a secret tool, that does a really great job: keynav, it took me quite some time to really learn it, and configure it properly for my need, but it’s really starting to grow on me, and touching the mouse really becomes exceptional.

I wouldn’t say it’s always more efficient, sometime i wish i had took the mouse already, but most of the time, it’s certainly more comfortable.

Tip me if you like this :)

une solution pour network manager sous wmii.

written by tshirtman, on 3/15/10 12:22 AM.

Je suis utilisateur de wmii, principalement sur mon eeepc, mais aussi sur mes posts fixes quand l’envie m’en prends, je trouve au tiling mode pas mal d’avantage au niveau productivité, et que wmii implémente bien l’idée. Hélas certaines choses sont problématiques, par exemple, la gestion du réseau avec network-manager pose problème, sachant que je me déplace beaucoup avec mon eeepc, et que j’utilise pas mal là 3G en interne, que nm gère très bien, il me fallait une gestion simple d’icelui (ouais ouais c’est un vrai mot, on voit ceux qu’on pas ouvert de vieux bouquins :P). Bref, ma solution actuelle, qui permet d’avoir accès à au tray, et donc à nm-applet, depuis tous les tags (équivalent des bureaux virtuels, est mise en place comme ceci…

1/ lancement de stalonetray et nm-applet en début de session:
dans .wmii/wmiirc, vers la fin: stalonetray& nm-applet& 2/ création d’un script stalemover dans $HOME/bin

#!/usr/bin/env sh
for i in $(wmiir ls /client/)
    if [ $(wmiir read /client/$i/props|cut -d':' -f1) = 'stalonetray' ]
        echo $1 | wmiir write /client/$i/tags
# pour repasser en mode normal, (sinon focus sur stalonetray, donc mode flottant)
wmiir xwrite /tag/sel/ctl select toggle
chmod +x $HOME/bin/stalonemover
3/ utilisation du script (différence sous forme de patch, vous pouvez le comprendre comme des humain, ou le donner à manger à la commande patch, et lui dire que c’est bien .wmii-3.5/wmiirc que vous voulez modifier).
--- /etc/X11/wmii-3.5/wmiirc	2009-01-15 23:25:18.000000000 +0100
+++ .wmii-3.5/wmiirc	2010-03-15 00:12:23.717918353 +0100
@@ -152,7 +152,7 @@
 	for i in 0 1 2 3 4 5 6 7 8 9; do
 		cat <<!
 	Key $MODKEY-$i
-		wmiir xwrite /ctl view "$i"
+		wmiir xwrite /ctl view "$i" && bin/stalemover "$i"
 	Key $MODKEY-Shift-$i
 		wmiir xwrite /client/sel/tags "$i"
voila, pas parfait, mais mieux que rien… pour les puristes qui refusent l’utilisation de la souris, j’ai deux trois petits alias avec cnetworkmanager, mais je m’en sert pas trop en fait…
alias cn="cnetworkmanager"
alias woff='cn -w false' # couper le wifi
alias won='cn -w true' #...
alias sfr='cn --activate-connection=,SFR,ttyUSB0 # 3G
# pour observer simplement ce qu'il y a comme réseaux dispos...
alias wi='watch '\''sudo iwlist wlan0 scan |grep -e "(ESSID|Qual|Enc)"'\'''

voila… stou pour l’instant, si vous avez mieux, n’hésitez pas à proposer ;).

Mise à jours: Il existe une solution beaucoup plus simple que j’ai découvert en passant à wmii 3.9, j’utilise maintenant trayer (avec “–width 2″ et “–edge top” pour le placer “–height 12″ pour régler sa hauteur.) et je lui attribue le tag +/^/ qui permet de l’afficher sur toutes les vues. pour ce faire j’ai ajouté une règle dans .wmii/wmiirc en dessous de celle pour MPlayer (voir la ligne avec “trayer|panel” ci dessous).

# Tagging Rules
wmiir write /tagrules < ~
/trayer|panel/ -> +/^/
Ça roule et c’est bien plus léger, de lus trayer est bien mieux controlable au clavier, il suffit de passer en mode flottant pour lui donner le focus et de déplacer le focus sur une ou l’autre applet avec les flèches du clavier, la touche entrée permettant de valider.

Tip me if you like this :)


#FIXME 3G absurd ad_sense alterway aléatoire android animation anonymity atheism bach backlog bash bitcoins blog blogging boldness book books boulot bricolage bépo C canvas captcha captures carte SD censure christianity chroot CLI cli cloudwatt code colors comfort zone command line community company life conferences contest copwatch copwatchnord-idf core-devs cours ct705 culture deb debian debug deformation dehors dessin dev distribute distribution débutant déploiement développement ebooks eeepad eeepc effect ego empty en escher event firefly flappy bird flask fosdem foss fr fun game garden gdb geek culture git github goals graphics grrr gödel hack hackathon hacked hacking hooks i3 images IMAP inspirational isync java jeu jeu video jinja2 jni keyboard keynav kivy kv lame learning lib libre life linux lol macosx magnet mail mailing-list mails maths mbsync meetings memory leak mesh meta mint mirroir MIT module motivational mouse museomix mutt nexus7 no-mouse notmuch nottoomuch offlineimap onycroit opencourseware osc packaging paris passphrase password patch pentacatyl people perte de données ping pip planning plugin positioning pr procrastination programmation progress project projet property proudhon proxy psf publisher/consumer pull-down pygame pyjnius pypi python pythonar qtile rapsberry pi reading recorder references release religion responsive review reviews réseau réseaux sociaux résurection salon screenshots script self service shows shutil shyness sizing solib sortie sousous!!! spam spritz stash status systeme système templating terminal texture texture coordinates Thomas Paine thread thème tiling time time management. tip tips tools transformer tutorial tv twitter typematrix typing ubuntu ubuntu-fr ultimate-smash-friends unity upload images useless usf utils value VDM video vie/mort vim virtualenv visite widget windows wm wmii work workflow workflow. zine études