Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

luakit sessions

  • Loading branch information...
commit 38db0a5895d22885c3947ac26f181deae2677a09 1 parent de636ea
@dang authored
Showing with 50 additions and 2 deletions.
  1. +4 −2 awesome/rc.lua
  2. +46 −0 luakitsession
View
6 awesome/rc.lua
@@ -26,7 +26,8 @@ email = "chromium"
im = "pidgin"
music = "schedtool -I -e rhythmbox"
ebook = "calibre"
-reader = "uzbl-tabbed http://www.google.com/reader"
+reader = "luakitsession feeds"
+pr0n = "luakitsession pr0n"
comics = "uzbl-tabbed http://www.comicagg.com/comics/read/"
bookmarks = "uzbl-tabbed file:///home/dang/bookmarks.html"
@@ -616,7 +617,8 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, "Shift" }, "i", function () awful.util.spawn(im) end),
awful.key({ modkey, }, "c", function () awful.util.spawn(comics) end),
awful.key({ modkey, }, "m", function () awful.util.spawn(music) end),
- awful.key({ modkey, }, "r", function () awful.util.spawn(reader) end),
+ awful.key({ modkey, "Shift" }, "r", function () awful.util.spawn(reader) end),
+ awful.key({ modkey, "Shift" }, "p", function () awful.util.spawn(pr0n) end),
-- awful.key({ modkey, }, "k", function () awful.util.spawn(bookmarks) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
View
46 luakitsession
@@ -0,0 +1,46 @@
+#!/bin/bash
+#
+# Script that starts a named session of luakit
+#
+
+# Set usage output
+USAGE="[-h |--help] <session>"
+LONGUSAGE="\t-h, --help\n\t\tPrint this help message
+\t<session>\n\t\tName of session."
+
+# Standard functions
+source ${HOME}/.scripts/functions.sh
+
+# Script name
+ME=$(basename $0)
+
+# Parse arguments
+ARGS=`getopt -o h --long help -n "${ME}" -- "$@"`
+
+if [ $? != 0 ] ; then
+ usage
+fi
+eval set -- "$ARGS"
+
+while true ; do
+ case "$1" in
+ -h|--help) usage; shift ;;
+ --) shift ; break ;;
+ * ) usage "Invalid argument $1";;
+ esac
+done
+
+# Remaining arguments are in $1, $2, etc. as normal
+if [ -z "$1" ]; then
+ usage "Must give session name"
+fi
+
+SESSION="$1"
+
+export XDG_DATA_HOME=~/.sessions/${SESSION}/data/
+export XDG_CACHE_HOME=~/.sessions/${SESSION}/cache/
+
+mkdir -p ${XDG_DATA_HOME}
+mkdir -p ${XDG_CACHE_HOME}
+
+luakit -U
Please sign in to comment.
Something went wrong with that request. Please try again.