Over the last weeks I’ve been focusing on C++ in order to broaden my job options and apply for a specific job offer.

After learning Java beforehand it is an interesting experience that allowed me to learn both about similarities and differences between the languages. I understood firsthand that many programming languages are closely related and that knowledge of one of them can be very beneficial when trying to learn the another. Even if I don’t end up getting a job related to C++, time spent on it was definitely worth it.

Clearly just acquiring knowledge by reading something over internet isn’t enough when it comes to gaining new insights. While I read many times about similarities between the programming languages, only now after seriously learning Java and then C++ I really felt how closely related they are. On the other hand, JavaScript seemed quite different to me and was confusing at times.

This marks my first efforts to find an actual programming job, since I sent my CV today applying for a job. Before that I only asked at my current job whether they are looking for a new developer/intern.

My goal stays the same: to find a job as a developer by May 2020.

After taking 50 area screenshots from some document I found the save dialog that shows up every time quite annoying.
I wanted a functionality where:

  • By pressing a keyboard shortcut my mouse pointer turns into an area selection tool
  • The selection of an area begins by mouse press, ends when I release the mouse buttons
  • Screenshot is automatically saved to a file
  • No confirmation windows, no need to press any additional buttons

This led me to spending some time with gnome-screenshot and some other tools.

I’ve looked in keyboard shortcuts and still couldn’t find a solution. I’ve tried to use Shutter: which every time required me to confirm the screenshot and was slow. Then I’ve looked into gnome-screenshot -h and found that it allows to specify a filename within the command. This allowed me to later find the two solutions below:

Solution one

  1. Install and run CompizConfig Settings Manager (sudo apt-get install compizconfig-settings-manager)
    1. In commands window add as one of the command lines: gnome-screenshot –area –file=/home/tom/Pictures/$(date +%y-%m-%d-%H%M%S).jpg
      1. where „user” is your username. You can use any folder that you have a permission to save files. It will save each area screenshot and give it a filename that is the current date and time.
    2. Change to the Key Bindings tab, click on the button with the Disabled label that corresponds to your previously edited Command Line. Press the Grab key combination button and create a keyboard shortcut of your choice
    3. You should be able to take screenshots of an area by pressing the previously chosen keyboard shortcut, where screenshots are automatically saved (in the case of this example, in your Pictures folder).
    4. If the keyboard shortcut you choose doesn’t work, go to System Settings -> Keyboard -> Shortcuts and make sure that the keyboard shortcut isn’t already assigned to anything.

Solution two

  1. Go to your /usr/bin/ folder and make sure you have the permissions to save files there (https://websiteforstudents.com/enable-open-as-administrator-on-ubuntu-16-04-17-10-18-04/)
  2. Create a new text file, copy the code below into it and save it at /usr/bin/ (the path to it should be /usr/bin/filename)

  1. Right click on the created file, choose properties->permissions and check „Allow executing file as program”
  2. Now go to System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts, press the „+” button to add a new shortcut
  3. Name the new screenshot however you like. Make sure the command name is the same as the filename you’ve created in the previous step
  4. Click on the Disabled label to the right of your newly created shortcut and assign a keyboard shortcut to it
  5. Try it out 🙂