21 lines
594 B
Bash
21 lines
594 B
Bash
#!/usr/bin/env bash
|
|
|
|
# OrgMode Worklog appender
|
|
#
|
|
# This supersedes [Worklogger](https://github.com/bascht/worklogger)
|
|
# by appending to [OrgMode](https://github.com/bastibe/org-journal)
|
|
# by creating a new frame of the existing emacs server called "workmacs"
|
|
|
|
|
|
WORKLOG_CRITERIA='select(.name == "Worklog")'
|
|
|
|
get_worklog_window () {
|
|
swaymsg -t get_tree | jq -e -r "recurse(.nodes[],.floating_nodes[]) | ${WORKLOG_CRITERIA}.id"
|
|
}
|
|
|
|
if [ -n "$(get_worklog_window)" ]; then
|
|
notify-send "Worklog window is already visible"
|
|
fi
|
|
|
|
emacsclient -s workmacs --create-frame --eval "(bascht/worklog)" &
|