Fix screen detection

I am not 100% sold on the function terminal-size.  Don't I need to
have it in the script itself?
master
Jacopo De Simoi 7 months ago
parent 093e10097d
commit 369b32c0c2
  1. 29
      zshrc.org

@ -103,8 +103,35 @@ Then, add helper directory to fpath
#+begin_src sh
fpath=(~/clones/zshrc/ $fpath)
#+end_src
*** urxvt helpers :daily:
#+begin_src sh
function terminal-size () {
case $1 in
2560x1440) echo 82x71;;
1080x1920) echo 104x47;;
2240x1400) echo 71x69;;
esac
}
#+end_src
*** KDE helpers :daily:
Define a number of KDE helpers.
#+begin_src sh :tangle kde-utils.sh
#!/bin/zsh
function kde-active-output-name () {
qdbus6 org.kde.KWin /KWin org.kde.KWin.activeOutputName
}
function kde-active-output-resolution () {
kscreen-console outputs | grep $(kde-active-output-name) -A10 | grep "^Size:" 2&>/dev/null | cut -f2 -d'(' | sed -e 's/)//' -e 's/, /x/'
}
function kde-current-activity-name () {
qdbus6 org.kde.ActivityManager /ActivityManager/Activities org.kde.ActivityManager.Activities.ActivityName `kde-current-activity`
}
#+end_src
Define a number of KDE helpers.
- ~kde-current-activity~ returns the id of the current activity
- ~kde-current-activity-name~ returns the name of the current activity

Loading…
Cancel
Save