Poor Man's Dropbox

Dropbox abandons Linux users Recently, I’ve started receiving a notification from Dropbox desktop app on Linux that they’ll stop syncing my files in November. I couldn’t understand why. I’m using this service for some time and I find it really useful. Moreover, I want to backup several important files on the web server in case of my disk crashes or I’ll need to access them from another computer or mobile device. I googled this issue and found pretty long thread on the Dropbox Forum. There’s also ongoing discussion on reddit. ...

August 12, 2018 · 6 min · 1114 words · Piotr Wittchen

Air quality monitoring script for Argos (Linux) and BitBar (macOS)

From some time, I wanted to create my own app, which will display some data in top panel in macOS or Gnome environment on Linux. I collected some resources about that and I knew that for macOS I need to write an app in Obj-C and for Gnome I need to write a plugin in JavaScript. In both cases it requires some ceremony and preparation. Recently I’ve found a great app for macOS called BitBar (by the way it’s open-source). BitBar allows to put anything to macOS menu bar (top panel) in no time! With this project creating top panel apps is simplified to the limit. Moreover, there’s another project called Argos, which does the same thing, but for Linux with Gnome (it’s an open-source Gnome Extension). In both cases, we just need to create a shell script, put it into appropriate directory (in case of Argos, it’s ~/.config/argos/ and in case of BitBar, we define it during the installation or first run) and then app displays our data automatically. We can also set refresh rate. E.g. if we want our script to be executed every 60 seconds, we can name it script.60s.sh. We can also create more advanced scripts and more details can be found in BitBar and Argos documentation. In my case, I wanted to create a script, which reads CAQI (Common Air Quality Index) in my current location based on Airly sensors. Airly provides nice API, which we can use in our projects. Please remember that most of the sensors are located in Poland. On my Ubuntu Linux with Gnome 3, I created a new script in the following path: ...

December 29, 2017 · 3 min · 487 words · Piotr Wittchen

Using Tmux plugins with Tpm

Recently, I decided to organize my Unix dotfiles in a better way. I had a few custom scripts I used in my Tmux bottom bar. I kept these scripts in .scripts directory and during installation or upgrade of my personal configuration, install.sh script was copying them from .scripts directory to /usr/local/bin/ directory. I wanted to make this configuration more solid and consistent, so I decided to transform these scripts into tmux plugins managed by tpm. I was already using a few plugins like: ...

August 7, 2017 · 2 min · 418 words · Piotr Wittchen

Transform Vim into efficient IDE

Introduction Some time ago, I decided to learn Vim. A lot of people are afraid of this editor and they usually don’t want to know anything about it or just learn how to quit it. In my opinion, it’s good to learn it because after mastering the basics, we can work very efficiently. After some time of usage, we may even replace editors like Atom or Sublime Text with Vim. Moreover, Vim is default editor for a few Unix tools like Git, so it’s good to know how to use it when we accidentally open it. In addition, sometimes we have an access only to the terminal (e.g. via ssh) and we need to perform a task on the remote server, so we don’t have any possibility to use editors with GUI. In such cases, Vim is a perfect solution. Last, but not least - if you want to be a real h4x0r, you should know it (or at least its basics) ;-). ...

April 16, 2017 · 5 min · 948 words · Piotr Wittchen

Automate tile layouts creation in tmux with tmux-auto-pane

I just released tmux-auto-pane. It’s a tiny shell script for creating pre-defined tile layouts in Tmux on Linux with xdotool. In our workflow, we often have some pre-defined pane configurations in a terminal. The project called tmux-auto-pane helps to automate that process. It can save us some time and make us a bit more productive. We can call tmux-auto-pane with one of the following parameters: --help | -h showing help --1l1r one left, one right --1l2r one left, two right --2l1r two left, one right --1u1d one up, one down --1u2d on up, two down --2u1d two up, one down --4tiles 4 tiles, 1 in each corner for example tmux-auto-pane --4tiles will generate such layout: ...

April 8, 2017 · 2 min · 295 words · Piotr Wittchen