@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

20 January, 2020 - Call it Minimal Tech!

Now I've encountered an issue regarding my journey into Minimal Tech. I can't clearly describe, what do I mean by "Minimal Tech". So, I would like to make this clear to everybody, and my in the first place.

By telling "Minimal Tech" I mean those tools that can give you most possibilities by requiring from you the least resources as possible. This includes computer resources (like CPU clock speed and amount of RAM), person resources (time, mind possibilities) and money.

For someone, this statement is a bit incompatible with things I've been writing about before. It is not. Because most of tools you learn that work the UNIX-way are meant to last. Most of the tools created to follow those concepts are able to last for longer, because they were created to integrate with each other. So you can adapt new possibilities and tools without abandoning previous ones, but instead use them together, which gives you less requirement to learn how to use computers over and over again. And they still fast, because, duh, nobody rewrites them in JavaScript, so you can save on buying new expensive computer (you can even use RaspberryPi 3, which is really cheap nowadays!) or even just use the phone.

Moreover, investing time in more minimal tooling is actually better than investing it into some "App", because you will actually learn once, and will no longer need to learn how to achieve basic tasks, because the ways of achieving them don't change as much as it change on the world of "normal people". For example, knowing vim by heart allows me almost as productive with vim, as with an IDE (without completion or tagging or any plugins more complicated than NERDTree and vim-surround).

This path can feel a bit hard for some time. Because when you switch from the "easy to use" Windows, or OSx or ________________ (place your "easy-to-use" operating system here), you have to find the way of doing things your way. There will be nobody to dictate to do things in any way like those, listed above, do. There will be a many to propose, but only damned trolls and morons will dictate. Minimal Tech give you the rod, not the fish. It is your task to get the fish.

Stick with Minimal Tech. You will like it a lot, when someone is suffering from the next piece of software being deprecated and dead. You may call it differently, but you should or already know that at the end, you will be the winner.

02 January, 2020 - Happy New Year and Merry Christmas 🎄

It was the 31th of December, when those words were written. Today is already the second of December (not long enough in my timezone though), but I still those words to be published.

I'd like to tell that this year was particularly good for me. It started with opening a whole new realm of professional growth via learning Scala and Functional Programming paradigm. It was followed by now stack of tasks and interesting people I wish I kept. Started a blog which I still keep writing after several months (many drafts, not enough courage to do the editing work). Started learning foreign languages. Joined new great team right before the New Year. And I am back on the path of constant development, thanks to everyone around me.

I thank my beloved wife and family, Orchideous, the Fediverse community and all the awesome people I've encountered this year. I'd like to thank you for you reading these words, because this means you follow my path in one way or another (RSS/Atom is still WIP, but close enough ;) ).

The 2020 is going to be tough and interesting for me. I probably will write some Elixir. Will get a Masters Degree in Computer Science. I want to continue writing this blog and continue my journey into functional programming. Meet new awesome people. Not loose people I already now, even only on internet.

I wish you to gain everything you wish to gain in the next year. But not more than you really need. Because the more you have, the harder it is to find, what do you want to achieve next.

Happy New 2020 Year!

P.S. BTW, now I use Arch

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!

@alexcleac - Minimal Tech

@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

hello, world

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!

@alexcleac - Minimal Tech

@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

hello, world

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!

@alexcleac - Minimal Tech

@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

hello, world

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!

@alexcleac - Minimal Tech

@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

hello, world

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!

@alexcleac - Minimal Tech

@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

hello, world

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!

@alexcleac - Minimal Tech

@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

hello, world

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!

@alexcleac - Minimal Tech

@alexcleac

Minimal Tech

Description

It is a small project of mine about possibility to live in modern life while using the most of things software gives to us. The general idea is about using simpler or/and older software and try getting most of it, including all the requirements of modern tech.

This project is more like a web log, rather than a blog page of some kind. I will sometimes post random small things about what I've discovered and/or tried, and what is my experience about it.

hello, world

15 October, 2019 - Unplug from Hive Mind

Recently I did an interesting thing I did never did before. I disabled internet connectivity for some time.

It may sound strange for those of you, who did live without internet for a while, but I am millenial - I had Internet at home for half of my concious life. And it felt strange for several minutes for me (however, not exactly, because I am generally always ready for Internet blackout). But this one was pretty different and curious. I've found out several things, that were pretty new to me.

