Archive

Posts Tagged ‘tips’

VLC hotkeys that you must know

November 14, 2015 Leave a comment
a     - cycle aspect ratio (16:9, 4:3, etc.)
b     - cycle audio track
g, h  - adjust subtitle delay (down, up)
f     - fullscreen
space - pause

Full list here.

Advertisements
Categories: Uncategorized Tags: ,

feh: a fast and light image viewer

October 18, 2015 Leave a comment

feh is an X11 image viewer aimed mostly at console users. Unlike most other viewers, it does not have a fancy GUI, but simply displays images. It is controlled via commandline arguments and configurable key/mouse actions.” (source)

feh has lots of features, thus it has lots of command line options too. Here I sum up the most important options. For more info refer to the manual.

feh [options] [files | directories | URLs ...]

command line options
--------------------
-F             fullscreen
-x             borderless window
-Z             auto zoom to fit window size
--draw-exif    display some EXIF info
-d             display filename
-Y             hide mouse pointer
-l             don't show images, just list their dimensions
-z             randomize
-D float       delay for slideshow
-t             show thumbnails
    scrolling: mouse or 
               Ctrl+Up/Down (soft scroll) or 
               Alt+Up/Down (bigger jumps)
-k             keep files in /tmp (useful when browsing URLs)
               (Note: it didn't seem to work for me).

commands in view mode
---------------------
d           toggle filename
e           toggle exif
h           toggle pause (in slideshow mode)
m           show menu
q, ESC      quit
s           save image
v           toggle fullscreen
z           random jump
Ctrl+Del    delete file from file system
keypad +    zoom in
keypad -    zoom out
Ctrl+Up/Down/Left/Right    scroll
*           zoom 100%
/           zoom to fit window size
o           toggle mouse pointer
Home / End  jump to first / last image
PgDn        go 5% forward in file list
PgUp        go 5% backward in file list

examples
--------
$ feh
    browse images in the current directory
$ feh -Fd
    fullscreen, file info
$ feh -Fdz
    fullscreen, file info, random order
$ feh -Fdz -D 5
    fullscreen, file info, random order, slideshow with 5 sec. delay
$ feh -t
    show thumbnails
$ feh img.jpg
    Show this image only. Browsing other files is not possible.
$ feh . --start-at ./img.jpg
    Show img.jpg but allow browsing the other images too.
    You must write "./img.jpg" instead of "img.jpg"!
$ feh . --start-at ./img.jpg -Fd
    as before + fullscreen and file info
$ feh . --start-at ./img.jpg -FdZ
    as before + images are auto-zoomed to the window size

Scripts
At the Arch Wiki you can find more info about feh. There is also a file browser image launcher script.

I also made a simple script:

#!/usr/bin/env bash

# feh_view.sh

if [[ ! -f $1 ]]; then
    echo "$0: first argument is not a file" >&2
    exit 1
fi

feh . --start-at "./$1" -Fd

Usage: “feh_view.sh cool.jpg“. It will open the specified image in fullscreen. File info is displayed and you can browse other images too.

Categories: bash Tags: , ,

disable “quiet splash” during boot

March 12, 2015 Leave a comment

Problem
Today my laptop froze and I switched it off with the power button. Well, after this it didn’t boot :( The splash screen appeared, but after a few seconds the HDD led stopped blinking and nothing happened. What’s wrong?

Solution
As long as you have that stupid splash screen, you won’t see what the problem is. Upon boot you can switch it off temporarily. In the GRUB menu choose “Advanced options”, then at the bottom you will see thet with “e” you can edit the commands (press “e”). Find the line that starts with “linux” and delete “quiet splash” at the end of its line. With CTRL-X you can continue the boot. (See this thread for screenshots.) Now you will see what the problem is.

In my case the root partition got corrupted a bit and had to run “fsck” on it manually. But I could only see this problem when the splash screen was deactivated. Fortunately it was nothing serious and my system is back to normal.

After this the first thing was to edit “/etc/default/grub” and remove “quiet splash” permanently (don’t forget to run update-grub after editing this file).

Categories: linux Tags: , , ,

Launch gedit in the background

September 11, 2014 1 comment

Problem
Sometimes I use gedit but it is launched in the foreground, blocking my terminal. There are two ways to put it in the background: (1) Press CTRL+Z in the terminal, then send the job to the background with the command bg, or (2) launch gedit directly in the background with the “&” sign.

Neither of them is convenient. I often forget about it and I always end up in a blocked terminal. I just simply want to write “gedit” or “gedit ehh.txt“, and I want it to start in the background.

Solution
Create a script called “gedit” in your $HOME/bin directory with the following content:

/usr/bin/gedit "$@" &

Make it executable and make sure the directory $HOME/bin is in your PATH.

Categories: bash, ubuntu Tags: ,

sending vim to background then bringing it back

December 13, 2013 Leave a comment

Problem
You are working in vim and you want to switch quickly to the terminal to do something. Then you want to get back to vim and continue editing where you left off.

Solution
Simply do the same you do with other programs:

  • CTRL+Z: suspends vim and you find yourself in the terminal
  • do your terminal business
  • fg: brings you back to vim
Categories: Uncategorized Tags: ,

Improve your shitty posture

November 16, 2013 Leave a comment

Do you sit hours in front of your computer every day? Then very likely you have a bad posture. Here is how to improve it:

from reddit

Categories: Uncategorized Tags: , , ,