From a26a3a445319d2b39cb6fb9ccc03d2425226de76 Mon Sep 17 00:00:00 2001 From: DustVoice Date: Mon, 17 Aug 2020 17:42:38 +0200 Subject: [PATCH] Adapt screenkey-obs to be DPI responsive --- .zsh_alias | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.zsh_alias b/.zsh_alias index 3052c766..713d22df 100644 --- a/.zsh_alias +++ b/.zsh_alias @@ -2,11 +2,22 @@ alias la='ls -lahF' alias ll='ls -lhF' alias ls='ls -F --color=tty' alias lsa='ls -aF' + alias layout='xkblayout-state print "%s(%v)" && echo -n "\n"' + alias picom-default='picom -bGC --backend glx --unredir-if-possible-delay 1000 --vsync' -alias screenkey-obs='screenkey --no-systray -t 2 -p fixed -s small -g 960x88+960+4 --key-mode composed --bak-mode full --mods-mode normal -f Hack --font-color "#f8f8f2" --bg-color "#44475a" --opacity "1.0"' + +function screenkey-obs-func() { + width=$(xrandr | awk '$0 ~ "*" {split($1,res,"x"); print res[1];}') + height=$(xrandr | awk '$0 ~ "*" {split($1,res,"x"); print res[2];}') + screenkey --no-systray -t 2 -p fixed -s small -g $(awk -v height=$height -v width=$width 'BEGIN {printf "%.0fx%.0f+%.0f+%.0f", (width * 0.5), (height * 0.06), (width * 0.25), (height * 0.02)}') --key-mode composed --bak-mode full --mods-mode normal -f Hack --font-color "#f8f8f2" --bg-color "#44475a" --opacity "1.0" +} +alias screenkey-obs='screenkey-obs-func' + alias tmate-obs='tmate -k tmk-ET35fx5m9cA7cxOt4jjWkSmaOy -r DustVoice' + alias xfce-polkit='/usr/lib/xfce-polkit/xfce-polkit' + alias davinci-resolve='/opt/resolve/bin/resolve' alias rofi-scripts='alias | sed -e "s/=.*//"'