First thing that I've found out: the laptop battery life increased drastically. That one is pretty obvious, because when you disable Wi-Fi, nothing tries to anything via radio waves, so the battery becomes better. But I actually had no clue, how much does that make difference. It gave me about 2-3 additional hours of battery life. This was achieved, when I closed web browser, slack and telegram, because they are generally useless without internet connection.

Second, I started making more things available offline. Like, some youtube videos I want to watch later, or just keep them around to watch sometimes. Music. Email. Books. These posts are being offline as well (actually they are written in my VimWiki base, but later about it).

And, thanks to most of things being offline, the third one - my laptop actually has gotten faster these moments. Because everything is local, the slowest thing to access content is an SSD and not network bandwith. Everything has gotten faster and smoother as ever before.

Bonus one and actually unexpected for me. I started producing more things: more blog posts has been written lately, more curious and interesting things happening around me happening. I started playing guitar, which, I thought has gotten abandoned completely. Just because I've unplugged from hive mind.

So, don't mind trying to detach yourself, it may make your life actually a lot better.

7 October, 2019 - In speed of light

For some time, I've abandonned the project, mainly because I was wandering around different tech, that promised to solve my tasks better. I've switched to Gnome, then to Windows for several weeks and then I've moved back to Gnome and back to Minimal Tech. It feels that I just can't decide, which to stick with, even for me... But, I think now I've sticked finally, because I really feel at home now. Everything fast, smooth and very convenient. And if I want something specific, I can spend some time and make it.

I'd like to mention the thing I've been very happy with, after I made the journey I've mentioned above. The speed. When I've switched to Gnome, things became slightly slower, but it was ok for, I just wanted to be like others and do things in GUI. Thus, I was still using mutt and other terminal utilities, when graphical ones broke. Then I switched to Windows, and things became even slower, but still, I didn't care about that. It was "beautiful". But after two weeks I've installed linux back, and it was an experience of switching to a sport car. So fast, so predictible, so homomorphic. That felt great. But at some point, small issues started coming around: slight lag, when I started an IDE, steam not working under wayland and the decrease of overall smoothness of Gnome on X11. So, I've installed awesomewm, like before.

Things became waay faster than even on gnome! 99% of tasks are now done in the speed of light, sometimes it feels like the machine has found some more horsepower. And with switching some things to offline, moving to more terminal applications, I can run 900 MHz on CPU and don't feel much difference compared to speed on 2.3 GHz, except the extended battery life and less heat produced.

I think, every moment is a good moment to make a consideration to switch to Minimal Tech. It is good here, but sometimes you have to learn how to use computer from scratch. But I don't think this should be issue for anyone :)

22 July, 2019 - Too minimal

Today I was configuring snippets system to write scala more productive way, and found out one fun thing: it is possible to get too deep into minimal tech things to achieve same productivity level as for more powerful technologies.

As I am a professional software engineer, my work includes writing lots and lots of code. Sometimes it is hugely boilerplated one, copied from one place, pasted at another with slight editing. Why copied? Because it is easier to make new mistakes while rewriting same boilerplate. So, to decrease such copy-pasting, I've decided to use snippets system in vim. I decided to use UltiSnips1 because it allows to script all the things the way I want, including shell scripting, python, etc.

However, things got harder, when I started writing snippets to make exhaustive snippets to do pattern-matching on different types for scala. I understood, that it is not that easy to write them, having only the text. I have to infer types one of next ways:

  1. Find out the type of object myself and use matching snippet
  2. Write a runtime guesser of type and use python scripting capability to achieve what I need

The first one will take more effort in process of coding. The second one will become a burden in the RAM and make my setup not that minimal. You see? It is possible to get too minimal. Code is not just a simple text, it is highly structured text with pretty specific concepts and links through it that are important to make development process faster.

I probably will end up writing my own type parser (or integrating with metals project for scala), because it is a pretty interesting task and it will highly optimize my workflow. But this will make my vim editing setup for scala less of editor but more of IDE.

Getting minimal is good. But it is possible to easily get too minimal to be productive.

2 July, 2019 - @bitwarden/cli && mail in the terminal (part 2)

