|
|
|
@ -103,7 +103,34 @@ Then, add helper directory to fpath |
|
|
|
#+begin_src sh |
|
|
|
#+begin_src sh |
|
|
|
fpath=(~/clones/zshrc/ $fpath) |
|
|
|
fpath=(~/clones/zshrc/ $fpath) |
|
|
|
#+end_src |
|
|
|
#+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: |
|
|
|
*** KDE helpers :daily: |
|
|
|
|
|
|
|
#+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. |
|
|
|
Define a number of KDE helpers. |
|
|
|
- ~kde-current-activity~ returns the id of the current activity |
|
|
|
- ~kde-current-activity~ returns the id of the current activity |
|
|
|
- ~kde-current-activity-name~ returns the name of the current activity |
|
|
|
- ~kde-current-activity-name~ returns the name of the current activity |
|
|
|
|