diff --git a/.gitmodules b/.gitmodules index 5fc7c14..1103114 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "modalbind"] path = modalbind url = https://github.com/crater2150/awesome-modalbind.git +[submodule "tapestry"] + path = tapestry + url = https://github.com/crater2150/awesome-tapestry.git diff --git a/autobeautiful.lua b/autobeautiful.lua deleted file mode 100644 index 6651085..0000000 --- a/autobeautiful.lua +++ /dev/null @@ -1,26 +0,0 @@ -local beautiful = require("beautiful") -local gears = require("gears") -local awful = require("awful") - -beautiful.init(awful.util.getdir("config") .. "/theme.lua") - -local wallpaperrc = awful.util.getdir("config") .. "/wallpaperrc.lua" -local f=io.open(wallpaperrc,"r") -if f~=nil then - io.close(f) - require("wallpaperrc") - for s in screen do - set_wallpaper(s) - end - screen.connect_signal("property::geometry", set_wallpaper) -elseif beautiful.wallpaper then - f = io.open(beautiful.wallpaper) - if f ~= nil then - io.close(f) - screen.connect_signal("property::geometry", function(s) - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end) - end -end - -return beautiful diff --git a/awsetbg b/awsetbg deleted file mode 100755 index e3ce5db..0000000 --- a/awsetbg +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/zsh - -WALLPAPERRC=$(awesome-client <<<'return require("awful").util.getdir("config") .. "/wallpaperrc.lua"' | sed -e 's/.*string "\(.*\)"/\1/') - -mode="-f" - -offset_x=(-x 0) -offset_y=(-y 0) -background=(-b "theme.bg_default") - -zparseopts -D -K h=help -help=help c=mode f=mode t=mode m=mode x:=offset_x y:=offset_y s:=screen i=ignore_aspect b:=background u=update U=reload r=reload - -wall=${1:a} - -if [ -n "$help" ] || [ -z "$wall" ]; then - echo "usage: $0 [opts] file -options: - -s screen number - -c centered - -f fit - -t tiled - -m maximized - -x, -y offset in x and y direction (for -t, -m) - -i ignore_aspect (for -m) - -b background color (for -c, -f) - -u update wallpaperrc - -U, -r reload from wallpaperrc" - exit 1 -fi - -if [[ -n "$reload" ]]; then - if [[ ! -e $WALLPAPERRC ]]; then - echo "No wallpaperrc found" - exit 1 - else - echo "dofile(\"$WALLPAPERRC\")" | awesome-client - exit 0 - fi -fi - -if [[ "${background[2]}" != "theme.bg_default" ]]; then - background[2]="'${background[2]}'" -fi - -case "$mode" in - -c) - method=centered - extra_args=", ${background[2]}" - ;; - -f) - method=fit - extra_args=", ${background[2]}" - ;; - -t) - method=tiled - extra_args=", {x = ${offset_x[2]}, y = ${offset_y[2]}}" - ;; - -m) - method=maximized - if [ -n "${ignore_aspect}" ]; then - ignore_aspect=true - else - ignore_aspect=false - fi - extra_args=", ${ignore_aspect}, {x = ${offset_x[2]}, y = ${offset_y[2]}}" - ;; - *) exit ;; -esac - -echo "require('gears').wallpaper.${method}(\"${wall}\",1${extra_args})" -echo "for s = 1, screen.count() do -require('gears').wallpaper.${method}(\"${wall}\",s${extra_args}) -end" | awesome-client - -if [[ -n "$update" ]]; then -echo "-- wallpaperrc generated by awsetbg -gears = require(\"gears\") -function set_wallpaper(s) - local wall=\"${wall}\" - local f = io.open(wall, \"r\") - if f~= nil then - gears.wallpaper.${method}(wall,s${extra_args}) - end -end" > $WALLPAPERRC -fi diff --git a/rc.lua b/rc.lua index 0593449..f3f2018 100644 --- a/rc.lua +++ b/rc.lua @@ -1,13 +1,17 @@ -- libraries {{{ local awful = require("awful") require("awful.autofocus") -beautiful = require("autobeautiful") +beautiful = require("beautiful") naughty = require("naughty") conf = require("localconf") require("errors") inspect = require("lib.inspect") -- }}} +beautiful.init(awful.util.getdir("config") .. "/theme.lua") + +require("tapestry") + -- {{{ Logging log = require("separable.simplelog") log.add_logger(log.loggers.stdio, log.level.DEBUG) diff --git a/scripts/awsetbg b/scripts/awsetbg deleted file mode 100755 index 4463ccb..0000000 --- a/scripts/awsetbg +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/zsh - -mode="-f" - -offset_x=(-x 0) -offset_y=(-y 0) -background=(-b "theme.bg_default") - -zparseopts -D -K h=help -help=help c=mode f=mode t=mode m=mode x:=offset_x y:=offset_y s:=screen i=ignore_aspect b:=background u=update - -wall="$1" - -if [ -n "$help" ] || [ -z "$wall" ]; then - echo "usage: $0 [opts] file -options: - -s screen number - -c centered - -f fit - -t tiled - -m maximized - -x, -y offset (for -t, -m) - -i ignore_aspect (for -m) - -b background color (for -c, -f) - -u update ~/.wallpaper symlink" - exit 1 -fi - -if [[ "${background[2]}" != "theme.bg_default" ]]; then - background[2]="'${background[2]}'" -fi - -case "$mode" in - -c) - method=centered - extra_args=", ${background[2]}" - ;; - -f) - method=fit - extra_args=", ${background[2]}" - ;; - -t) - method=tiled - extra_args=", {x = ${offset_x[2]}, y = ${offset_y[2]}}" - ;; - -m) - method=maximized - if [ -n "${ignore_aspect}" ]; then - ignore_aspect=true - else - ignore_aspect=false - fi - extra_args=", ${ignore_aspect}, {x = ${offset_x[2]}, y = ${offset_y[2]}}" - ;; - *) exit ;; -esac - -echo "require('gears').wallpaper.${method}(\"${wall}\",1${extra_args})" -echo "for s = 1, screen.count() do -require('gears').wallpaper.${method}(\"${wall}\",s${extra_args}) -end" | awesome-client - -if [[ -n "$update" ]]; then - rm ~/.wallpaper - ln -s ${wall} ~/.wallpaper -fi diff --git a/tapestry b/tapestry new file mode 160000 index 0000000..77c8c51 --- /dev/null +++ b/tapestry @@ -0,0 +1 @@ +Subproject commit 77c8c51231a2ad1c86a3e5ea97560a4417e3ff00