Some time ago I have written1,2, how did I did use biwarden CLI interface to throw passwords to mutt email client. There was one single thing that did bother me a lot for some time: since I use several IMAP sources, I had to type the password of keystore every single time I switched source. That is not very convenient, because it slowed workflow down a lot. So, I've managed to find a way to make this thing work better way (at least it works faster).

First, I'd like to mention the previous setup. I had such a line in every source:

set imap_pass = `export BW_SESSION=$(bw unlock --raw) && bw get password uuid`

This is the reason, why I did need to type password every single time. So've I looked at several ways of how could I solve this one.

There were several assumtions on how could I make this work. Mutt itself allows to execute commands, store variables and very much more, so my first assumtion was to try unlocking session only once and reusing to get password for every source when switching to it. But it didn't work, because backtick expansion does not use mutt variables. So I've searched the Internet a bit and found out a fun thing: mutt does execute the output of backtick expansion by default.

So I came up with simple script that simply generates the set of variables with passwords. Here it is:

#!/usr/bin/env python3
# gen_pwds.py
import subprocess, getpass
ITEMS = [ ('key', 'uuid') ]

def get_command_result(*command):
    return subprocess.run(command, capture_output=True).stdout.strip().decode('ascii')

keystore_password = getpass.getpass('Enter the keystore password: ')
key = get_command_result('bw', 'unlock', keystore_password, '--raw')
for name, uuid in ITEMS:
    password = get_command_result('bw', '--session', key, 'get', 'password', uuid)
    print(f'set my_{name}_password={password}', end=';')

Then, I put a simple line of code into basic muttrc: `gen_pwds.py` and simply use generated variables. Easy, but a bit insecure, in fact. But works for me as well.

Links:

25 June, 2019 - A week only on Android Linux

If you are following my mastodon account, you may know that for some strange reason, cooling system of my laptop has got dead due to a short circuit in cooling power supply. Now I've got my laptop back and I would like to share some thoughts that I've encountered due to this period.

1. As you can see from my previous post, I made a small experiment on an Android tablet and installed there some part of my cli toolkit using a Termux terminal emulator. Everything felt pretty nice, but there is one thing that still bothers me. For unknown reason, every terminal application I ran increased the power consuming. Five minutes session of reading and sending emails with mutt and vim could take about 10% of battery. To compare, same session of using K9 mail client about 1-2%. That's strange.

2. Physical keyboard support is strange. It feels almost like good old linux. But not exactly. I couldn't change input language without changing keyboard (until I install AnySoftKeyboard, which is literally awesome, developers made an awesome job making hardware keyboard support). I've got sometimes strange issues with cyrillic keyboard, when some keys were moved to different place (it's the keyboard type issue, but I couldn't find how to fix it). Despite these issues - it worked well.

3. Node applications are borked. After using a bit slower CPU, I've realized that even python applications worked way faster than the javascript ones. And this including the fact that v8 is JIT compiled platform. Still can't understand, what's wrong with it.

And despite all the small issues, it is possible to overcome them and simply use the system. So it does pay off to move some activities to the terminal. Because when you get into situation, where you simply can't run a plain old linux, you can still find a way around to use the same applications stack without learning it from scratch. You simply configure the environment from your dotfiles and just run.

14 June, 2019 - @bitwarden/cli

Yesterday I've found a new fun way interesting way to install use passwords I store in Bitwarden1. There is a package on npm called @bitwarden/cli, which gives you a command line interface to access and use passwords. And it can be pretty useful in fact (I used to think that you won't ever need a cli interface for password manager, it's just so inconvenient - until yesterday).

Currently, I am using it with mutt email client. I've configured it such way, so I can list inbox without having a password in a plaintext. Sure, there is a pass2, but I want to sync it the modern way, have too different ecosystem devices to sync files (if you actually know a good way of it, feel free to share it with me, look at social media3 section of front page).

However, it is not that trivial, how can you use the bitwarden for mutt. You see, after you run bw unlock and type your password, it just prints further instructions on how can you use the session key to access the vault. You can store the key in environment variable BW_SESSION or pass as a cli argument. Both ways are pretty inconvenient in mutt scenario, because you have to run command, then copy session key, then paste it, then run another one command. But, when you run bw unlock --raw, you typed password, it just prints the session key. So you can pass it directly into env variable or command line argument.

