Containerizing Apps, and Fun with Window Managers

You should really try out zsh and tmux combo, wild auto complete of commands and persistent across sessions. Even resumes vim edts etc. where you left off between reboots. As well as of course resume sessions across ssh etc.

6 Likes

Mosh is also a great little accessory for ssh if you have to deal with intermittent connections (or putting your laptop into sleep), changing ip addresses, or just a bad line.

2 Likes

I am indeed trying out zsh but I fell into the assumption that it might just be bash with some extras. Somehow I was thinking that it might just read my .bashrc and wala I’d be in business. But it looks like it does enough things differently that even something as seemingly simple as customizing my prompt is going to take more time than I can spare. I’ll have to make do with bash and its history search (which I like a lot).

Never mind, I did actually accomplish exactly what I wanted, without stupid plug-ins and “themes”, by apppropriate editing of the .zshrc file. Spot the difference:

This is my BASH prompt:

…and now this is my ZSH prompt:

The $ or % is to indicate that the current shell is BASH or ZSH respectively.

The line in .zshrc is:

 PS1="%{$fg_bold[green]%}%n%{$reset_color%}@%{$fg_bold[green]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%}%% " 

I am very happy now (small things… lol).

3 Likes

You’ve persuaded me to put zsh on my to-try list. I’ve use fish a little, but it just didn’t flow like bash does, which I use at work too. xonsh is on my to try list when it matures a little.

tmux is just sooo useful, I can’t believe I took so long to try it. i3 is super for organising desktop workspaces - far better then Unity or Gnome 3 or any other DE can do, though for simplicity I use Gnome 3 at the moment.

I love trying out these kind of tools, but its a matter of making gradual additions and changes to my work flows.

2 Likes

Posted this already in the test6 topic but noticing this topic again I’ll put the link here too for the ones interested in running docker vaults

https://drive.google.com/open?id=0B_mtw8Pliij6dFJvSjNlVFZ0ZzQ

you can check the chksum of the binary yourself if you want…

safe_vault/0.10.4

2 Likes

OK, I’ve been working with i3 on-and-off for a week and I’ve decided to drop it. Here’s why, in order of importance:

  1. I took stock of what I’m trying to accomplish and concluded that I already have a powerful, comfortable, very familiar, and (for me) efficient environment for development and administrative work: Debian stable plus KDE. It is way more than sufficient for learning programming. And there’s the rub: I had to confront the fact that I was procrastinating in getting down to productive work, and instead spending long nights tinkering with my environment. Enough of that!

  2. Software tools should be a natural fit for their purpose and their environment. The two environments I move in are: local, general-purpose computers that have more than enough resources to run a desktop environment (DE), and: “headless” computers that I reach via a terminal session such as SSH. That includes my cloud server and any embedded/special purpose/minimal sort of devices such as CHIP or Pi. i3 is actually not intended for headless computers since it uses xorg. It is instead clearly intended to supplant the DE on machines that are capable of running a DE. But avoiding a DE, when you don’t have to, in order to pretend that you’re at a terminal, and avoiding the mouse, is simply perverse.

  3. For headless computers, or any command-line environment, there is already a powerful tiling window manager: TMUX. It works brilliantly to set multiple processes running on a remote machine, and come back weeks later and they’re still running.

  4. Speed: a tiling window manager might be faster than a DE but really the the overall speed is set by the human component and subjectively it’s unimportant.

  5. You have to have a file manager, wherever you are for long-periods. KDE’s Dolphin file manager is probably the best there is, and as good as the equivalent on Windows and OSX. By contrast, the best choice on i3 for keyboard-only use is Midnight Commander, which really isn’t very good at all. It was while contemplating the inadequacy of Linux file managers* for (pseudo) terminals that “the penny dropped” for me, and I asked myself, why am I doing this?

  6. I have learned a couple of things from this experience: The multiple “workspace” concept is something that I now apply to my DE (called “virtual desktops” in KDE) where in the past I just had one desktop with a heap of overlapping windows. I currently have one virtual desktop with a browser session, using tabs rather than separate windows, a second for coding, and a third with tiled console sessions. Once I replace my second (dead) monitor, I’ll send one of the virtual desktops to that.

* Speaking of file managers for terminals, one might come across the excellent Far Manager, which, alas, is only available for Windows!

4 Likes

Last week I was also changing from bash away but oooh no no !
Indeed Maybe some years later but for now it is ok, not going to lose my time on that. I’m even no bash guru, so was thinking by myself: “wtf am I busy?”.

Try ranger, fast simple and works a treat. I alias it to f

