diff -Nru devilspie2-0.41/AUTHORS devilspie2-0.42/AUTHORS --- devilspie2-0.41/AUTHORS 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/AUTHORS 2017-01-14 10:46:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright © 2011-2016 Andreas Rönnquist. +# Copyright © 2011-2017 Andreas Rönnquist. # This file is distributed under the same license # as the devilspie2 package, see COPYING file. # diff -Nru devilspie2-0.41/ChangeLog devilspie2-0.42/ChangeLog --- devilspie2-0.41/ChangeLog 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/ChangeLog 2017-01-14 10:46:49.000000000 +0000 @@ -2,6 +2,11 @@ ChangeLog: ---------- +0.42 + * Support window focus / blur events + * Add example for Awesome window manager + * Updated French, Italian and Swedish translations + 0.41 * Set a correct version number @@ -236,7 +241,7 @@ -------------------------------------------------------------------------------- - Copyright © 2011-2015 Andreas Rönnquist. + Copyright © 2011-2017 Andreas Rönnquist. This file is distributed under the same license as the devilspie2 package, see COPYING file. diff -Nru devilspie2-0.41/debian/changelog devilspie2-0.42/debian/changelog --- devilspie2-0.41/debian/changelog 2016-04-07 16:03:03.000000000 +0000 +++ devilspie2-0.42/debian/changelog 2017-01-14 12:56:06.000000000 +0000 @@ -1,3 +1,10 @@ +devilspie2 (0.42-1) unstable; urgency=medium + + * New upstream version 0.42 + * Update Standards-Version to 3.9.8 (No changes required) + + -- Andreas Rönnquist Sat, 14 Jan 2017 13:56:06 +0100 + devilspie2 (0.41-1) unstable; urgency=medium * New Upstream Version diff -Nru devilspie2-0.41/debian/control devilspie2-0.42/debian/control --- devilspie2-0.41/debian/control 2016-04-07 16:03:03.000000000 +0000 +++ devilspie2-0.42/debian/control 2017-01-14 12:54:20.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Andreas Rönnquist Build-Depends: debhelper (>= 9.0.0), dpkg-dev (>= 1.16.1.1), pkg-config, libwnck-3-dev, libgtk-3-dev, libglib2.0-dev, liblua5.1-0-dev -Standards-Version: 3.9.7 +Standards-Version: 3.9.8 Homepage: http://www.gusnan.se/devilspie2 Vcs-Git: https://anonscm.debian.org/git/collab-maint/devilspie2.git Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/devilspie2.git diff -Nru devilspie2-0.41/development.txt devilspie2-0.42/development.txt --- devilspie2-0.41/development.txt 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/development.txt 2017-01-14 10:46:49.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright © 2011-2015 Andreas Rönnquist. +# Copyright © 2011-2017 Andreas Rönnquist. # This file is distributed under the same license # as the devilspie2 package, see COPYING file. # diff -Nru devilspie2-0.41/devilspie2.1 devilspie2-0.42/devilspie2.1 --- devilspie2-0.41/devilspie2.1 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/devilspie2.1 2017-01-14 10:46:49.000000000 +0000 @@ -1,5 +1,5 @@ .\" -.\" Copyright © 2011-2015 Andreas Rönnquist. +.\" Copyright © 2011-2017 Andreas Rönnquist. .\" This file is distributed under the same license .\" as the devilspie2 package, see COPYING file. .\" @@ -26,7 +26,7 @@ Emulate script behaviour. Using this option only emulates a scripts behaviour, and doesn't affect the windows that the scripts otherwise would modify. .IP "--wnck-version" -Show version of the libwnck used. (Only availible on GTK3 or later) +Show version of the libwnck used. (Only available on GTK3 or later) .SH Script Commands .TP @@ -35,5 +35,5 @@ .SH Author .B Devilspie2 -was written by Andreas Rönnquist , and is based on Devilspie +was written by Andreas Rönnquist , and is based on Devilspie by Ross Burton. diff -Nru devilspie2-0.41/doc/examples/awesome.lua devilspie2-0.42/doc/examples/awesome.lua --- devilspie2-0.41/doc/examples/awesome.lua 1970-01-01 00:00:00.000000000 +0000 +++ devilspie2-0.42/doc/examples/awesome.lua 2017-01-14 10:46:49.000000000 +0000 @@ -0,0 +1,46 @@ +-- Support Awesome 3.5 WM + +local posix = require("posix"); +local os = require("os"); + +local awesome = "/usr/bin/awesome-client" +if not posix.stat(awesome, "type") == "file" then + awesome = nil; +end + +-- Check for tiling mode +function is_tiling() + if awesome then + return true; + end + return false; +end + +-- Make window floating +-- Parameters: state - true to make window floating, else make window tiled +function set_tile_floating( state ) + if not awesome then + return nil; + end + + if state then state = "true" else state = "false" end + + local xid = get_window_xid(); + + local command = "echo "; + command = command .. "'"; + command = command .. " local naughty = require(\"naughty\");"; + command = command .. " local awcl = require(\"awful.client\");"; + command = command .. " local client = require(\"client\");"; + command = command .. " for k, c in pairs( client.get() ) do"; + command = command .. " if c.window == " .. xid .. " then"; + command = command .. " awcl.floating.set(c, " .. state .. ");"; + command = command .. " end"; + command = command .. " end"; + command = command .. "'"; + command = command .. " | "; + command = command .. awesome; + + debug_print("Awesome floating: " .. command); + return os.execute( command ); +end diff -Nru devilspie2-0.41/po/devilspie2.pot devilspie2-0.42/po/devilspie2.pot --- devilspie2-0.41/po/devilspie2.pot 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/devilspie2.pot 2017-01-14 10:46:49.000000000 +0000 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: devilspie2 0.39\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" -"POT-Creation-Date: 2016-03-09 10:23+0100\n" +"Project-Id-Version: devilspie2 0.42\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" +"POT-Creation-Date: 2017-01-04 15:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,87 +17,87 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: config.c:184 +#: config.c:192 msgid "script_folder isn't a folder." msgstr "" -#: config.c:196 script.c:238 +#: config.c:204 script.c:238 #, c-format msgid "Error: %s" msgstr "" -#: devilspie2.c:166 +#: devilspie2.c:181 msgid "Received signal:" msgstr "" -#: devilspie2.c:210 -msgid "No script files found in the script folder - exiting." -msgstr "" - -#: devilspie2.c:217 devilspie2.c:225 +#: devilspie2.c:232 #, c-format msgid "List of Lua files handling \"%s\" events in folder:" msgstr "" -#: devilspie2.c:293 +#: devilspie2.c:242 +msgid "No script files found in the script folder - exiting." +msgstr "" + +#: devilspie2.c:308 msgid "Print debug info to stdout" msgstr "" -#: devilspie2.c:296 +#: devilspie2.c:311 msgid "Don't apply any rules, only emulate execution" msgstr "" -#: devilspie2.c:299 +#: devilspie2.c:314 msgid "Search for scripts in this folder" msgstr "" -#: devilspie2.c:299 +#: devilspie2.c:314 msgid "FOLDER" msgstr "" -#: devilspie2.c:302 +#: devilspie2.c:317 msgid "Show Devilspie2 version and quit" msgstr "" -#: devilspie2.c:308 +#: devilspie2.c:323 msgid "Show libwnck version and quit" msgstr "" -#: devilspie2.c:327 +#: devilspie2.c:340 msgid "apply rules on windows" msgstr "" -#: devilspie2.c:334 +#: devilspie2.c:347 #, c-format msgid "option parsing failed: %s" msgstr "" -#: devilspie2.c:355 +#: devilspie2.c:370 msgid "Couldn't create the default folder for devilspie2 scripts." msgstr "" -#: devilspie2.c:382 +#: devilspie2.c:397 msgid "An X11 display is required for devilspie2." msgstr "" -#: devilspie2.c:390 +#: devilspie2.c:405 msgid "Couldn't init script error messages!" msgstr "" -#: devilspie2.c:411 +#: devilspie2.c:426 msgid "Running devilspie2 in debug and emulate mode." msgstr "" -#: devilspie2.c:413 +#: devilspie2.c:428 msgid "Running devilspie2 in debug mode." msgstr "" -#: devilspie2.c:418 +#: devilspie2.c:433 #, c-format msgid "Using scripts from folder: %s" msgstr "" -#: devilspie2.c:434 +#: devilspie2.c:449 msgid "Couldn't create directory monitor!" msgstr "" diff -Nru devilspie2-0.41/po/fi.po devilspie2-0.42/po/fi.po --- devilspie2-0.41/po/fi.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/fi.po 2017-01-14 10:46:49.000000000 +0000 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: devilspie2 0.28pre\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" "POT-Creation-Date: 2014-04-02 21:21+0200\n" "PO-Revision-Date: 2013-02-22 09:02+0200\n" "Last-Translator: Johan Lantto \n" diff -Nru devilspie2-0.41/po/fr.po devilspie2-0.42/po/fr.po --- devilspie2-0.41/po/fr.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/fr.po 2017-01-14 10:46:49.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: devilspie2 0.18\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" -"POT-Creation-Date: 2014-04-02 21:21+0200\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" +"POT-Creation-Date: 2016-07-06 12:26+0200\n" "PO-Revision-Date: 2012-04-15 15:44+0200\n" "Last-Translator: Robin Hahling \n" "Language-Team: French\n" @@ -17,143 +17,147 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: config.c:188 +#: config.c:192 msgid "script_folder isn't a folder." msgstr "script_folder n'est pas un dossier." -#: config.c:200 script.c:232 +#: config.c:204 script.c:238 #, c-format msgid "Error: %s" msgstr "Erreur: %s" -#: devilspie2.c:164 +#: devilspie2.c:181 msgid "Received signal:" msgstr "Signal reçu:" -#: devilspie2.c:208 -msgid "No script files found in the script folder - exiting." -msgstr "Aucun script trouvé dans le dossier de scripts - sortie du programme." - -#: devilspie2.c:215 devilspie2.c:223 +#: devilspie2.c:232 #, c-format msgid "List of Lua files handling \"%s\" events in folder:" msgstr "Liste des fichiers Lua gérant les évènements \"%s\"dans le dossier:" -#: devilspie2.c:289 +#: devilspie2.c:242 +msgid "No script files found in the script folder - exiting." +msgstr "Aucun script trouvé dans le dossier de scripts - sortie du programme." + +#: devilspie2.c:308 msgid "Print debug info to stdout" msgstr "Affiche les informations de debug dans la sortie standard (stdout)" -#: devilspie2.c:291 +#: devilspie2.c:311 msgid "Don't apply any rules, only emulate execution" msgstr "N'applique aucune règle, simule seulement l'exécution" -#: devilspie2.c:293 +#: devilspie2.c:314 msgid "Search for scripts in this folder" msgstr "Recherche de scripts dans ce dossier" -#: devilspie2.c:293 +#: devilspie2.c:314 msgid "FOLDER" msgstr "DOSSIER" -#: devilspie2.c:295 +#: devilspie2.c:317 msgid "Show Devilspie2 version and quit" msgstr "Affiche la version de Devilspie2 et quitte le programme" -#: devilspie2.c:300 +#: devilspie2.c:323 msgid "Show libwnck version and quit" msgstr "Affiche la version de libwnck et quitte le programme" -#: devilspie2.c:318 +#: devilspie2.c:342 msgid "apply rules on windows" msgstr "applique les règles sur les fenêtres" -#: devilspie2.c:325 +#: devilspie2.c:349 #, c-format msgid "option parsing failed: %s" msgstr "l'analyse des options a échoué: %s" -#: devilspie2.c:346 +#: devilspie2.c:370 msgid "Couldn't create the default folder for devilspie2 scripts." -msgstr "Impossible de créer le fichier par défaut pour les scripts devilspie2" +msgstr "Impossible de créer le fichier par défaut pour les scripts devilspie2." -#: devilspie2.c:373 +#: devilspie2.c:397 msgid "An X11 display is required for devilspie2." msgstr "Un affichage X11 est requis pour devilspie2." -#: devilspie2.c:381 +#: devilspie2.c:405 msgid "Couldn't init script error messages!" msgstr "Impossible d'initialiser le script de messages d'erreurs" -#: devilspie2.c:398 +#: devilspie2.c:426 msgid "Running devilspie2 in debug and emulate mode." -msgstr "Fonctionnement de devilspie2 en mode debug et simulation." +msgstr "Exécution de devilspie2 en mode debug et simulation." -#: devilspie2.c:400 +#: devilspie2.c:428 msgid "Running devilspie2 in debug mode." -msgstr "Fonctionnement de devilspie2 en mode debug." +msgstr "Exécution de devilspie2 en mode debug." -#: devilspie2.c:405 +#: devilspie2.c:433 #, c-format msgid "Using scripts from folder: %s" -msgstr "Utilise les scripts de ce dossier: %s" +msgstr "Utilise les scripts du dossier: %s" -#: devilspie2.c:421 +#: devilspie2.c:449 msgid "Couldn't create directory monitor!" msgstr "Impossible de créer le dossier moniteur!" -#: script_functions.c:732 script_functions.c:778 +#: script_functions.c:709 script_functions.c:755 #, c-format msgid "Workspace number %d does not exist!" msgstr "L'espace de travail numéro %d n'existe pas!" -#: script_functions.c:1673 +#: script_functions.c:1734 msgid "Could not get workspace" msgstr "Impossible d'obtenir l'espace de travail" -#: xutils.c:183 xutils.c:201 error_strings.c:127 +#: xutils.c:186 xutils.c:204 error_strings.c:136 msgid "Failed!" msgstr "Échec!" -#: error_strings.c:49 +#: error_strings.c:51 msgid "Couldn't allocate error string!" msgstr "Impossible d'allouer la chaine de caractères de l'erreur" -#: error_strings.c:51 +#: error_strings.c:53 msgid "No indata expected" msgstr "Aucune donnée d'entrée attendue" -#: error_strings.c:58 +#: error_strings.c:60 msgid "One indata expected" msgstr "Une donnée d'entrée attendue" -#: error_strings.c:65 +#: error_strings.c:67 msgid "Two indata expected" msgstr "Deux données d'entrée attendues" -#: error_strings.c:72 +#: error_strings.c:74 msgid "Four indata expected" msgstr "Quatre données d'entrée attendues" -#: error_strings.c:80 +#: error_strings.c:81 +msgid "One or two indata expected" +msgstr "Une ou deux données d'entrée attendues" + +#: error_strings.c:89 msgid "Number expected as indata" msgstr "Nombre attendu de données d'entrée" -#: error_strings.c:88 +#: error_strings.c:97 msgid "Boolean expected as indata" msgstr "Booléen attendu comme donnée d'entrée" -#: error_strings.c:96 +#: error_strings.c:105 msgid "String expected as indata" msgstr "Chaine de caractères attendue comme donnée d'entrée" -#: error_strings.c:104 +#: error_strings.c:113 msgid "Integer greater than zero expected" msgstr "Un entier plus grand que zéro est attendu" -#: error_strings.c:112 +#: error_strings.c:121 msgid "Could not find current viewport" msgstr "Impossible de trouver la fenêtre courante" -#: error_strings.c:120 +#: error_strings.c:129 msgid "Setting viewport failed" msgstr "Le paramétrage de la fenêtre a échoué" diff -Nru devilspie2-0.41/po/it.po devilspie2-0.42/po/it.po --- devilspie2-0.41/po/it.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/it.po 2017-01-14 10:46:49.000000000 +0000 @@ -1,13 +1,13 @@ # Italian translation for devilspie2 package. -# Copyright (C) 2016 The devilspie2's copyright holder +# Copyright (C) 2016-2017 The devilspie2's copyright holder # This file is distributed under the same license as the devilspie2 package. -# Nicola Fontana , 2016. +# Nicola Fontana , 2016-2017. # msgid "" msgstr "" -"Project-Id-Version: devilspie2 0.33pre\n" +"Project-Id-Version: devilspie2 0.42\n" "Report-Msgid-Bugs-To: gusnan@gusnan.se\n" -"POT-Creation-Date: 2014-04-02 21:21+0200\n" +"POT-Creation-Date: 2017-01-04 15:35+0100\n" "PO-Revision-Date: 2016-01-29 08:31+0100\n" "Last-Translator: Nicola Fontana \n" "Language-Team: Italian\n" @@ -16,143 +16,147 @@ "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: config.c:188 +#: config.c:192 msgid "script_folder isn't a folder." msgstr "script_folder non è una cartella." -#: config.c:200 script.c:232 +#: config.c:204 script.c:238 #, c-format msgid "Error: %s" msgstr "Errore: %s" -#: devilspie2.c:164 +#: devilspie2.c:181 msgid "Received signal:" msgstr "Segnale ricevuto:" -#: devilspie2.c:208 -msgid "No script files found in the script folder - exiting." -msgstr "Nessuno script trovato nella cartella script - uscita." - -#: devilspie2.c:215 devilspie2.c:223 +#: devilspie2.c:232 #, c-format msgid "List of Lua files handling \"%s\" events in folder:" msgstr "Elenco dei file Lua nella cartella che gestiscono l'evento \"%s\":" -#: devilspie2.c:289 +#: devilspie2.c:242 +msgid "No script files found in the script folder - exiting." +msgstr "Nessuno script trovato nella cartella script - uscita." + +#: devilspie2.c:308 msgid "Print debug info to stdout" msgstr "Stampa messaggi di debug su stdout" -#: devilspie2.c:291 +#: devilspie2.c:311 msgid "Don't apply any rules, only emulate execution" msgstr "Non applicare le regole, simularne solo l'esecuzione" -#: devilspie2.c:293 +#: devilspie2.c:314 msgid "Search for scripts in this folder" msgstr "Ricercare script in questa cartella" -#: devilspie2.c:293 +#: devilspie2.c:314 msgid "FOLDER" msgstr "CARTELLA" -#: devilspie2.c:295 +#: devilspie2.c:317 msgid "Show Devilspie2 version and quit" msgstr "Mostrare la versione di Devilspie2 e uscire" -#: devilspie2.c:300 +#: devilspie2.c:323 msgid "Show libwnck version and quit" msgstr "Mostrare la versione di libwnck e uscire" -#: devilspie2.c:318 +#: devilspie2.c:340 msgid "apply rules on windows" msgstr "applicare regole alla finestra" -#: devilspie2.c:325 +#: devilspie2.c:347 #, c-format msgid "option parsing failed: %s" msgstr "analisi opzioni fallita: %s" -#: devilspie2.c:346 +#: devilspie2.c:370 msgid "Couldn't create the default folder for devilspie2 scripts." msgstr "Non posso creare la cartella di default per gli script." -#: devilspie2.c:373 +#: devilspie2.c:397 msgid "An X11 display is required for devilspie2." msgstr "Devilspie2 richiede un display X11." -#: devilspie2.c:381 +#: devilspie2.c:405 msgid "Couldn't init script error messages!" msgstr "Impossibile inizializzare i messaggi di errore!" -#: devilspie2.c:398 +#: devilspie2.c:426 msgid "Running devilspie2 in debug and emulate mode." msgstr "Esecuzione di devilspie2 in modalità debug e emulazione." -#: devilspie2.c:400 +#: devilspie2.c:428 msgid "Running devilspie2 in debug mode." msgstr "Esecuzione di devilspie2 in modalità debug." -#: devilspie2.c:405 +#: devilspie2.c:433 #, c-format msgid "Using scripts from folder: %s" msgstr "Utilizzo script dalla cartella: %s" -#: devilspie2.c:421 +#: devilspie2.c:449 msgid "Couldn't create directory monitor!" msgstr "Impossibile creare la directory monitor!" -#: script_functions.c:732 script_functions.c:778 +#: script_functions.c:709 script_functions.c:755 #, c-format msgid "Workspace number %d does not exist!" msgstr "Il workspace %d non esiste!" -#: script_functions.c:1673 +#: script_functions.c:1734 msgid "Could not get workspace" msgstr "Impossibile leggere il workspace" -#: xutils.c:183 xutils.c:201 error_strings.c:127 +#: xutils.c:186 xutils.c:204 error_strings.c:136 msgid "Failed!" msgstr "Fallito!" -#: error_strings.c:49 +#: error_strings.c:51 msgid "Couldn't allocate error string!" msgstr "Impossibile allocare la stringa di errore!" -#: error_strings.c:51 +#: error_strings.c:53 msgid "No indata expected" msgstr "Nessun argomento atteso" -#: error_strings.c:58 +#: error_strings.c:60 msgid "One indata expected" msgstr "Un argomento atteso" -#: error_strings.c:65 +#: error_strings.c:67 msgid "Two indata expected" msgstr "Due argomenti attesi" -#: error_strings.c:72 +#: error_strings.c:74 msgid "Four indata expected" msgstr "Quattro argomenti attesi" -#: error_strings.c:80 +#: error_strings.c:81 +msgid "One or two indata expected" +msgstr "Uno o due argomenti attesi" + +#: error_strings.c:89 msgid "Number expected as indata" msgstr "Atteso argomento numerico" -#: error_strings.c:88 +#: error_strings.c:97 msgid "Boolean expected as indata" msgstr "Atteso argomento booleano" -#: error_strings.c:96 +#: error_strings.c:105 msgid "String expected as indata" msgstr "Atteso argomento stringa" -#: error_strings.c:104 +#: error_strings.c:113 msgid "Integer greater than zero expected" msgstr "Atteso intero maggiore o uguale a zero" -#: error_strings.c:112 +#: error_strings.c:121 msgid "Could not find current viewport" msgstr "Impossibile trovare la viewport attuale" -#: error_strings.c:120 +#: error_strings.c:129 msgid "Setting viewport failed" msgstr "Impostazione della viewport fallita" diff -Nru devilspie2-0.41/po/ja.po devilspie2-0.42/po/ja.po --- devilspie2-0.41/po/ja.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/ja.po 2017-01-14 10:46:49.000000000 +0000 @@ -1,12 +1,12 @@ # Japanese translations for devilspie2 package -# Copyright (C) 2011 Andreas Rönnquist +# Copyright (C) 2011 Andreas Rönnquist # This file is distributed under the same license as the PACKAGE package. -# Andreas Rönnquist , 2011. +# Andreas Rönnquist , 2011. # msgid "" msgstr "" "Project-Id-Version: devilspie2 0.39\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" "POT-Creation-Date: 2016-03-09 10:23+0100\n" "PO-Revision-Date: 2016-03-11 00:01+0900\n" "Last-Translator: Hiroshi Hasebe \n" diff -Nru devilspie2-0.41/po/Makefile devilspie2-0.42/po/Makefile --- devilspie2-0.41/po/Makefile 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/Makefile 2017-01-14 10:46:49.000000000 +0000 @@ -19,7 +19,7 @@ SOURCES = config.c devilspie2.c script.c script_functions.c xutils.c error_strings.c -XG_ARGS = --keyword=_ --keyword=N_ -w 80 --package-name=${NAME} --package-version=${VERSION} --msgid-bugs-address=gusnan@gusnan.se +XG_ARGS = --keyword=_ --keyword=N_ -w 80 --package-name=${NAME} --package-version=${VERSION} --msgid-bugs-address=gusnan@openmailbox.org LANGUAGES = sv fr pt_BR nl ru fi ja it LANGUAGES_MO = $(foreach currlang,$(LANGUAGES),$(currlang).mo) diff -Nru devilspie2-0.41/po/nl.po devilspie2-0.42/po/nl.po --- devilspie2-0.41/po/nl.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/nl.po 2017-01-14 10:46:49.000000000 +0000 @@ -1,13 +1,13 @@ # Dutch translation of Devilspie2 -# Copyright (C) 2011 Andreas Rönnquist +# Copyright (C) 2011 Andreas Rönnquist # This file is distributed under the same license as the devilspie2 package. -# Andreas Rönnquist , 2011. +# Andreas Rönnquist , 2011. # # msgid "" msgstr "" "Project-Id-Version: devilspie2 0.16\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" "POT-Creation-Date: 2016-03-09 15:21+0100\n" "PO-Revision-Date: 2016-03-09 15:25+0100\n" "Last-Translator: Frans de Jonge \n" diff -Nru devilspie2-0.41/po/pt_BR.po devilspie2-0.42/po/pt_BR.po --- devilspie2-0.41/po/pt_BR.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/pt_BR.po 2017-01-14 10:46:49.000000000 +0000 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: devilspie2 0.19\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" "POT-Creation-Date: 2014-04-02 21:21+0200\n" "PO-Revision-Date: 2012-06-05 14:01-0300\n" "Last-Translator: Helder Maximo Botter Ribas <>\n" diff -Nru devilspie2-0.41/po/ru.po devilspie2-0.42/po/ru.po --- devilspie2-0.41/po/ru.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/ru.po 2017-01-14 10:46:49.000000000 +0000 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: devilspie2 0.22pre\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" "POT-Creation-Date: 2014-04-02 21:21+0200\n" "PO-Revision-Date: 2014-02-20 15:06+0300\n" "Last-Translator: Roman V. Nikolaev \n" diff -Nru devilspie2-0.41/po/sv.po devilspie2-0.42/po/sv.po --- devilspie2-0.41/po/sv.po 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/po/sv.po 2017-01-14 10:46:49.000000000 +0000 @@ -1,14 +1,14 @@ # Swedish translation of Devilspie2 -# Copyright (C) 2011 Andreas Rönnquist +# Copyright (C) 2011-2017 Andreas Rönnquist # This file is distributed under the same license as the devilspie2 package. -# Andreas Rönnquist , 2011. +# Andreas Rönnquist , 2011-2017. # # msgid "" msgstr "" -"Project-Id-Version: devilspie2 0.26\n" -"Report-Msgid-Bugs-To: gusnan@gusnan.se\n" -"POT-Creation-Date: 2016-03-09 10:23+0100\n" +"Project-Id-Version: devilspie2 0.42\n" +"Report-Msgid-Bugs-To: gusnan@openmailbox.org\n" +"POT-Creation-Date: 2017-01-04 15:35+0100\n" "PO-Revision-Date: 2016-03-11 10:09+0100\n" "Last-Translator: Andreas Rönnquist \n" "Language-Team: Swedish\n" @@ -18,87 +18,87 @@ "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.6.10\n" -#: config.c:184 +#: config.c:192 msgid "script_folder isn't a folder." msgstr "script_folder är inte en folder." -#: config.c:196 script.c:238 +#: config.c:204 script.c:238 #, c-format msgid "Error: %s" msgstr "Fel: %s" -#: devilspie2.c:166 +#: devilspie2.c:181 msgid "Received signal:" msgstr "Tog emot signal:" -#: devilspie2.c:210 -msgid "No script files found in the script folder - exiting." -msgstr "Inga skript hittades i skript-mappen - avslutar." - -#: devilspie2.c:217 devilspie2.c:225 +#: devilspie2.c:232 #, c-format msgid "List of Lua files handling \"%s\" events in folder:" msgstr "Lista på Lua-filer som hanterar \"%s\"-händelser i mappen:" -#: devilspie2.c:293 +#: devilspie2.c:242 +msgid "No script files found in the script folder - exiting." +msgstr "Inga skript hittades i skript-mappen - avslutar." + +#: devilspie2.c:308 msgid "Print debug info to stdout" msgstr "Skriv ut debug-information till stdout" -#: devilspie2.c:296 +#: devilspie2.c:311 msgid "Don't apply any rules, only emulate execution" msgstr "Applicera inga regler, emulera endast körning" -#: devilspie2.c:299 +#: devilspie2.c:314 msgid "Search for scripts in this folder" msgstr "Sök efter skript i denna mapp" -#: devilspie2.c:299 +#: devilspie2.c:314 msgid "FOLDER" msgstr "MAPP" -#: devilspie2.c:302 +#: devilspie2.c:317 msgid "Show Devilspie2 version and quit" msgstr "Visa version av Devilspie2 och avsluta" -#: devilspie2.c:308 +#: devilspie2.c:323 msgid "Show libwnck version and quit" msgstr "Visa version av libwnck och avsluta" -#: devilspie2.c:327 +#: devilspie2.c:340 msgid "apply rules on windows" msgstr "applicera regler på fönster" -#: devilspie2.c:334 +#: devilspie2.c:347 #, c-format msgid "option parsing failed: %s" msgstr "tolkning av alternativ misslyckades; %s" -#: devilspie2.c:355 +#: devilspie2.c:370 msgid "Couldn't create the default folder for devilspie2 scripts." msgstr "Kunde inte skapa standard-mappen för devilspie2-skript." -#: devilspie2.c:382 +#: devilspie2.c:397 msgid "An X11 display is required for devilspie2." msgstr "En X11-display krävs för att köra devilspie2" -#: devilspie2.c:390 +#: devilspie2.c:405 msgid "Couldn't init script error messages!" msgstr "Kunde inte initiera skript-felmeddelanden!" -#: devilspie2.c:411 +#: devilspie2.c:426 msgid "Running devilspie2 in debug and emulate mode." msgstr "Kör Devilspie2 i debug och emulerings-mode" -#: devilspie2.c:413 +#: devilspie2.c:428 msgid "Running devilspie2 in debug mode." msgstr "Kör Devilspie2 i debug-mode" -#: devilspie2.c:418 +#: devilspie2.c:433 #, c-format msgid "Using scripts from folder: %s" msgstr "Använder skript från mappen: %s" -#: devilspie2.c:434 +#: devilspie2.c:449 msgid "Couldn't create directory monitor!" msgstr "Kunde inte skapa folder-monitor!" diff -Nru devilspie2-0.41/README devilspie2-0.42/README --- devilspie2-0.41/README 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/README 2017-01-14 10:46:49.000000000 +0000 @@ -42,10 +42,11 @@ by the --folder option. By default this folder is ~/.config/devilspie2/. If there is a file named devilspie2.lua in this folder, it is read and it is -searched for a variable (a lua table of strings) named scripts_window_close - +searched for a variable (a lua table of strings) named either +scripts_window_close, scripts_window_focus or scripts_window_blur - The filenames in the strings in this table will be called when windows are -closed. If these variables isn't present in this file, it will be called as a -devilspie2 script file like any other. +closed, focused or blurred respectively. If these variables isn't present in +this file, it will be called as a devilspie2 script file like any other. For example: diff -Nru devilspie2-0.41/src/config.c devilspie2-0.42/src/config.c --- devilspie2-0.41/src/config.c 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/config.c 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2013-2015 Andreas Rönnquist + * Copyright (C) 2013-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -38,8 +38,13 @@ /** * */ -GSList *file_window_open_list = NULL; -GSList *file_window_close_list = NULL; +GSList *event_lists[W_NUM_EVENTS] = { NULL, NULL, NULL, NULL }; +const char *event_names[W_NUM_EVENTS] = { + "window_open", + "window_close", + "window_focus", + "window_blur", +}; /** @@ -152,11 +157,14 @@ */ gboolean is_in_any_list(gchar *filename) { - gboolean result = FALSE; + win_event_type i; - if (is_in_list(file_window_close_list, filename)) result = TRUE; + for (i=0; i < W_NUM_EVENTS; i++) { + if (is_in_list(event_lists[i], filename)) + return TRUE; + } - return result; + return FALSE; } @@ -201,9 +209,15 @@ run_script(config_lua_state); - file_window_close_list = get_table_of_strings(config_lua_state, + event_lists[W_CLOSE] = get_table_of_strings(config_lua_state, script_folder, "scripts_window_close"); + event_lists[W_FOCUS] = get_table_of_strings(config_lua_state, + script_folder, + "scripts_window_focus"); + event_lists[W_BLUR] = get_table_of_strings(config_lua_state, + script_folder, + "scripts_window_blur"); } // add the files in the folder to our linked list @@ -227,7 +241,7 @@ g_free(temp_filename); } - file_window_open_list = temp_window_open_file_list; + event_lists[W_OPEN] = temp_window_open_file_list; EXITPOINT: if (config_lua_state) done_script(config_lua_state); @@ -240,7 +254,7 @@ /** * */ -void unalloacte_file_list(GSList *file_list) +void unallocate_file_list(GSList *file_list) { if (file_list) { @@ -261,11 +275,11 @@ */ void clear_file_lists() { - if (file_window_open_list) { - unalloacte_file_list(file_window_open_list); - } + win_event_type i = 0; - if (file_window_close_list) { - unalloacte_file_list(file_window_close_list); + for (i = 0; i < W_NUM_EVENTS; i++) { + if (event_lists[i]) { + unallocate_file_list(event_lists[i]); + } } } diff -Nru devilspie2-0.41/src/config.h devilspie2-0.42/src/config.h --- devilspie2-0.41/src/config.h 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/config.h 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2013-2015 Andreas Rönnquist + * Copyright (C) 2013-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -26,8 +26,16 @@ void clear_file_lists(); -extern GSList *file_window_open_list; -extern GSList *file_window_close_list; +typedef enum { + W_OPEN, + W_CLOSE, + W_FOCUS, + W_BLUR, + W_NUM_EVENTS /* keep this at the end */ +} win_event_type; + +extern GSList *event_lists[W_NUM_EVENTS]; +extern const char *event_names[W_NUM_EVENTS]; // Our git version which is defined through some magic in the build system extern const char *gitversion; diff -Nru devilspie2-0.41/src/devilspie2.c devilspie2-0.42/src/devilspie2.c --- devilspie2-0.41/src/devilspie2.c 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/devilspie2.c 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2005 Ross Burton, 2011-2015 Andreas Rönnquist + * Copyright (C) 2005 Ross Burton, 2011-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -76,7 +76,7 @@ set_current_window(window); // for every file in the folder - load the script - if (file_window_open_list != NULL) { + if (event_lists[W_OPEN] != NULL) { while(temp_file_list) { gchar *filename = (gchar*)temp_file_list->data; @@ -104,7 +104,7 @@ */ static void window_opened_cb(WnckScreen *screen, WnckWindow *window) { - load_list_of_scripts(screen, window, file_window_open_list); + load_list_of_scripts(screen, window, event_lists[W_OPEN]); } @@ -113,7 +113,20 @@ */ static void window_closed_cb(WnckScreen *screen, WnckWindow *window) { - load_list_of_scripts(screen, window, file_window_close_list); + load_list_of_scripts(screen, window, event_lists[W_CLOSE]); +} + + +/** + * + */ +static void window_changed_cb(WnckScreen *screen, WnckWindow *window) +{ + WnckWindow *cur; + + load_list_of_scripts(screen, window, event_lists[W_BLUR]); + cur = wnck_screen_get_active_window(screen); + load_list_of_scripts(screen, cur, event_lists[W_FOCUS]); } @@ -138,6 +151,8 @@ (GCallback)window_opened_cb, NULL); g_signal_connect(screen, "window-closed", (GCallback)window_closed_cb, NULL); + g_signal_connect(screen, "active-window-changed", + (GCallback)window_changed_cb, NULL); } } @@ -203,31 +218,31 @@ */ void print_script_lists() { + gboolean have_any_files = FALSE; + win_event_type i; + if (debug) printf("------------\n"); - if ((file_window_open_list == NULL) && (file_window_close_list == NULL)) { + for (i = 0; i < W_NUM_EVENTS; i++) { + if (event_lists[i]) + have_any_files = TRUE; + // If we are running debug mode - print the list of files: + if (debug) { + printf(_("List of Lua files handling \"%s\" events in folder:"), + event_names[i]); + printf("\n"); + if (event_lists[i]) { + print_list(event_lists[i]); + } + } + } + + if (!have_any_files) { printf("%s", _("No script files found in the script folder - exiting.")); printf("\n\n"); exit(EXIT_SUCCESS); } - - // If we are running debug mode - print the list of files: - if (debug) { - printf(_("List of Lua files handling \"%s\" events in folder:"), - "window_open"); - printf("\n"); - if (file_window_open_list) - print_list(file_window_open_list); - } - - if (debug) { - printf(_("List of Lua files handling \"%s\" events in folder:"), - "window_close"); - printf("\n"); - if (file_window_close_list) - print_list(file_window_close_list); - } } @@ -321,21 +336,21 @@ bind_textdomain_codeset(PACKAGE, ""); textdomain(PACKAGE); - gdk_init(&argc, &argv); - gchar *devilspie2_description = g_strdup_printf(_("apply rules on windows")); gchar *full_desc_string = g_strdup_printf("- %s", devilspie2_description); context = g_option_context_new(full_desc_string); - g_option_context_add_main_entries(context,options, NULL); + g_option_context_add_main_entries(context, options, NULL); if (!g_option_context_parse(context, &argc, &argv, &error)) { g_print(_("option parsing failed: %s"), error->message); printf("\n"); exit(EXIT_FAILURE); } + gdk_init(&argc, &argv); + g_free(full_desc_string); g_free(devilspie2_description); diff -Nru devilspie2-0.41/src/error_strings.c devilspie2-0.42/src/error_strings.c --- devilspie2-0.41/src/error_strings.c 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/error_strings.c 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2012-2015 Andreas Rönnquist + * Copyright (C) 2012-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/src/error_strings.h devilspie2-0.42/src/error_strings.h --- devilspie2-0.41/src/error_strings.h 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/error_strings.h 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2012-2015 Andreas Rönnquist + * Copyright (C) 2012-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/src/script.c devilspie2-0.42/src/script.c --- devilspie2-0.41/src/script.c 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/script.c 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2011-2015 Andreas Rönnquist + * Copyright (C) 2011-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/src/script_functions.c devilspie2-0.42/src/script_functions.c --- devilspie2-0.41/src/script_functions.c 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/script_functions.c 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2011-2015 Andreas Rönnquist + * Copyright (C) 2011-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/src/script_functions.h devilspie2-0.42/src/script_functions.h --- devilspie2-0.41/src/script_functions.h 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/script_functions.h 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2011-2015 Andreas Rönnquist + * Copyright (C) 2011-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/src/script.h devilspie2-0.42/src/script.h --- devilspie2-0.41/src/script.h 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/script.h 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2011-2015 Andreas Rönnquist + * Copyright (C) 2011-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/src/xutils.c devilspie2-0.42/src/xutils.c --- devilspie2-0.41/src/xutils.c 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/xutils.c 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2001 Havoc Pennington, 2011-2015 Andreas Rönnquist + * Copyright (C) 2001 Havoc Pennington, 2011-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/src/xutils.h devilspie2-0.42/src/xutils.h --- devilspie2-0.41/src/xutils.h 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/src/xutils.h 2017-01-14 10:46:49.000000000 +0000 @@ -1,6 +1,6 @@ /** * This file is part of devilspie2 - * Copyright (C) 2001 Havoc Pennington, 2011-2015 Andreas Rönnquist + * Copyright (C) 2001 Havoc Pennington, 2011-2017 Andreas Rönnquist * * devilspie2 is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff -Nru devilspie2-0.41/VERSION devilspie2-0.42/VERSION --- devilspie2-0.41/VERSION 2016-04-05 18:20:40.000000000 +0000 +++ devilspie2-0.42/VERSION 2017-01-14 10:46:49.000000000 +0000 @@ -1 +1 @@ -0.41 \ No newline at end of file +0.42 \ No newline at end of file