bin/qutesesh

20 lines
508 B
Bash
Executable File

#!/bin/sh
_session_dir="$HOME/.local/share/qutebrowser/sessions"
_dmenu_config="$HOME/.config/dmenu/dmenurc"
if [ -f "$_dmenu_config" ] ; then
# dmenu options will now be stored in $DMENU_OPTIONS
. "$_dmenu_config"
fi
_session_list=$(ls -t "$_session_dir" | sed 's/\.yml//')
_session=$(printf "NONE\n%s" "$_session_list" | dmenu $DMENU_OPTIONS -i -p "Session :")
[ -z "$_session" ] && exit 5;
if [ "$_session" = 'NONE' ] ; then
qutebrowser -R
else
qutebrowser -r "$_session_dir/$_session.yml"
fi