diff --git a/CMakeLists.txt b/CMakeLists.txt index e9f8aa25b..115bc10d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,6 @@ set(AWE_SRCS set(AWE_MAN_SRCS ${SOURCE_DIR}/manpages/awesome.1.txt - ${SOURCE_DIR}/manpages/awsetbg.1.txt ${SOURCE_DIR}/manpages/awesome-client.1.txt ${SOURCE_DIR}/manpages/awesomerc.5.txt) set(AWE_MAN_LANGS it es fr de ru) @@ -295,7 +294,6 @@ endif() # {{{ Installation install(TARGETS ${PROJECT_AWE_NAME} RUNTIME DESTINATION bin) -install(FILES "utils/awsetbg" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(FILES "utils/awesome-client" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(DIRECTORY ${BUILD_DIR}/lib DESTINATION ${AWESOME_DATA_PATH} PATTERN "*.in" EXCLUDE) diff --git a/lib/beautiful.lua.in b/lib/beautiful.lua.in index 88eb97051..e8a800f5e 100644 --- a/lib/beautiful.lua.in +++ b/lib/beautiful.lua.in @@ -86,12 +86,6 @@ function beautiful.init(path) end end - -- setup wallpaper - if theme.wallpaper_cmd then - for s = 1, capi.screen.count() do - util.spawn(theme.wallpaper_cmd[util.cycle(#theme.wallpaper_cmd, s)], false, s) - end - end if theme.font then set_font(theme.font) end if theme.fg_normal then capi.awesome.fg = theme.fg_normal end if theme.bg_normal then capi.awesome.bg = theme.bg_normal end diff --git a/manpages/awsetbg.1.de.txt b/manpages/awsetbg.1.de.txt deleted file mode 100644 index b342d67be..000000000 --- a/manpages/awsetbg.1.de.txt +++ /dev/null @@ -1,72 +0,0 @@ -awsetbg(1) -========= - -NAME ----- -awsetbg - awesome Wrapper Werkzeug zum Setzen des Hintergrundbildes - -SYNTAX ------- -*awsetbg* [-fctaFCTA Hintergrundbild] [-uU Hintergrundbildsetzer] [-m #] [-bB fbsetrootoptionen ...] [-rR Pfad] [-l] - -BESCHREIBUNG ------------- -*awsetbg* ist ein Wrapper, welches versucht eine passende Anwendung zum Setzen des Hintergrundbildes zu finden und setzt über diese Anwendung das Hintergrundbild. Sie müssen *awsetbg* dabei nicht konfigurieren, da es lediglich die erst beste Anwendung nutzt um das Hintergrundbild zu setzen. - -Des Weiteren merkt es sich das zuletzt gesetzte Hintergrundbild. Auf -diese Weise muss nichts geändert werden um das Hintergrundbild zu -ändern. - -OPTIONEN --------- -*-f* Datei:: - Das Vollbild Hintergrundbild. -*-c* Datei:: - Das zentrierte Hintergrundbild. -*-t* Datei:: - Das geteilte Hintergrundbild. -*-a* Datei:: - Setzt das vergrößerte Hintergrundbild unter Berücksichtigung der Seitenverhältnisse. Wenn die gewählte Anwendung diese Option nicht unterstützt, wird auf Vollbild zurückgegriffen. -*-u* Hintergrundbildsetzer:: - Benutzt die angegebene Anwendung um das Hintergrundbild zu setzen. -*-r* Verzeichnis:: - Setze ein beliebiges Hintergrundbild aus diesem Verzeichnis. -*-F, -C, -T, -A, -U, -R*:: - Identisch mit den klein geschriebenen Optionen, allerdings ohne zukünftige Speicherung. -*-l*:: - Setzt das zuletzt verwendete Hintergrundbild. Wenn zuletzt ein beliebiges Hintergrundbild verwendet wurde, wird wieder ein beliebiges Hintergrundbild aus dem gleichen Verzeichnis verwendet. -*-i*:: - Zeigt nützliche Informationen über die passendste Anwendung zum Setzen des Hintergrundbildes an. -*-m #*:: - Benutzt montage um ein großes Bild zu erstellen (das Bild sollte in die Bildschirmgröße passen). Benötigt montage(1). - # ist die Anzahl der Bildschirmen (Spalten in montage). -*-p*:: - Zeige nützliche Tipps. -*-h*:: - Zeige die Hilfe. - -DATEIEN -------- -$XDG_CACHE_HOME/awesome/lastwallpaper oder $HOME/.cache/awesome/lastwallpaper -Dateien beinhalten das letzte Hintrgrundbild, welches mit der Option -l genutzt wird. - -UMGEBUNGSVARIABLEN ------------------- -*wpsetters*:: - Programm zum setzen des Hintergrundes. -*DISPLAY*:: - Anzeige auf der das Hintergrundbild gezeigt werden soll. - -SIEHE AUCH ----------- -awesome(1) - - -AUTOREN -------- -Julien Danjou und andere. -awsetbg stammt von fbsetbg ab, welches von Han Boetes geschrieben wurde. - -WWW ---- -http://awesome.naquadah.org diff --git a/manpages/awsetbg.1.es.txt b/manpages/awsetbg.1.es.txt deleted file mode 100644 index ef15f4195..000000000 --- a/manpages/awsetbg.1.es.txt +++ /dev/null @@ -1,87 +0,0 @@ -awsetbg(1) -========= - -NOMBRE ------- -awsetbg - herramienta para establecer el fondo de pantalla en awesome - -SINOPSIS --------- -*awsetbg* [-fctaFCTA fondodepantalla] [-uU programa] [-m #] [-bB opcionesfbsetroot ...] [-rR directorio] [-l] - -DESCRIPCIÓN ------------ -*awsetbg* es un programa que intenta encontrar una aplicación adecuada para -establecer el fondo de pantalla, y posteriormente establece el fondo de -pantalla utilizando esa aplicación. No es necesario configurar *awsetbg*, -puesto que simplemente utiliza la primera aplicación que encuentra. - -Además, almacena automáticamente el último fondo de pantalla utilizado, -por lo que no es necesario editar ningún archivo para cambiar el fondo -de pantalla. - -OPCIONES -------- -*-f* fichero:: - Establece un fondo de pantalla a pantalla completa. -*-c* fichero:: - Establece un fondo de pantalla centrado. -*-t* fichero:: - Establece un fondo de pantalla en mosaico. -*-a* fichero:: - Establece un fondo de pantalla con el máximo tamaño posible pero - conservando la relación de aspecto. Si la aplicación utilizada no - soporta este modo, se muestra a pantalla completa. -*-u* programa:: - Indica el programa a utilizar para establecer el fondo de pantalla. -*-r* directorio:: - Establece como fondo de pantalla un archivo al azar de ese directorio. -*-F, -C, -T, -A, -U, -R*:: - Tienen la misma función que la opción correspondiente en minúscula, - pero sin guardar la nueva configuración automáticamente. -*-l*:: - Vuelve al fondo de pantalla utilizado anteriormente. Si el fondo de - pantalla anterior fue escogido al azar en un directorio, se utilizará - otro fondo al azar de ese mismo directorio. -*-i*:: - Muestra información acerca de la mejor aplicación para establecer el - fondo de pantalla que fue encontrada. -*-m #*:: - Utiliza montage para crear una imagen de gran tamaño (la imagen debe - corresponder al tamaño de la pantalla). Requiere el programa montage(1). - # es el número de pantallas (columnas en montage). -*-p*:: - Muestra consejos útiles para el uso del programa. -*-h*:: - Muestra información de ayuda. - -FICHEROS --------- -Los ficheros $XDG_CACHE_HOME/awesome/lastwallpaper o -$HOME/.cache/awesome/lastwallpaper contienen información sobre el último -fondo de pantalla utilizado. La opción -l hace uso de esta información. - -VARIABLES DE ENTORNO --------------------- -*wpsetters*:: - Indica los programas para establecer el fondo de pantalla a utilizar. -*DISPLAY*:: - Indica el DISPLAY en el que se quiere establecer el fondo de pantalla. - -VÉASE TAMBIÉN -------------- -awesome(1) - - -AUTORES -------- -Julien Danjou y otros. -awsetbg está derivado de fbsetbg, que ha sido escrito por Han Boetes . - -WWW ---- -http://awesome.naquadah.org - -TRADUCCIÓN ----------- -Esta página de manual ha sido traducida por Diego Moreda. diff --git a/manpages/awsetbg.1.fr.txt b/manpages/awsetbg.1.fr.txt deleted file mode 100644 index 56d9bf8d1..000000000 --- a/manpages/awsetbg.1.fr.txt +++ /dev/null @@ -1,94 +0,0 @@ -awsetbg(1) -========== - -NOM ---- -awsetbg - outil d'awesome pour définir l'arrière-plan - -SYNOPSIS --------- -*awsetbg* [-fctaFCTA wallpaper] [-uU wallpapersetter] [-m #] [-bB fbsetrootoptions ...] [-rR path] [-l] - -DESCRIPTION ------------ -*awsetbg* est un outil qui essaie de trouver une application adéquate de -paramétrage d'arrière-plan, puis met en place le papier peint utilisant -cette application. -Vous n'avez pas à configurer *awsetbg*, puisqu'il utilise seulement la -première application trouvée. - -De plus, il mémorise le dernier papier peint mis en place, donc vous n'avez pas à éditer quoi que ce soit pour en changer. - -OPTIONS -------- -*-f* file:: - Met en place le papier peint spécifié. -*-c* file:: - Centre le papier peint spécifié. -*-t* file:: - Met en place le papier peint spécifié en mosaïque. -*-a* file:: - Maximise le papier peint, tout en préservant sa forme. Si l'application choisie ne supporte pas cette option, le plein écran -est utilisé comme solution de rechange. -*-u* wallpapersetter:: - Utilise l'outil de mise en place de papier peint spécifié. -*-r* directory:: - Met en place un papier peint choisi aléatoirement dans ce - répertoire. -*-F, -C, -T, -A, -U, -R*:: - Identique à l'option en minuscule, mais sans mémorisation. -*-l*:: - Met en place le papier peint précédent. Si l'option -r a été utilisée précédemment, un autre papier peint du même répertoire sera choisi aléatoirement. -*-i*:: - Affiche des informations utiles sur la meilleure application pour -mettre en place le papier peint voulu. -*-m #*:: - Utilise la commande montage pour créer une grande image (l'image doit -correspondre à la taille de l'écran). Nécéssite la commande montage(1). - # est le nombre d'écrans (colonnes dans montage). -*-p*:: - Affiche des infobulles utiles. -*-h*:: - Affiche un message d'aide. - -FICHIERS --------- - -Le fichier $XDG_CACHE_HOME/awesome/lastwallpaper ou -$HOME/.cache/awesome/lastwallpaper contient le dernier papier peint mis en place, à utiliser avec l'option -l. - -VARIABLES D'ENVIRONNEMENT -------------------------- -*wpsetters*:: - Outils de mise en place de papier peint à utiliser. -*DISPLAY*:: - Écran choisi pour mettre en place le papier peint. - -VOIR AUSSI ----------- - -awesome(1) - - -AUTEURS -------- - -Julien Danjou et d'autres personnes. -awsetbg est issu de fbsetbg qui a été écrit par Han Boetes -. - -WWW ---- - -http://awesome.naquadah.org - -TRADUCTION ----------- - -Ce document est une traduction, réalisée par Jean-Luc Duflot - le 20 février 2012. - -L'équipe de traduction a fait le maximum pour réaliser une adaptation -française de qualité. -La version anglaise la plus à jour de ce document est toujours consultable via la commande : LANGUAGE=en man awsetbg. -N'hésitez pas à signaler à l'auteur ou au traducteur, selon le cas, toute erreur dans cette page de manuel. diff --git a/manpages/awsetbg.1.it.txt b/manpages/awsetbg.1.it.txt deleted file mode 100644 index 65b524d6c..000000000 --- a/manpages/awsetbg.1.it.txt +++ /dev/null @@ -1,81 +0,0 @@ -awsetbg(1) -========= - -NOME ----- -awsetbg - strumento per impostare lo sfondo dello schermo in awesome - -SINOSSI --------- -*awsetbg* [-fctaFCTA wallpaper] [-uU applicazione] [-m #] [-bB fbsetrootoptions ...] [-rR path] [-l] - -DESCRIZIONE ------------ -*awsetbg* è un programma che tenta di trovare un'applicazione adatta a impostare lo sfondo -dello schermo e quindi cerca di impostare lo sfondo usando tale applicazione. Non c'è -bisogno di configurare *awsetbg*, dal momento che esso usa semplicemente la prima applicazione -adatta che trova. - -Inoltre, si ricorda l'ultimo sfondo impostato, così che non è necessario -editare alcunchè per cambiare lo sfondo. - -OPZIONI -------- -*-f* file:: - Imposta lo sfondo a tutto schermo. -*-c* file:: - Imposta lo sfondo come centrato. -*-t* file:: - Imposta lo sfondo come mosaico. -*-a* file:: - Imposta lo sfondo alla massima dimensione possibile, rispettando il rapporto d'aspetto - (aspect ratio). Se l'applicazione scelta non supporta questa opzione, viene utilizzata - la modalità a tutto schermo. -*-u* applicazione:: - Usa l'applicazione specificata per impostare lo sfondo dello schermo. -*-r* directory:: - Imposta uno sfondo qualsiasi tra quelli in questa directory. -*-F, -C, -T, -A, -U, -R*:: - Uguale ai corrispettivi in minuscolo, ma senza ricordare i valori. -*-l*:: - Imposta lo sfondo precedente. Se lo sfondo è stato precedentemente scelto - a caso, imposterà un'altro sfondo casualmente dalla stessa directory. -*-i*:: - Mostra informazioni sulla migliore applicazione trovata per impostare lo sfondo. -*-m #*:: - Usa montage per creare un'immagine grande (deve corrispondere alla dimensione dello - schermo). Richiede montage(1). # è il numero degli schermi (colonne in montage). -*-p*:: - Mostra consigli utili per l'uso del programma. -*-h*:: - Mostra informazioni di aiuto. - -FILES ------ -$XDG_CACHE_HOME/awesome/lastwallpaper o $HOME/.cache/awesome/lastwallpaper -files contengono l'ultimo sfondo impostato da usare con l'opzione -l. - -VARIABILI D'AMBIENTE --------------------- -*wpsetters*:: - L'applicazione per impostare lo sfondo da utilizzare. -*DISPLAY*:: - Indica lo schermo dove si vuole impostare lo sfondo. - -VEDI ANCHE ----------- -awesome(1) - - -AUTORI ------- -Julien Danjou e altri. -awsetbg è derivato da fbsetbg che è stato scritto da Han Boetes . - -WWW ---- -http://awesome.naquadah.org - -TRADUZIONE ----------- -Questa pagina di manuale è stata tradotta da Gianluca Fiore. diff --git a/manpages/awsetbg.1.ru.txt b/manpages/awsetbg.1.ru.txt deleted file mode 100644 index 055664088..000000000 --- a/manpages/awsetbg.1.ru.txt +++ /dev/null @@ -1,85 +0,0 @@ -awsetbg(1) -========= - -ИМЯ ---- -awsetbg - инструмент-обёртка для установки фона для потрясающего оконного менеджера - -СИНОПСИС --------- -*awsetbg* [-fctaFCTA wallpaper] [-uU wallpapersetter] [-m #] [-bB fbsetrootoptions ...] [-rR path] [-l] - -ОПИСАНИЕ --------- -*awsetbg* — это скрипт-обёртка, который пытается найти подходящее приложение -для установки фона и установить обои на рабочий стол с его помощью. Настраивать -его не нужно, так как он использует первый найденный инструмент. - -Более того, он запоминает последние установленные обои, так что вам не нужно -ничего править, чтобы сменить их. - -ОПЦИИ ------ -*-f* file:: - Установить обои на весь экран. -*-c* file:: - Установить обои по центру. -*-t* file:: - Установить обои мозаикой. -*-a* file:: - Установить обои, растянутые на весь экран, с сохранением соотношения - сторон. Если выбранное приложение не поддерживает такой режим, то - используется простая растяжка на весь экран. -*-u* wallpapersetter:: - Использовать заданный инструмент для установки обоев. -*-r* directory:: - Установить случайные обои из заданного каталога. -*-F, -C, -T, -A, -U, -R*:: - То же, что опции в нижнем регистре, но настройки не запоминаются. -*-l*:: - Установить предыдущие использованные обои. Если обои до этого были выбраны - случайно, то в этот раз будут выбраны другие случайные обои из последнего - использованного каталога. -*-i*:: - Отобразить информацию о самом лучшем найденном приложении для установки - обоев. -*-m #*:: - Скомбинировать большое изображение из нескольких (должно быть на полный - экран). Требует montage(1) для своей работы. # — это число экранов (колонок - при монтаже). -*-p*:: - Отобразить полезные советы. -*-h*:: - Отобразить справку. - -ФАЙЛЫ ------ -Файл $XDG_CACHE_HOME/awesome/lastwallpaper или $HOME/.cache/awesome/lastwallpaper -содержит последние установленные обои для использования с опцией -l. - -ПЕРЕМЕННЫЕ СРЕДЫ ----------------- -*wpsetters*:: - Приложение для установки обоев, которое надо использовать. -*DISPLAY*:: - Дисплей, на который вы хотите поместить обои. - -СМОТРИ ТАКЖЕ ------------- -awesome(1) - - -АВТОРЫ ------- -Julien Danjou и другие. -Основа awsetbg была взята из fbsetbg, который был написан Han Boetes . - -WWW ---- -http://awesome.naquadah.org - -ПЕРЕВОД -------- - -Это руководство переведено на русский язык Константином Степановым -13 апреля 2011 года. diff --git a/manpages/awsetbg.1.txt b/manpages/awsetbg.1.txt deleted file mode 100644 index 52d1de9bf..000000000 --- a/manpages/awsetbg.1.txt +++ /dev/null @@ -1,75 +0,0 @@ -awsetbg(1) -========= - -NAME ----- -awsetbg - awesome wrapper tool to set background - -SYNOPSIS --------- -*awsetbg* [-fctaFCTA wallpaper] [-uU wallpapersetter] [-m #] [-bB fbsetrootoptions ...] [-rR path] [-l] - -DESCRIPTION ------------ -*awsetbg* is a wrapper that tries to find a suitable background setting application and then -tries to set the wallpaper using that application. You do not have to configure *awsetbg*, since -it just uses the first application it finds. - -Furthermore, it remembers the last wallpaper set, so you do not have to edit anything to change -the wallpaper. - -OPTIONS -------- -*-f* file:: - Set fullscreen wallpaper. -*-c* file:: - Set centered wallpaper. -*-t* file:: - Set tiled wallpaper. -*-a* file:: - Set maximized wallpaper, preserving the aspect ratio. If the application chosen does not support this - option, fullscreen is used as fall back. -*-u* wallpapersetter:: - Use the specified wallpaper setter tool. -*-r* directory:: - Set a random wallpaper from this directory. -*-F, -C, -T, -A, -U, -R*:: - Same as the lowercase options, but without remembering. -*-l*:: - Set the previous wallpaper. If the random feature was the last used, it will set another - random wallpaper from this same directory. -*-i*:: - Display useful information about the best application to set the wallpaper found. -*-m #*:: - Use montage to create a big image (image should fit screen size). Requires montage(1). - # is the number of screens (columns in montage). -*-p*:: - Display useful tips. -*-h*:: - Display help message. - -FILES ------ -$XDG_CACHE_HOME/awesome/lastwallpaper or $HOME/.cache/awesome/lastwallpaper -files contains the last wallpaper set to use with the -l option. - -ENVIRONMENT VARIABLES ---------------------- -*wpsetters*:: - Wallpaper setters to use. -*DISPLAY*:: - Display you want to set the wallpaper on. - -SEE ALSO --------- -awesome(1) - - -AUTHORS -------- -Julien Danjou and others. -awsetbg is derived from fbsetbg which was written by Han Boetes . - -WWW ---- -http://awesome.naquadah.org diff --git a/themes/default/theme.lua.in b/themes/default/theme.lua.in index 6699acdf0..8ba91b9b0 100644 --- a/themes/default/theme.lua.in +++ b/themes/default/theme.lua.in @@ -72,9 +72,6 @@ theme.titlebar_maximized_button_focus_inactive = "@AWESOME_THEMES_PATH@/default theme.titlebar_maximized_button_normal_active = "@AWESOME_THEMES_PATH@/default/titlebar/maximized_normal_active.png" theme.titlebar_maximized_button_focus_active = "@AWESOME_THEMES_PATH@/default/titlebar/maximized_focus_active.png" --- You can use your own command to set your wallpaper -theme.wallpaper_cmd = { "awsetbg @AWESOME_THEMES_PATH@/default/background.png" } - -- You can use your own layout icons like this: theme.layout_fairh = "@AWESOME_THEMES_PATH@/default/layouts/fairhw.png" theme.layout_fairv = "@AWESOME_THEMES_PATH@/default/layouts/fairvw.png" diff --git a/themes/sky/theme.lua.in b/themes/sky/theme.lua.in index 9717e3fa5..9b37aa39e 100644 --- a/themes/sky/theme.lua.in +++ b/themes/sky/theme.lua.in @@ -46,7 +46,6 @@ theme.taglist_squares_sel = "@AWESOME_THEMES_PATH@/default/taglist/squarefw.pn theme.taglist_squares_unsel = "@AWESOME_THEMES_PATH@/default/taglist/squarew.png" -- MISC -theme.wallpaper_cmd = { "awsetbg @AWESOME_THEMES_PATH@/sky/sky-background.png" } theme.taglist_squares = "true" theme.titlebar_close_button = "true" theme.menu_height = 15 diff --git a/themes/zenburn/theme.lua.in b/themes/zenburn/theme.lua.in index 13f58a990..def52f227 100644 --- a/themes/zenburn/theme.lua.in +++ b/themes/zenburn/theme.lua.in @@ -8,7 +8,6 @@ -- {{{ Main theme = {} -theme.wallpaper_cmd = { "awsetbg @AWESOME_THEMES_PATH@/zenburn/zenburn-background.png" } -- }}} -- {{{ Styles diff --git a/utils/awsetbg b/utils/awsetbg deleted file mode 100755 index 50a1f3326..000000000 --- a/utils/awsetbg +++ /dev/null @@ -1,559 +0,0 @@ -#!/bin/sh -# -# Set wallpaper for awesome. -# Copyright (c) 2008 Julien Danjou -# -# Derived from fbsetbg: -# Copyright (c) 2003-2004 Han Boetes -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# Portability notes: -# To guarantee this script works on all platforms that support awesome -# please keep the following restrictions in mind: -# -# - don't use if ! command;, use command; if [ $? -ne 0 ]; -# - don't use [ -e file ] use [ -r file ] -# - don't use $(), use `` -# - don't use ~, use ${HOME} -# - don't use id -u or $UID, use whoami -# - don't use echo -e -# - getopts won't work on all platforms, but the config-file can -# compensate for that. -# - various software like grep/sed/perl may be not present or not -# the version you have. for example grep '\W' only works on gnu-grep. -# Keep this in mind, use bare basic defaults. -# - Do _NOT_ suggest to use #!/bin/bash. Not everybody uses bash. - -# TODO purheps: xprop -root _WIN_WORKSPACE -# _NET_CURRENT_DESKTOP - -if [ -z "$XDG_CACHE_HOME" ] -then - CONFIG_DIR="${HOME}/.cache/awesome" -else - CONFIG_DIR="${XDG_CACHE_HOME}/awesome" -fi - -# The wallpapersetter is selected in this order -wpsetters="${wpsetters:=Esetroot habak feh hsetroot chbg fvwm-root imlibsetroot xli display qiv xv xsri xsetbg wmsetbg xsetroot}" # broken icewmbg' -lastwallpaper="${CONFIG_DIR}/lastwallpaper" - - -WHOAMI=`whoami` -[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin - -command="`basename \"$0\"`" - - -# Functions -display_usage() { - cat << EOF -Usage: $command [-u/-U [wallpapersetter]] [-fFcCtTaA] [-m #] /path/to/wallpaper - $command [-u/-U [wallpapersetter]] [-fFcCtTaA] [-m #] -r/-R /path/to/wallpaperdirectory - $command [-lhip] -Use \`\`$command -h'' for a complete help message. - -EOF -} - -display_help() { - display_usage - cat << EOF - -Options: - - -f Set fullscreen wallpaper (default). - -c Set centered wallpaper. - -t Set tiled wallpaper. - -a Set maximized wallpaper, preserving aspect. - ( if your bgsetter doesn't support this - we fall back to -f ) - -u Use specified wallpapersetter, use no argument to forget. - -r set random wallpaper from a directory - - -F,-C,-T,-A,-U,-R same as lowercase but without remembering. - - -h Display this help. - - -l Set previous wallpaper. - - -i Information about selected wallpaper command. - - -m # Use montage to create a big image (image should - fit screen size). Requires montage(1). - # is the number of screen (columns in montage) -Files: - - \$XDG_CACHE_HOME/awesome/lastwallpaper In this file the wallpaper you set - will be stored, for the -l option. -Environment variables: - wpsetters Wallpapersetters to use. - example: - wpsetters=feh awsetbg wallpaper.jpg - - DISPLAY The display you want to set the wallpaper on. - example: - DISPLAY=:0.0 awsetbg -l - -EOF -} - -find_it() { - [ -n "$1" ] && which $1 1>/dev/null 2>&1 -} - -message() { - extra_args="-default okay" - if find_it gxmessage; then - gxmessage $extra_args -center "$command: $@" & - else - xmessage $extra_args -center "$command: $@" & - fi -} - -remembercommand() { - grep -vs "|${DISPLAY}$" ${lastwallpaper} > ${lastwallpaper}.tmp - mv -f ${lastwallpaper}.tmp ${lastwallpaper} - # Make dir/../../path/file.jpg work - case $wallpaper in - # no spaces allowed between the varname and '|' - /*) echo $option $option2"|$wallpaper|$style|"$DISPLAY >> $lastwallpaper ;; - *) echo $option $option2"|$PWD/$wallpaper|$style|"$DISPLAY >> $lastwallpaper ;; - esac -} - -debugawsetbg() { - echo - echo $debugstory - echo $sad_esetroot_story - echo $sad_display_story - exit 0 -} - -if [ $# -eq 0 ]; then - message "no options given" - display_usage - exit 1 -fi - -# create directory and last wallpaper file -if [ ! -d "${CONFIG_DIR}" ]; then - mkdir -p "${CONFIG_DIR}" - touch ${lastwallpaper} -fi - -unset debug setterfromcommandline -# Parse command-line options -while [ $# -gt 0 ]; do - case "$1" in - -u) - if find_it "$2"; then - grep -v wpsetters $lastwallpaper > ${lastwallpaper}.tmp - echo "wpsetters $2" >> ${lastwallpaper}.tmp - mv ${lastwallpaper}.tmp $lastwallpaper - WPSETTER=$2 - setterfromcommandline=true - elif [ -z "$2" ]; then - grep -v wpsetters $lastwallpaper > ${lastwallpaper}.tmp - mv ${lastwallpaper}.tmp $lastwallpaper - message "wpsetter removed from historyfile" - exit 0 - else - message "Couldn't find \"$2\" for wallpapersetter" - display_usage - exit 1 - fi - shift 2 ;; - -U) - if find_it "$2"; then - WPSETTER=$2 - setterfromcommandline=true - else - message "Couldn't find \"$2\" for wallpapersetter" - display_usage - exit 1 - fi - shift 2 ;; - -i) debug=true - break ;; - -a) option='$aspect' - shift ;; - -f) option='$full' - shift ;; - -c) option='$center' - shift ;; - -t) option='$tile' - shift ;; - -A) option='$aspect' - remember=false - shift ;; - -F) option='$full' - remember=false - shift ;; - -C) option='$center' - remember=false - shift ;; - -T) option='$tile' - remember=false - shift ;; - -m) - montage=`which montage` - if test ! -z "$montage"; then - shift - if [ $# -eq 0 ]; then - echo "-m option need a columns argument" - exit # no more args - else - cols="$1"; shift - fns="" - i=$cols - while [ $i -gt 0 ]; do - fns="$fns $1" - i=$(($i - 1)) - done - shift - $montage $fns -geometry +0+0 -tile ${cols}x $CONFIG_DIR/montage.png - wallpaper=$CONFIG_DIR/montage.png - fi - else - shift - echo "montage not found. Falling back to single image" - fi - ;; - -r) option2=$option - option=random - wallpaper=$2 # in this case it's a dir - break ;; - -R) option2=$option - option=random - wallpaper=$2 # in this case it's a dir - remember=false - break ;; - -l) - if [ -r "$lastwallpaper" ]; then - option=`grep "|${DISPLAY}$" $lastwallpaper|cut -d'|' -f1` - option2=`echo $option|cut -d' ' -f2` - option=`echo $option|cut -d' ' -f1` - wallpaper=`grep "|${DISPLAY}$" $lastwallpaper|cut -d'|' -f2` - if [ -z "$wallpaper" ]; then - option=`grep "|${DISPLAY}.0$" $lastwallpaper|cut -d'|' -f1` - option2=`echo $option|cut -d' ' -f2` - option=`echo $option|cut -d' ' -f1` - wallpaper=`grep "|${DISPLAY}.0$" $lastwallpaper|cut -d'|' -f2` - fi - if [ -z "$wallpaper" ]; then - message "No previous wallpaper recorded for display ${DISPLAY}" - exit 1 - fi - else - message "No previous wallpaper recorded for display ${DISPLAY}" - exit 1 - fi - remember=false - break ;; - -z) - if [ -r "$lastwallpaper" ]; then - option=`grep "|${DISPLAY}$" $lastwallpaper|cut -d'|' -f1` - option2=`echo $option|cut -d' ' -f2` - option=`echo $option|cut -d' ' -f1` - style=`grep "|${DISPLAY}$" $lastwallpaper|cut -d'|' -f3` - wallpaper=`grep "|${DISPLAY}$" $lastwallpaper|cut -d'|' -f2` - if [ -z "$wallpaper" ]; then - option=`grep "|${DISPLAY}.0$" $lastwallpaper|cut -d'|' -f1` - option2=`echo $option|cut -d' ' -f2` - option=`echo $option|cut -d' ' -f1` - style=`grep "|${DISPLAY}.0$" $lastwallpaper|cut -d'|' -f3` - wallpaper=`grep "|${DISPLAY}.0$" $lastwallpaper|cut -d'|' -f2` - fi - fi - if [ "$style" != "style" -a -n "$wallpaper" ]; then - remember=false - break - fi - style="style" - shift ;; - -Z) - style="style" - shift ;; - -h) display_help ; exit 0 ;; - --) - message "$command doesn't recognize -- gnu-longopts." - message 'Use $command -h for a help message.' - display_usage - exit 1 ;; - -*) - message "unrecognized option "\`"$1'" - display_usage - exit 1 ;; - *) - if [ "$option" = random ]; then - option='$aspect' - elif [ ! -r "$1" ]; then - message "$1 isn't an existing wallpaper or a valid option." - display_usage - exit 1 - elif [ -z "$1" ]; then - message 'No wallpaper to set' - display_usage - exit 1 - else - wallpaper=$1 - break - fi ;; - esac -done - -# Find the default wallpapersetter -if [ "$setterfromcommandline" != true ]; then - if [ -r "$lastwallpaper" ]; then - wpsetters="`awk '/wpsetters/ {print $2}' $lastwallpaper` $wpsetters" - fi - for wpsetter in $wpsetters; do - if find_it $wpsetter; then - case $wpsetter in - Esetroot) - if ldd `which Esetroot`|grep libImlib 2>&1 > /dev/null; then - WPSETTER=$wpsetter - break - else - sad_esetroot_story="I also found Esetroot, but it doesn't have support for setting wallpapers. You need to install libimlib2 and rebuild Eterm to get it working." - fi - ;; - display) - if find_it xwininfo; then - WPSETTER=$wpsetter - break - else - sad_display_story="I also found display, but I need xwininfo for querying the root window geometry." - fi - ;; - *) - WPSETTER=$wpsetter - break - esac - fi - done -fi - -standardrant=\ -"$WPSETTER doesn't set the wallpaper properly. Transparency for -awesome and apps like aterm and xchat won't work right with -it. Consider installing feh, Esetroot -(from Eterm) or fvwm-root (from FVWM) and I'll use them instead." - -standardok=\ -"$WPSETTER is a nice wallpapersetter. You won't have any problems." - -case $WPSETTER in - chbg) - full='-once -mode maximize' - tile='-once -mode tile' - center='-once -mode center' - aspect='-once -mode smart -max_grow 100 -max_size 100' - debugstory="chbg supports all features but it doesn't report errors. I reported this bug to the chbg developers." - ;; - xsri) - full='--center-x --center-y --scale-width=100 --scale-height=100' - tile='--tile' - center='--center-x --center-y --color=black' - aspect='--center-x --center-y --scale-width=100 --scale-height=100 --keep-aspect --color=black' - debugstory=$standardok - ;; - display) - full="-sample `xwininfo -root 2> /dev/null|awk '/geom/{print $2}'` -window root" - tile='-window root' - center='-backdrop -window root' - aspect="`xwininfo -root 2> /dev/null|grep geom` -window root" - debugstory=$standardrant - ;; - Esetroot) - full='-scale' - tile='' - center='-c' - aspect='-fit' - debugstory=$standardok - ;; - wmsetbg) - full='-s -S' - tile='-t' - center='-b black -e' - aspect='-b black -a -S' - debugstory=$standardok - ;; - xsetbg) - tile='-border black' - center='-center -border black' - aspect='-fullscreen -border black' - full=$aspect #broken - debugstory="xsetbg is actually xli. The fillscreen option (-f) is broken, defaults to (-a). $standardrant" - ;; - xli) - tile='-onroot -quiet -border black' - center='-center -onroot -quiet -border black' - aspect='-fullscreen -onroot -quiet -border black' - full='-fillscreen -onroot -quiet -border black' - debugstory=$standardok - ;; - qiv) - full='--root_s' - tile='--root_t' - center='--root' - aspect='-m --root' - debugstory=$standardrant - ;; - xv) - full='-max -smooth -root -quit' - tile='-root -quit' - center='-rmode 5 -root -quit' - aspect='-maxpect -smooth -root -quit' - debugstory=$standardrant - ;; - feh) - full='--bg-scale' - tile='--bg-tile' - center='--bg-center' - aspect='--bg-fill' - debugstory=$standardok - ;; - hsetroot) - full='-fill' - tile='-tile' - center='-center' - aspect='-full' - debugstory=$standardok - ;; - habak) - full='-ms' - tile='' - center='-mC' - aspect='-mS' - debugstory=$standardok - ;; - fvwm-root) - tile='-r' - full=$tile - center=$tile - aspect=$tile - debugstory="fvwm-root can retain and publish the Pixmap, thus -supports transparency. But only these image formats are supported: -XBM, XPM, PNG, SVG and it is rather limited with options." - ;; - icewmbg) - tile='-s' - full=$tile - center=$tile - aspect=$tile - debugstory="icewmbg does support transparency, but only tiling. And I noticed odd -errormessages with aterm. Don't use it unless you have to." - ;; - xsetroot) - tile='-solid' - full=$tile - center=$tile - aspect=$tile - debugstory="I can't find an app to set the wallpaper with. Using xsetroot to set -a solid background. If you want to have a background image you should install Esetroot or feh." - wallpaper='#535d6c' - ;; - imlibsetroot) - tile='-t -p c' - full='-s f' - center='-p c' - aspect='-s a' - ;; - '') - message \ -"I can't find an app to set the wallpaper with. You can install one in -many many ways but I will give you some simple advice: install Eterm and -you're set. Eterm provides Esetroot and thats a great wallpaper setter. I -recommend you install the package provided by your distro." - exit 1 - ;; -esac - -if [ "$debug" = true ]; then - debugawsetbg - exit 0 -fi - -option=${option:='$full'} -option2=${option2:='$full'} - - -if [ -z "$DISPLAY" ]; then - message "You are not connected to an X session\nPerhaps you should set the DISPLAY environment variable?" - exit 1 -fi - - -# random wallpaper code -if [ "$option" = random ]; then - # Lets make one thing clear... - wallpaperdir="$wallpaper" - if [ -z "$wallpaperdir" ]; then - message "No random wallpaper directory specified." - exit 1 - fi - if [ -d "$wallpaperdir" ]; then - number_of_wallpapers=`ls "$wallpaperdir"|wc -l` - if find_it random_number; then - randomnumber=`random_number` - # some shells don't support $RANDOM - elif [ -z "$RANDOM" ]; then - randomnumber=`(echo $$ ;time ps; w ; date )2>&1 | cksum | cut -f1 -d' '` - else - randomnumber="$RANDOM" - fi - wallpapernumber=`expr $randomnumber % $number_of_wallpapers + 1` - #remember previous wallpaper - if [ ! "$remember" = false ]; then - remembercommand - fi - remember=false - #set -x - wallpaper="$wallpaperdir/`ls \"$wallpaperdir\"|sed -n ${wallpapernumber}p`" - option=$option2 # have to choose something... - else - message "Invalid random wallpaper directory specified." - exit 1 - fi -fi - - -if [ ! -r "$wallpaper" ] && [ $WPSETTER != "xsetroot" ]; then - message "Can't find wallpaper $wallpaper" - exit 1 -fi - - -$WPSETTER `eval echo $option` "$wallpaper" -if [ $? -ne 0 -a "$WPSETTER" != "display" ] || - [ $? -ne 1 -a "$WPSETTER" = "display" ]; then - message "Something went wrong while setting the wallpaper. -Run '$WPSETTER "`eval echo $option` $wallpaper"' from an xterm to find out what." - exit 1 -fi - - -#remember previous wallpaper -if [ ! "$remember" = false ]; then - remembercommand -fi