2 Likes

Why isn’t Dolphin the best file manager for i3? I mean, i3 does help doing a bunch of stuff with the keyboard, but it doesn’t cut the mouse cable :joy_cat: But yea, everybody has a different style, no problem with that.

Because I could not manage to navigate in Dolphin using keys alone. :slight_smile:

I had a look at Ranger, which I concluded was on a par with MC. They are there if I’m in a terminal session and need to quickly move around in a directory tree, but I don’t want to be forced to use them for hours at a time.

Concerning Dolphin in i3, though, it is like the use of picture management apps* in i3: They have one wondering why, why I am I using a graphical application in what is supposed to be a “terminal” environment? (and don’t touch that mouse, or a lightning bolt will strike you).

* By the way, ever notice that all picture managers in Linux kind of suck? I cannot find even one that has the simple functionality of Irfanview (Windows) where you hit enter to make a windowed picture full-screen (truly full-screen, not a little picture surrounded by black screen!) and enter again to return it to a window.

1 Like

Geeqie is probably what you’re looking for. Double click the image, and it is full screen. You can switch images with arrow keys while in full screen. Pretty nifty for sharing pictures with friends and families.

1 Like

Wait, I really don’t understand… Can you navigate Dolphin with keys when using KDE? If not, then I don’t see why it is a problem with i3 specifically :smirk_cat:

I don’t believe there’s a “supposed” in anything in life :smiley_cat: Convictions about meaningless things are expensive to maintain :smirk_cat: Whatever works best works best, simple as that.

I use my mouse whenever I need to, but I need it less with i3: I can switch to my browser with Meta+3 because I keep it on my 3rd screen, my tmux terminal on the 2nd screen (Meta+2), my 2nd terminal on the 9th screen (Meta+9), my editor on the 1st screen (Meta+1, obviously), and so on. Also, I can put a window on the 5th screen with Meta+Shift+5, etc…

The main benefit for me is that context switching has near zero overhead now.

I tried Geeqie and it does not do that for me, despite my adjustment of the settings in preferences.

EDIT: That is, pressing Enter does nothing, arrow keys do nothing (you use space and backspace to change pictures) and “full screen” will maximize some pictures (to the top and bottom edges of the screen) but leave a large black border around others (i.e., the radio button in preferences to “fit image to window” has no such effect). Perhaps these limitations are due to its using the GTK libraries (I’m in KDE), so I’ll logout and try it in i3.

EDIT1: OK I’m back and here’s what I found in i3: Geeqie behaves exactly the same so it isn’t an artefact of KDE. You can go to full screen with “f” (picture has a wide black border) and then maximize the picture with “h” (“fit horizontally”) or “w” (“fit vertically”, go figure) but that has to be done with each subsequent image that you go to, and if you backspace to the first image, it is no longer maximized. Conclusion: it is not very good because it forces you to learn yet more shortcuts and its viewing options are not persistent.

What I said: I can’t navigate Dolphin with keys alone. That’s in KDE. Is there any reason to think it would be different in i3? It is not a limitation of i3, but of the keys-alone paradigm intrinsic to a tiling-windows manager such as i3.

Well, sure, but then the same is true of a DE: you can tile some windows, have two or three “workspaces”, have terminals open where appropriate, and indeed, be using an editor such as Vim where keys alone (once you come up to speed) is more ergonomic.

Haha but that’s what I’m saying: there’s NO such paradigm; wouldn’t it be utterly idiotic to restrict my options for no reason whatsoever? (other than some purist pride, which is … well, utterly idiotic)

Whatever works works, and that’s all that matters. And if something works better, I’m sure hooked. That’s what I mean by that convictions are usually useless (that is, outside of moral fundamentals that one wants to keep themselves for life, which I believe is very important, but I’m digressing :joy_cat:)

… aaand that’s exactly why I switched: because I noticed that I spent too much time tiling my windows and suddenly remembered: “hey, I saw a thing that would do it for me!”

So, that was it :heart_eyes_cat:

1 Like

Powerful Image Viewer· XnView MP | XnView.com maybe this one fits your needs…
It’s somewhat like ACDSEE for windows …

1 Like

Thank you! That’s one I hadn’t seen. After adjustment of a couple of settings it does everything I was after, even including the ability to crop a picture by dragging to drawing a square with left mouse button. I’ll use it as my default viewer from now on.

1 Like

safe_vault_0.10.5 docker image 12.6MB

https://drive.google.com/drive/folders/0B_mtw8Pliij6dFJvSjNlVFZ0ZzQ

2 Likes