Posts for the month of March 2020

Running zoom.us on a HiDPI screen

Working from remote requires tooling to communicate with co-workers. some are using zoom.us which has good linux support.

How-ever when started the whole interface is tiny-tiny since the Qt application does not honour the settings used to combat unreadable windows on my HiDPI screen.

Altering file:/usr/share/applications/Zoom.desktop and adding the required Qt tweaks (QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCREEN_SCALE_FACTORS=2) did the trick:

[Desktop Entry]
Name=Zoom
Comment=Zoom Video Conference
Exec=env QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCREEN_SCALE_FACTORS=2 /usr/bin/zoom %U
Icon=Zoom.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
StartupWMClass=Zoom
MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/zoomphonecall;application/x-zoom;
X-KDE-Protocols=zoommtg;zoomus;tel;callto;zoomphonecall;
Name[en_US]=Zoom

Jumping around in bash shell

I jump around a lot in the terminal between different projects and activities. To avoid endless typing I have created aliases which allows me to quickly perform this task.

By adding the following entries to your .bashrc you will give access to the powerfull tools of jcd scd lcd. First and foremost goto a directory you would like to earmark. Type scd <alias-of-choice> and your entry will be stored. To go back to this directory type jcd <stored-alias> and you arrived at your destination. Tab completion also works to save typing some more.

function jcd {
        cd "$(grep "${1:-blank} /" ~/.jcd | cut -d' ' -f  2-)"
}

function scd {
        ( grep -v "^${1:-blank} /" ~/.jcd; echo ${1:-blank} `pwd` ) > ~/.jcd.new
        mv ~/.jcd.new ~/.jcd
}

function lcd {
        cat ~/.jcd | sed 's/ /\t = /'
}

function _listcd {
        COMPREPLY=()
        cur="${COMP_WORDS[COMP_CWORD]}"
        opts=$(awk '{print $1}' ~/.jcd | grep "^$2")
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
        return 0
}

complete -F _listcd jcd
complete -F _listcd scd