Ma config d'Awesome

Voici une config pour awesome. Y'a plus de commandes et de widgets qu'utilisés. Certaines commandes sont précédées de “--”, c'est parce qu'elle fonctionnent (je les ai testées), mais qu'elle ne me sont pas utiles pour mon usage actuel... Les choses étant changeantes, je les conserve, on sait jamais. Et puis ça peut être utile...

Il faut avoir installé les awesome-fonts (qui n'ont rien à voir avec Awesome le WM...)

rc.lua

vicious = require(“vicious”)

-- Standard awesome library local gears = require(“gears”) local awful = require(“awful”) awful.rules = require(“awful.rules”) require(“awful.autofocus”) -- Widget and layout library local wibox = require(“wibox”) -- Theme handling library local beautiful = require(“beautiful”) -- Notification library local naughty = require(“naughty”) local menubar = require(“menubar”)

-- Load Debian menu entries require(“debian.menu”)

-- WIDGET WIFI wifiwidget = wibox.widget.textbox() vicious.register(wifiwidget, vicious.widgets.wifi, ' <span color=“#66ff33”>  ${ssid} à ${linp}%</span> ', 2, “wlan0”)

-- WIDGET BATTERIE batwidget = wibox.widget.textbox() -- version simple : vicious.register(batwidget, vicious.widgets.bat, “ | ⚡: $2% - $3 | ”, 61, “BAT0”) -- version plus complexe, avec une notification quand la batterie est à 5% ou moins : vicious.register(batwidget, vicious.widgets.bat, function(widget, args) local label = { [“-”] = “”, [“+”] = “ ⚡”, [“↯”] = “ ↯”, [“⌁”] = “⌁” } if args[2] <= 5 then naughty.notify({ title=“ Attention chérie, ça va couper ! ”, text=“ La batterie est à : ”..args[2]..“% ”, bg=“#ff0000”, fg=“#000”, timeout=5, border_width=5, font=“Arial 25” }) end

-- NOTIFICATION POUR DÉBRANCHER QUAND BATTERIE EST PLEINE -- if args[2] == 100 then -- naughty.notify({ -- title=“ Débranche Tout ! ”, -- text=“ (♫ Choubidoubidouuuu ♫) La batterie est Pleine ”, -- bg=“#00FEFE”, -- fg=“#ff0000”, -- timeout=5, -- border_width=5, -- font=“Arial 25” -- }) -- end return '  <span color=“#FFFF00”>  '..args[2]..'%'..label[args[1]]..'</span>  ' end, 61, “BAT0”)

-- WIDGET DISQUE DUR - avec notification si /<1GB, /home<5GB, /espace<5GB : ddwidget = wibox.widget.textbox() vicious.register(ddwidget, vicious.widgets.fs, function(widget, args) if tonumber(args['{/ avail_gb}']) <= 1 then -- si /<1GB naughty.notify({ title=“ n'en peut plus !”, text=“il reste ”..args[“{/ avail_gb}”]..“GB”, bg=“#FE3300”, fg=“#000000”, timeout=5, border_width=5, font=“Arial 25” }) end if tonumber(args['{/home avail_gb}']) <= 5 then -- si /home<5GB naughty.notify({ title=“ est bientôt plein !”, text=“il reste ”..args[“{/home avail_gb}”]..“GB”, bg=“#FE3300”, fg=“#000000”, timeout=5, border_width=5, font=“Arial 25” }) end -- pour EEDF : EFFACER de “if” à “end” (avant return) if tonumber(args['{/media/espace avail_gb}']) <= 5 then -- si /espace<5GB naughty.notify({ title=“ est bientôt plein !”, text=“il reste ”..args[“{/media/espace avail_gb}”]..“GB”, bg=“#FE3300”, fg=“#000000”, timeout=5, border_width=5, font=“Arial 25” }) end return '<span color=“#ff6600”>  '..args['{/ avail_gb}']..'GB -  '..args[“{/home avail_gb}”]..'GB -  '..args[“{/media/espace avail_gb}”]..'GB</span> ' end, 61)

-- pour EEDF : '<span color=“#ff6600”>  ${/ avail_gb} GB </span> - <span color=“#ff751a”>  ${/home avail_gb} GB </span> ', 61)

-- WIDGET VOLUME DU SON volumewidget = wibox.widget.textbox() vicious.register(volumewidget, vicious.widgets.volume, function(widget, args)

local label = { ["♫"] = "", ["♩"] = "- Mute" }
return '<span color="#ff33cc"> ♫ '.. args[1] .. '%</span> <span color="#ff0000">'.. label[args[2]]..'</span>'
end, 2, "Master")

-- error-function-err-make-sure-we-don-t-go-into-an-endless-error-loop-if-in_error-then-return-end-in_error-true-naughty.notify-preset-naughty.config.presets.critical-title-oops-an-error-happened-text-err-in_error-false-end-end}

-- set_image-theme.widget_netup-transparency-client.connect_signal-focus-function-c-c.border_color-beautiful.border_focus-c.opacity-1-end-client.connect_signal-unfocus-function-c-c.border_color-beautiful.border_normal-c.opacity-0.7-end-this-is-used-later-as-the-default-terminal-and-editor-to-run.-terminal-x-terminal-emulator-editor-os.getenv-editor-or-editor-editor_cmd-terminal-..-e-..-editor-default-modkey.-usually-mod4-is-the-key-with-a-logo-between-control-and-alt.-if-you-do-not-like-this-or-do-not-have-such-a-key-i-suggest-you-to-remap-mod4-to-another-key-using-xmodmap-or-other-tools.-however-you-can-use-another-modifier-like-mod1-but-it-may-interact-with-others.-modkey-mod4-table-of-layouts-to-cover-with-awful.layout.inc-order-matters.-local-layouts-awful.layout.suit.floating-awful.layout.suit.tile-awful.layout.suit.tile.left-awful.layout.suit.tile.bottom-awful.layout.suit.tile.top-awful.layout.suit.fair-awful.layout.suit.fair.horizontal-awful.layout.suit.spiral-awful.layout.suit.spiral.dwindle-awful.layout.suit.max-awful.layout.suit.max.fullscreen-awful.layout.suit.magnifier}

-- wallpaper-if-beautiful.wallpaper-then-for-s-1-screen.count-do-gears.wallpaper.maximized-beautiful.wallpaper-s-true-end-end}

-- tags-define-a-tag-table-which-hold-all-screen-tags.-tags-names-1--2--3--4--5--6--7--8-♪-9--layout-layouts-2-layouts-2-layouts-2-layouts-2-layouts-2-layouts-2-layouts-2-layouts-2-layouts-2-for-s-1-screen.count-do-tags-s-awful.tag-tags.names-s-tags.layout-end}

-- menu-create-a-laucher-widget-and-a-main-menu-myawesomemenu-manual-terminal-..-e-man-awesome-edit-config-editor_cmd-..-..-awesome.conffile-restart-awesome.restart-quit-awesome.quit-mymainmenu-awful.menu-items-awesome-myawesomemenu-beautiful.awesome_icon-debian-debian.menu.debian_menu.debian-open-terminal-terminal-mylauncher-awful.widget.launcher-image-beautiful.awesome_icon-menu-mymainmenu-menubar-configuration-menubar.utils.terminal-terminal-set-the-terminal-for-applications-that-require-it}

-- set_widget-layout-end}

-- toggle-end-awful.button-4-awful.tag.viewnext-awful.button-5-awful.tag.viewprev}

-- raise-end-awful.button-modkey-1-awful.mouse.client.move-awful.button-modkey-3-awful.mouse.client.resize-set-keys-root.keys-globalkeys}