And it works nice, I've tested it both on my Android tablet and a laptop I use on daily basis. It works great (however, it is a bit slow due to it works on node.js, but what apps have no downsides today?).

Links:

10 June, 2019 - Tile this window!

Have you ever noticed that most of users use window manager in a single mode: a full screen window mode? People spend all the time running this mode. The maximum advanced mode I've seen is a two windows split. And these people tell me that tiling managers are to hard for them. So... I'd like to speak about tiling window managers.

If you will try any tiling window manager, you will get several simple things out of box, without any need for you to do anything. First, most of them are pretty lightweight, compared to others. Second, your windows will tile by default. So, you won't need to move window anywhere, or click anything to get window maximized, or tiled (if there are more then one window). Third, most of them have window decorations disabled, so more space will be saved for content. Fourth, you will be just like a magic wizard, that somehow makes all the awesome things fast and easy.

Personally I run AwesomeWM1. It's light fast, simple and is scriptable in Lua. So I can make it reflect any workflow I have: a timer integrated in top bar, a floating "picture-in-picture" kimulated window, change image every minute, run specific applications on specific tags and display several tags in the same time. I love this power for myself.

However, awesomewm itself is pretty simple out of box and requires from you some effortand coding to start using it. So you would definitely try i3wm2 or sway3, if you want to have wayland. They both have lots of batteries included, are fast, simple and do not require from you any programming skills at all.

So, if you haven't tried a tiling window manager yet, give it a try. Just give it some more time, and after some time running it you probably will feel awkward when running DEs like Gnome, KDE and other.

Links:

5 June, 2019 - Mail in the terminal (part 1)

I have been wanting to try out mutt for several times now. It's just too much of people speaking about it's awesomeness, so I couldn't resist. I've tried running it several times, but without any success... Now I am sure I won't leave it. Somewhat sure *laughing*

I should be clear here. mutt is noway a minimal application, but when things come to handling e-mails, you simply can't keep things minimal. If it has at least some use-base, it already should already support different protocols, have possibility to group messages somehow, store draft, etc. So, mutt is not minimal. But compared to other email-clients, it is simple.

About the entry into mutt. It's a bit harder to enter this application than other email clients, because it has default configuration that reads all the emails from local pool. And, the thing that bothers a lot: the first step is the hardest, because it takes time and lots of documentation to read to understand that this code:

set folder = imaps://login@server:123

does specify the target, where do you want to read emails from. It's a bit counterintuitive for newcomers. But I've figured this out, and, I think, this should be mentioned more explicit.

But, after figuring this out, things are pretty simple and easy to use. However, I have some things in my todo list to figure out, like mailing lists support and some other.

22 May, 2019 - Music in the Terminal

Mostly I listen to my music using the terminal music player called cmus. It is really a great music player, which allows me easily and very fast index my music collection and play pretty any song. I just put it inside my tmux session and just use it. Very fast, very lightweight and very reliable.

Moreover, it is possible to integrate with it easily using the cmus-remote. I think, KDE uses this api and is able to integrate with cmus, so you will be able to use the "Media" widget to control your music. And all this in minimal design, fast and very light. However, sometimes it badly accepts unicode, but generally everything is ok.

18 May, 2019 - Getting Brütal

This is a first entry inside this log. First, I've decided to start tracking all the interesting and fun things I find about simple and sometimes obscure technologies. Why public? Because I can! Also, because there is not much people around me use those simpler tech, while in fact they can do not less things, but more optimal/fast from many perspectives.

Well, for last year I am an active user of mastodon social network. It's fediverse, and blah-blah-blah. I would like to mention one project, I've got myself lately: it is brutaldon project. It is a brutalistic (brütal) interface for masto. Although I know about it for some time, I didn't use it, because didn't get the reason why should I do it (the default interface is column-based, fast enough and pretty optimized). However, on phone it is easier to use brutaldon. Also, brutaldon looks better in small window than the original frontend version. That makes it less distractive for me to use.

Although there are things I don't like much about brutaldon. First is that it is written in python. Then over high load it will be pretty slow, so it is better to host it yourself instead of using the original version. Second thing is that to mention someone correctly, you have to know the nickname exactly (so when I want to mention someone I don't remember the instance of, I start the original web version, write a post and close it afterwards).

Despite issues, I totally recommend at least to try using it for several days. It can fit your way!