2022-12-06 08:01:44 +01:00
|
|
|
#!/bin/sh
|
|
|
|
. $HOME/.bin/_config
|
|
|
|
|
2023-04-26 08:32:14 +02:00
|
|
|
SEL=$(print "Notes\nDocuments\nContacts\nCalendar\nSlides" | $DMENU_CMD -p "Information System")
|
2022-12-06 08:01:44 +01:00
|
|
|
|
|
|
|
case $SEL in
|
|
|
|
Documents)
|
|
|
|
DOC=$(ls -1pr $PIMDIR/documents/ | grep -v '/$' | sort -hr | $DMENU_CMD -p Documents -l 25)
|
|
|
|
if [ ! -z "$DOC" ]; then
|
2023-06-26 13:28:54 +02:00
|
|
|
ACT=$(printf "View\nCopy\nEdit\nPrint\nEmail\nDelete" | $DMENU_CMD -p Action)
|
2022-12-06 08:01:44 +01:00
|
|
|
case $ACT in
|
2024-06-23 17:22:17 +02:00
|
|
|
View) zathura "$PIMDIR/documents/$DOC" ;;
|
2023-02-16 10:12:03 +01:00
|
|
|
Copy) echo "$PIMDIR/documents/$DOC" | xclip -r;;
|
2022-12-06 08:01:44 +01:00
|
|
|
Edit) pdfarranger "$PIMDIR/documents/$DOC" ;;
|
|
|
|
Email) texec "mutt -a \"$PIMDIR/documents/$DOC\"" ;;
|
2023-06-26 13:28:54 +02:00
|
|
|
Print) lpr "$PIMDIR/documents/$DOC" ;;
|
2022-12-08 17:11:17 +01:00
|
|
|
Delete) mkdir -p /tmp/deleted_documents; mv "$PIMDIR/documents/$DOC" /tmp/deleted_documents/; ;;
|
2022-12-06 08:01:44 +01:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
Slides)
|
2024-01-30 07:41:31 +01:00
|
|
|
P=$(find $PIMDIR/slides -type f -name "*.txt" | sed "s,$PIMDIR/slides/,,g" | sort -hr | $DMENU_CMD -p Slides -l 25)
|
2022-12-06 08:01:44 +01:00
|
|
|
if [ ! -z "$P" ]; then
|
|
|
|
ACT=$(printf "Open\nEdit" | $DMENU_CMD -p Action)
|
|
|
|
case $ACT in
|
2024-01-30 07:41:31 +01:00
|
|
|
Open) sent -c "$COLOR_SF" -b "$BACKGROUND" -f "Monospace" "$PIMDIR/slides/$P" ;;
|
2022-12-06 08:01:44 +01:00
|
|
|
Edit) texec "vim \"$PIMDIR/slides/$P\"" ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|