From b4a87e8ac9533944e1eeb233bfde20a0faa14808 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 21 Oct 2016 10:29:31 +0200 Subject: [PATCH] Stuff --- awesome/battery.lua | 2 +- awesome/rc.lua | 15 +++++++++------ vimrc | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/awesome/battery.lua b/awesome/battery.lua index d2fc4f4..65fc72f 100644 --- a/awesome/battery.lua +++ b/awesome/battery.lua @@ -9,7 +9,7 @@ local beautiful = require("beautiful") local previous_percent = 0 function batteryInfo() - local fd = io.popen('acpi | cut -d ":" -f 2 | cut -d "," -f 2 | tr -d "%"') + local fd = io.popen('acpi | tail -n 1 | cut -d ":" -f 2 | cut -d "," -f 2 | tr -d "%"') local percentage = fd:read('*all') fd:close() return tonumber(percentage) diff --git a/awesome/rc.lua b/awesome/rc.lua index 270e5ac..5cecf2a 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -14,6 +14,7 @@ local menubar = require("menubar") local vicious = require("vicious") home = "/home/thomas" +browser = "chromium" os.execute('xset m 16/1 0') os.setlocale("fr_FR.UTF-8") @@ -79,7 +80,7 @@ function change_wallpaper(path) end end -change_wallpaper('1200custom.png') +change_wallpaper('arch2.png') -- Widgets local volume = require("volume") @@ -374,11 +375,13 @@ globalkeys = awful.util.table.join( end), -- Chromium - awful.key({ }, "XF86HomePage", function () os.execute('firefox&') end), - awful.key({ modkey}, "a", function () os.execute('firefox&') - naughty.notify({ - title = "Firefox starting...", - text = awesome.startup_errors }) end), + awful.key({ }, "XF86HomePage", function () os.execute('$BROWSER &') end), + awful.key({ modkey}, "a", function () os.execute(browser .. '&') + naughty.notify({ + title = browser .. " starting...", + text = awesome.startup_errors }) + end + ), awful.key({modkey, "Shift"}, "Tab", function() os.execute('xdotool key Caps_Lock') end) ) diff --git a/vimrc b/vimrc index 896108d..a78ddac 100644 --- a/vimrc +++ b/vimrc @@ -105,6 +105,7 @@ let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1 " }}} " BACKUPS ###########################################################{{{ +set dir=$HOME/.vim/swp// autocmd BufWritePost * :silent execute ':w! ' ."$HOME/.vim/backups/" . escape(substitute(expand('%:p'), "/", "%", "g"), "%") if exists('+undofile')