-- rules-rules-to-apply-to-new-clients-through-the-manage-signal-.-awful.rules.rules-all-clients-will-match-this-rule.-rule-properties-border_width-beautiful.border_width-border_color-beautiful.border_normal-focus-awful.client.focus.filter-raise-true-size_hints_honor-false-enlever-les-espaces-entre-les-fenetres-keys-clientkeys-buttons-clientbuttons-rule-class-xterm-properties-tag-tags-1-1-rule-class-navigator-properties-tag-tags-1-2-rule-class-conkeror-properties-tag-tags-1-2-rule-class-icedove-properties-tag-tags-1-3-rule-class-gimp-properties-tag-tags-1-4-rule-class-inkscape-properties-tag-tags-1-4-set-libreoffice-to-always-map-on-tags-number-5-of-screen-1.-rule-class-libreoffice-properties-tag-tags-1-5-rule-class-texmaker-properties-tag-tags-1-5-rule-class-pdfshuffler-properties-tag-tags-1-6-rule-class-evince-properties-tag-tags-1-6-rule-class-gedit-properties-tag-tags-1-7-rule-class-rhythmbox-properties-tag-tags-1-8-rule-class-smplayer-properties-tag-tags-1-9-rule-class-lxrandr-properties-floating-true}

-- set_widget-layout-end-end-client.connect_signal-focus-function-c-c.border_color-beautiful.border_focus-end-client.connect_signal-unfocus-function-c-c.border_color-beautiful.border_normal-end}

-- au démarrage -- os.execute(“guake &”) -- os.execute(“seafile-applet &”) -- os.execute(“hexchat &”) -- os.execute(“bitmask &”)