|
|
|
|
@ -102,20 +102,26 @@ 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 |
|
|
|
|
|
|
|
|
|
The other two swap between build and src dirs on my local git checkout |
|
|
|
|
|
|
|
|
|
#+begin_src sh :tangle kde-utils.sh |
|
|
|
|
#!/bin/zsh |
|
|
|
|
|
|
|
|
|
function kde-current-activity () { |
|
|
|
|
qdbus >/dev/null && kactivities-cli --current-activity | awk {'print $2'} |
|
|
|
|
qdbus6 org.kde.ActivityManager /ActivityManager/Activities org.kde.ActivityManager.Activities.CurrentActivity |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function kde-current-activity-name () { |
|
|
|
|
qdbus >/dev/null && kactivities-cli --current-activity | awk {'print $3'} |
|
|
|
|
qdbus6 org.kde.ActivityManager /ActivityManager/Activities org.kde.ActivityManager.Activities.ActivityName `kde-current-activity` |
|
|
|
|
} |
|
|
|
|
local kde_src_basedir="/scratch/src/kde" |
|
|
|
|
local kde_build_basedir="/scratch/src/kde/build" |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
- ~kde-cd-build~ changes directory to the build dir of the current |
|
|
|
|
project |
|
|
|
|
- ~kde-cd-src~ changes directory to the src dir of the current |
|
|
|
|
project |
|
|
|
|
|
|
|
|
|
#+begin_src sh :tangle kde-utils.sh |
|
|
|
|
local kde_src_basedir="kde/src" |
|
|
|
|
local kde_build_basedir="kde/build" |
|
|
|
|
|
|
|
|
|
function kde-cd-build () { |
|
|
|
|
cd ${PWD/$kde_src_basedir/$kde_build_basedir/} |
|
|
|
|
@ -126,11 +132,11 @@ The other two swap between build and src dirs on my local git checkout |
|
|
|
|
} |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
Send a message through OSD |
|
|
|
|
- ~kde-osd-message~ Sends a message through OSD |
|
|
|
|
|
|
|
|
|
#+begin_src sh :tangle kde-utils.sh |
|
|
|
|
function kde-osd-message() { |
|
|
|
|
qdbus org.freedesktop.Notifications /org/kde/osdService org.kde.osdService.showText alert $1 |
|
|
|
|
qdbus6 org.freedesktop.Notifications /org/kde/osdService org.kde.osdService.showText alert $1 |
|
|
|
|
} |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|