Spotify song in i3 status bar

While customizing my i3 status bar, I wanted to have currently played Spotify song in it. Some time ago, I created an open source script in Python called spotify-cli-linux and I wanted to use it. When we want to put something custom into the i3 status bar, the easiest way to do it, is to save data into the file and then read the file. I created the following config inside ~/....

February 20, 2020 · 3 min · 546 words · Piotr Wittchen

Publishing Python package to PyPi

Introduction I have my own tiny Python project called spotify-cli-linux, which is (surprise!) command line interface for Spotify desktop app on Linux. Python is not my primary programming language and I work more with Java. Nevertheless, I find this language enjoyable and useful in many cases, so I try to learn something new about it from time to time. In the beginning, I’ve provided instructions how to install my Python script in the system via curl and wget, which is fine, but it’s not recommended and official way to do it....

April 8, 2018 · 3 min · 592 words · Piotr Wittchen

Control Spotify on Linux like a hacker

Recently, I created a tiny script called spotify-cli, which allows you to control Spotify on Linux from terminal. It’s inspired by shpotify, which is a shell script doing similar things, but on macOS. My script is written in Python and uses dbus under the hood, which allows to communicate with bus daemon to pass messages between applications. I used pactl for controlling the system sound. You can install spotify-cli as follows via wget:...

March 5, 2017 · 1 min · 181 words · Piotr Wittchen

Automate boring stuff

Introduction In my current company all the people who perform creative work (mostly programmers) need to prepare so-called PKUP report. PKUP stands for Podwyższone Koszty Uzyskania Przychodu in the Polish language. It’s legal regulation in Poland, which allows paying a lower income tax due to the particular type of work. For the regular employee, it means that he or she will simply get a bit higher salary per month. How the report looks in practice?...

January 1, 2017 · 3 min · 527 words · Piotr Wittchen

3 questions about your Git repository

Introduction Can you answer the following questions about your Git repository? Does development branch has all changes from master branch? Is your gitlog a crap? How old are your branches? If not, but you want to know answers, you’re lucky, because I prepared 3 simple scripts for you, which can help to find it out. Does development branch has all changes from master branch? git-branch-comparator is a python script, which checks if development branch has all changes from master branch in Git repository....

December 28, 2015 · 3 min · 629 words · Piotr Wittchen