diff --git a/.config/awesome/functions.lua b/.config/awesome/functions.lua index 1195fd3a..9eaa69c0 100644 --- a/.config/awesome/functions.lua +++ b/.config/awesome/functions.lua @@ -1,3 +1,4 @@ +-- {{{ Helper functions function file_exists(name) local f = io.open(name, "r") if f~=nil then io.close(f) return true else return false end diff --git a/.config/awesome/mymainmenu.lua b/.config/awesome/mymainmenu.lua index 56f0d2e1..936d8bf7 100644 --- a/.config/awesome/mymainmenu.lua +++ b/.config/awesome/mymainmenu.lua @@ -1,6 +1,5 @@ accessoriesmenu = { { "calculator", "/usr/bin/galculator", "/usr/share/icons/hicolor/48x48/apps/galculator.png" }, - { "cr3", "/usr/bin/cr3", "/usr/share/pixmaps/cr3.png" }, { "emacs", "/usr/bin/emacs", "/usr/share/icons/hicolor/scalable/apps/emacs.svg" }, { "engrampa", "/usr/bin/engrampa", "/usr/share/icons/hicolor/32x32/apps/engrampa.png" }, { "ghex", "/usr/bin/ghex ", "/usr/share/icons/hicolor/48x48/apps/ghex.png" }, @@ -16,7 +15,7 @@ accessoriesmenu = { { "xarchiver", "xarchiver", "/usr/share/icons/hicolor/48x48/apps/xarchiver.png" }, } dbmenu = { - { "dbeaver", "/usr/bin/dbeaver", "/usr/share/icons/hicolor/48x48/apps/dbeaver.xpm" }, + { "dbeaver", "/usr/bin/dbeaver", "/usr/share/pixmaps/dbeaver.xpm" }, { "mysql workbench", "/usr/bin/mysql-workbench", "/usr/share/icons/hicolor/48x48/apps/mysql-workbench.png" }, { "sql workbench", "/usr/bin/sqlworkbench", "/usr/share/icons/hicolor/32x32/apps/workbench32.png" }, { "sqlitebrowser", "/usr/bin/sqlitebrowser", "/usr/share/icons/hicolor/256x256/apps/sqlitebrowser.png" }, @@ -30,6 +29,7 @@ developmentmenu = { { "eclipse", "/usr/bin/eclipse", "/usr/share/icons/hicolor/48x48/apps/eclipse.png" }, { "glade gtk2", "/usr/bin/glade-3", "/usr/share/icons/hicolor/48x48/apps/glade-3.png" }, { "glade gtk3", "/usr/bin/glade ", "/usr/share/icons/hicolor/48x48/apps/glade.png" }, + { "goland", "/usr/bin/goland ", "/usr/share/pixmaps/goland.png" }, { "intellij", "/usr/bin/idea.sh", "/usr/share/pixmaps/idea.png" }, { "kdevelop", "/usr/bin/kdevelop", "/usr/share/icons/hicolor/48x48/apps/kdevelop.png" }, { "lazarus", "/usr/bin/lazarus", "/usr/lib/lazarus/images/ide_icon48x48.png" }, @@ -56,61 +56,21 @@ engineeringmenu = { { "qcad", "/usr/bin/qcad", "/usr/share/pixmaps/qcad_icon.png" }, { "qucs", "/usr/bin/qucs", "/usr/share/icons/hicolor/48x48/apps/qucs.png" }, } -puzzlesmenu = { - { "blackbox", "/usr/bin/puzzles-blackbox", "/usr/share/icons/hicolor/48x48/apps/blackbox.png" }, - { "bridges", "/usr/bin/bridges", "/usr/share/icons/hicolor/48x48/apps/bridges.png" }, - { "cube", "/usr/bin/puzzles-cube", "/usr/share/icons/hicolor/48x48/apps/cube.png" }, - { "dominosa", "/usr/bin/dominosa", "/usr/share/icons/hicolor/48x48/apps/dominosa.png" }, - { "fifteen", "/usr/bin/fifteen", "/usr/share/icons/hicolor/48x48/apps/fifteen.png" }, - { "filling", "/usr/bin/filling", "/usr/share/icons/hicolor/48x48/apps/filling.png" }, - { "flip", "/usr/bin/flip", "/usr/share/icons/hicolor/48x48/apps/flip.png" }, - { "flood", "/usr/bin/flood", "/usr/share/icons/hicolor/48x48/apps/flood.png" }, - { "galaxies", "/usr/bin/galaxies", "/usr/share/icons/hicolor/48x48/apps/galaxies.png" }, - { "guess", "/usr/bin/guess", "/usr/share/icons/hicolor/48x48/apps/guess.png" }, - { "inertia", "/usr/bin/inertia", "/usr/share/icons/hicolor/48x48/apps/inertia.png" }, - { "keen", "/usr/bin/keen", "/usr/share/icons/hicolor/48x48/apps/keen.png" }, - { "lightup", "/usr/bin/lightup", "/usr/share/icons/hicolor/48x48/apps/lightup.png" }, - { "loopy", "/usr/bin/loopy", "/usr/share/icons/hicolor/48x48/apps/loopy.png" }, - { "magnets", "/usr/bin/magnets", "/usr/share/icons/hicolor/48x48/apps/magnets.png" }, - { "maps", "/usr/bin/maps", "/usr/share/icons/hicolor/48x48/apps/map.png" }, - { "mines", "/usr/bin/mines", "/usr/share/icons/hicolor/48x48/apps/mines.png" }, - { "net", "/usr/bin/puzzles-net", "/usr/share/icons/hicolor/48x48/apps/net.png" }, - { "netslide", "/usr/bin/netslide", "/usr/share/icons/hicolor/48x48/apps/netslide.png" }, - { "palisade", "/usr/bin/palisade", "/usr/share/icons/hicolor/48x48/apps/palisade.png" }, - { "pattern", "/usr/bin/pattern", "/usr/share/icons/hicolor/48x48/apps/pattern.png" }, - { "pearl", "/usr/bin/pearl", "/usr/share/icons/hicolor/48x48/apps/pearl.png" }, - { "pegs", "/usr/bin/pegs", "/usr/share/icons/hicolor/48x48/apps/pegs.png" }, - { "range", "/usr/bin/range", "/usr/share/icons/hicolor/48x48/apps/range.png" }, - { "rect", "/usr/bin/rect", "/usr/share/icons/hicolor/48x48/apps/rect.png" }, - { "samegame", "/usr/bin/samegame", "/usr/share/icons/hicolor/48x48/apps/samegame.png" }, - { "signpost", "/usr/bin/signpost", "/usr/share/icons/hicolor/48x48/apps/signpost.png" }, - { "singles", "/usr/bin/singles", "/usr/share/icons/hicolor/48x48/apps/singles.png" }, - { "sixteen", "/usr/bin/sixteen", "/usr/share/icons/hicolor/48x48/apps/sixteen.png" }, - { "slant", "/usr/bin/slant", "/usr/share/icons/hicolor/48x48/apps/slant.png" }, - { "solo", "/usr/bin/solo", "/usr/share/icons/hicolor/48x48/apps/solo.png" }, - { "tents", "/usr/bin/tents", "/usr/share/icons/hicolor/48x48/apps/tents.png" }, - { "towers", "/usr/bin/towers", "/usr/share/icons/hicolor/48x48/apps/towers.png" }, - { "tracks", "/usr/bin/tracks", "/usr/share/icons/hicolor/48x48/apps/tracks.png" }, - { "twiddle", "/usr/bin/twiddle", "/usr/share/icons/hicolor/48x48/apps/twiddle.png" }, - { "undead", "/usr/bin/undead", "/usr/share/icons/hicolor/48x48/apps/undead.png" }, - { "unequal", "/usr/bin/unequal", "/usr/share/icons/hicolor/48x48/apps/unequal.png" }, - { "unruly", "/usr/bin/unruly", "/usr/share/icons/hicolor/48x48/apps/unruly.png" }, - { "untangle", "/usr/bin/untangle", "/usr/share/icons/hicolor/48x48/apps/untangle.png" }, -} gamesmenu = { - { "puzzles", puzzlesmenu, "/usr/share/icons/matefaenza/categories/scalable/applications-puzzles.svg" }, { "0 a.d.", "/usr/bin/0ad", "/usr/share/pixmaps/0ad.png" }, { "emulationstation", "/usr/bin/emulationstation", "/usr/share/pixmaps/retroarch.svg" }, { "steam", "/usr/bin/steam", "/usr/share/pixmaps/steam.png" }, } graphicsmenu = { + { "aseprite", "/usr/bin/aseprite", "/usr/share/pixmaps/aseprite.png" }, { "blender", "/usr/bin/blender", "/usr/share/icons/hicolor/48x48/apps/blender.png" }, { "font manager", "/usr/bin/font-manager", "/usr/share/icons/gnome/48x48/apps/preferences-desktop-font.png" }, { "gimp", "/usr/bin/gimp", "/usr/share/icons/hicolor/48x48/apps/gimp.png" }, { "gpick", "/usr/bin/gpick", "/usr/share/icons/hicolor/48x48/apps/gpick.png" }, - { "image scan!", "/usr/bin/iscan", "/usr/share/icons/gnome/48x48/devices/scanner.png" }, + { "image scan!", "/usr/bin/iscan", "/usr/share/icons/gnome/48x48/devices/scanner.png" }, { "inkscape", "/usr/bin/inkscape", "/usr/share/icons/hicolor/48x48/apps/inkscape.png" }, { "krita", "/usr/bin/krita", "/usr/share/icons/hicolor/48x48/apps/calligrakrita.png" }, + { "mtpaint", "/usr/bin/mtpaint", "/usr/share/pixmaps/mtpaint.png" }, { "pinta", "/usr/bin/pinta", "/usr/share/pixmaps/pinta.xpm" }, { "scribus", "/usr/bin/scribus", "/usr/share/icons/hicolor/32x32/apps/scribus.png" }, { "sk1", "/usr/bin/sk1", "/usr/share/pixmaps/sk1.png" }, @@ -121,25 +81,22 @@ internetmenu = { { "chromium", "/usr/bin/chromium", "/usr/share/icons/hicolor/48x48/apps/chromium.png" }, { "claws", "/usr/bin/claws-mail", "/usr/share/icons/hicolor/48x48/apps/claws-mail.png" }, { "firefox", "/usr/bin/firefox", "/usr/share/icons/hicolor/48x48/apps/firefox.png" }, - { "franz", "/usr/bin/franz-bin", "/usr/share/pixmaps/franz.png" }, - { "gftp", "/usr/bin/gftp", "/usr/share/pixmaps/gftp.png" }, + { "gajim", "/usr/bin/gajim", "/usr/share/icons/hicolor/64x64/apps/gajim.png" }, { "google chrome", "/usr/bin/google-chrome-stable", "/opt/google/chrome/product_logo_32.xpm" }, { "google earth", "/usr/bin/google-earth", "/opt/google/earth/free/product_logo_32.xpm" }, { "konqueror", "/usr/bin/konqueror", "/usr/share/icons/hicolor/48x48/apps/konqueror.png" }, - { "mumble", "/usr/bin/mumble", "/usr/share/icons/hicolor/scalable/apps/mumble.svg" }, { "opera", "/usr/bin/opera", "/usr/share/pixmaps/opera.xpm" }, { "pidgin", "/usr/bin/pidgin", "/usr/share/icons/hicolor/48x48/apps/pidgin.png" }, { "seamonkey", "seamonkey", "/usr/share/pixmaps/seamonkey.png" }, { "skype", "skype", "/usr/share/icons/hicolor/48x48/apps/skype.png" }, { "thunderbird", "/usr/bin/thunderbird", "/usr/share/icons/hicolor/48x48/apps/thunderbird.png" }, - { "tor browser", "/usr/bin/tor-browser", "/usr/share/pixmaps/tor-browser.png" }, + { "tor browser", "/usr/bin/tor-browser-en", "/usr/share/pixmaps/tor-browser.png" }, { "vivaldi", "/usr/bin/vivaldi-stable", "/usr/share/icons/hicolor/48x48/apps/vivaldi.png" }, } multimediamenu = { { "alsamixer", terminal.." -e alsamixer", "/usr/share/icons/hicolor/48x48/categories/applications-other.png" }, { "audacity", "/usr/bin/audacity", "/usr/share/icons/hicolor/48x48/apps/audacity.png" }, { "brasero", "/usr/bin/brasero ", "/usr/share/icons/hicolor/48x48/apps/brasero.png" }, - { "cmus", terminal.." -e cmus", "/usr/share/icons/hicolor/48x48/categories/applications-other.png" }, { "kaffeine", "/usr/bin/kaffeine", "/usr/share/icons/hicolor/scalable/apps/kaffeine.svg" }, { "spotify", "/usr/bin/spotify", "/usr/share/pixmaps/spotify-client.png" }, { "vlc", "/usr/bin/vlc", "/usr/share/icons/hicolor/48x48/apps/vlc.png" }, @@ -149,8 +106,6 @@ officemenu = { { "acrobat reader", "/usr/bin/acroread", "/usr/share/pixmaps/acroread.png" }, { "dia", "/usr/bin/dia", "/usr/share/icons/hicolor/48x48/apps/dia.png" }, { "epdfview", "/usr/bin/epdfview", "/usr/share/icons/hicolor/48x48/apps/epdfview.png" }, - { "gnucash", "/home/hanez/bin/gnucash", "/usr/share/icons/hicolor/48x48/apps/gnucash-icon.png" }, - { "hibiscus", "/usr/bin/jameica", "/opt/jameica/plugins/hibiscus/icons/hibiscus-icon-32x32.png" }, { "libreoffice base", "/usr/bin/libreoffice --base", "/usr/share/icons/hicolor/48x48/apps/libreoffice-base.png" }, { "libreoffice calc", "/usr/bin/libreoffice --calc", "/usr/share/icons/hicolor/48x48/apps/libreoffice-calc.png" }, { "libreoffice draw", "/usr/bin/libreoffice --draw", "/usr/share/icons/hicolor/48x48/apps/libreoffice-draw.png" }, @@ -167,7 +122,7 @@ radiomenu = { { "cubicsdr", "/usr/bin/cubicsdr", "/usr/share/cubicsdr/CubicSDR.png" }, { "gnuradio", "/usr/bin/gnuradio-companion", "/usr/share/gnuradio/grc/freedesktop/grc-icon-48.png" }, { "gqrx", "/usr/bin/gqrx", "/usr/share/pixmaps/gqrx.svg" }, - { "pothos", "/usr/bin/PothosGui", "/usr/share/Pothos/Desktop/pothos-gui-48.png" }, + { "pothos", "/usr/bin/PothosFlow", "/usr/share/Pothos/Desktop/pothos-flow-48.png" }, { "urh", "/usr/bin/urh", "/usr/share/pixmaps/urh.png" }, } sciencemenu = { @@ -178,10 +133,9 @@ sciencemenu = { systemmenu = { { "appearance", "/usr/bin/lxappearance", "/usr/share/icons/Adwaita/48x48/categories/preferences-desktop.png" }, { "bitdefender", "/usr/bin/bdgui", "/opt/BitDefender-scanner/share/doc/examples/icons/hicolor/48x48/apps/bitdefender.png" }, - { "gparted", "/usr/bin/gparted_polkit ", "/usr/share/icons/hicolor/48x48/apps/gparted.png" }, + { "gparted", "/usr/bin/gparted", "/usr/share/icons/hicolor/48x48/apps/gparted.png" }, { "hardinfo", "hardinfo", "/usr/share/hardinfo/pixmaps/logo.png" }, { "gufw", "/usr/bin/gufw", "/usr/share/icons/hicolor/scalable/apps/gufw.svg" }, - { "virt-manager", "/usr/bin/virt-manager", "/usr/share/icons/hicolor/48x48/apps/virt-manager.png" }, { "virtualbox", "/usr/bin/virtualbox", "/usr/share/pixmaps/VBox.png" }, { "wireshark", "/usr/bin/wireshark", "/usr/share/icons/hicolor/48x48/apps/wireshark.png" }, } @@ -189,9 +143,9 @@ utilitiesmenu = { { "arandr", "/usr/bin/arandr", "/usr/share/icons/hicolor/scalable/devices/video-television.svg" }, { "bluetooth", "/usr/bin/blueman-manager", "/usr/share/icons/hicolor/48x48/apps/blueman.png" }, { "qsshfs", "/usr/bin/qsshfs", "/usr/share/icons/hicolor/32x32/apps/qsshfs.png" }, - { "unetbootin", "/usr/bin/unetbootin_polkit", "/usr/share/icons/hicolor/48x48/apps/unetbootin.png" }, + { "unetbootin", "/usr/bin/unetbootin", "/usr/share/icons/hicolor/48x48/apps/unetbootin.png" }, } -mymainmenu = awful.menu({ items = { +mymainmenu = awful.menu({ items = { { "accessories", accessoriesmenu, beautiful.icon_path.."categories/applications-accessories.png" }, { "database", dbmenu, "/usr/share/icons/oxygen/base/48x48/places/server-database.png" }, { "development", developmentmenu, beautiful.icon_path.."categories/applications-development.png" }, @@ -210,6 +164,6 @@ mymainmenu = awful.menu({ items = { { "terminal", terminal, beautiful.icon_path.."apps/utilities-terminal.png" }, { "configuration", editor_cmd .. " " .. awesome.conffile, beautiful.icon_path.."categories/preferences-other.png" }, { "reload", awesome.restart, beautiful.icon_path.."actions/view-refresh.png" }, - { "quit", function () awesome.quit() end, beautiful.icon_path.."actions/system-log-out.png" } + { "quit", function() awesome.quit() end, beautiful.icon_path.."actions/system-log-out.png" } } }) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index d0f2757c..efc06f1c 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -5,36 +5,51 @@ require("private") require("functions") --- Require some basic stuff +-- Standard awesome library local gears = require("gears") awful = require("awful") -awful.rules = require("awful.rules") require("awful.autofocus") +-- Widget and layout library local wibox = require("wibox") +-- Theme handling library beautiful = require("beautiful") +-- Notification library local naughty = require("naughty") local menubar = require("menubar") vicious = require("vicious") +local hotkeys_popup = require("awful.hotkeys_popup").widget +-- Enable hotkeys help widget for VIM and other apps +-- when client with a matching name is opened: +require("awful.hotkeys_popup.keys") + +-- {{{ Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) if awesome.startup_errors then naughty.notify({ preset = naughty.config.presets.critical, title = "Oops, there were errors during startup!", text = awesome.startup_errors }) end +-- Handle runtime errors after startup do local in_error = false awesome.connect_signal("debug::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 }) + text = tostring(err) }) in_error = false end) end +-- }}} +-- {{{ Variable definitions +-- Themes define colours, icons, font and wallpapers. beautiful.init(os.getenv("HOME").."/.config/awesome/themes/hanez/theme.lua") -- To override the wallpaper provided by the theme you can just add a file named @@ -45,55 +60,74 @@ if file_exists(name) then beautiful.wallpaper = name end +-- This is used later as the default terminal and editor to run. terminal = '/usr/bin/uxterm -bg black -fg grey -sb -leftbar -si -bc -cr orange -fa "'..private.font_xterm..'" -fs '..private.font_xterm_size editor = "/usr/bin/vim" 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" +-- Autostart some programs defined in private.lua; Start them only once... ;) for i, program in ipairs(private.autostart) do run_once(program) end -local layouts = -{ +-- Table of layouts to cover with awful.layout.inc, order matters. +awful.layout.layouts = { awful.layout.suit.tile, awful.layout.suit.tile.left, awful.layout.suit.tile.bottom, awful.layout.suit.tile.top, + awful.layout.suit.floating, 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.fair.horizontal, + -- awful.layout.suit.spiral, + -- awful.layout.suit.spiral.dwindle, + awful.layout.suit.max, awful.layout.suit.max.fullscreen, - --awful.layout.suit.magnifier, - awful.layout.suit.floating + -- awful.layout.suit.magnifier, + -- awful.layout.suit.corner.nw, + -- awful.layout.suit.corner.ne, + -- awful.layout.suit.corner.sw, + -- awful.layout.suit.corner.se, } +-- }}} -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) +-- {{{ Helper functions +local function client_menu_toggle_fn() + local instance = nil + + return function () + if instance and instance.wibox.visible then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ theme = { width = 250 } }) + end end end - -tags = {} -for s = 1, screen.count() do - tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) -end +-- }}} -- Include the mainmenu from external file to make customisation easier require("mymainmenu") mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu }) -local batterywidgets = {} -for i=1, tablelength(private.battery) do - batterywidgets[i] = wibox.widget.textbox() - vicious.register(batterywidgets[i], vicious.widgets.bat, "$1$2% / ", 20, private.battery[i]) -end +-- Menubar configuration +menubar.utils.terminal = terminal -- Set the terminal for applications that require it +-- }}} + +-- {{{ Vicious widgets +local batterywidget = wibox.widget.textbox() +vicious.register(batterywidget, vicious.widgets.bat, "$1$2% / ", 20, private.battery) local netwidget = wibox.widget.textbox() -vicious.register(netwidget, vicious.widgets.net, '⇩${'..private.net_device..' down_kb} / ${'..private.net_device..' up_kb}⇧ ', 1) +vicious.register(netwidget, vicious.widgets.net, +'⇩${'..private.net_device..' down_kb} / ${'..private.net_device..' up_kb}⇧ ', 1) local thermalwidget = wibox.widget.textbox() vicious.register(thermalwidget, vicious.widgets.thermal, "$1°C ", 20, private.thermal_zone ) @@ -104,24 +138,29 @@ cpuwidget:set_background_color("#222222") cpuwidget:set_color({ type = "linear", from = { 0, 0 }, to = { 10,0 }, stops = { {0, "#FF5656"}, {0.5, "#88A175"}, {1, "#AECF96" }}}) vicious.register(cpuwidget, vicious.widgets.cpu, "$1") -mytextclock = awful.widget.textclock(" %a %b %d, %H:%M:%S ", 1) +-- {{{ Wibar +-- Create a textclock widget +mytextclock = wibox.widget.textclock() -menubar.utils.terminal = terminal -- Set the terminal for applications that require it - -mywibox = {} -mypromptbox = {} -mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), +-- Create a wibox for each screen and add it +local taglist_buttons = gears.table.join( + awful.button({ }, 1, function(t) t:view_only() end), + awful.button({ modkey }, 1, function(t) + if client.focus then + client.focus:move_to_tag(t) + end + end), awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( + awful.button({ modkey }, 3, function(t) + if client.focus then + client.focus:toggle_tag(t) + end + end), + awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) + ) + +local tasklist_buttons = gears.table.join( awful.button({ }, 1, function (c) if c == client.focus then c.minimized = true @@ -129,8 +168,8 @@ mytasklist.buttons = awful.util.table.join( -- Without this, the following -- :isvisible() makes no sense c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) + if not c:isvisible() and c.first_tag then + c.first_tag:view_only() end -- This will also un-minimize -- the client, if needed @@ -138,76 +177,81 @@ mytasklist.buttons = awful.util.table.join( c:raise() end end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ - theme = { width = 250 } - }) - end - end), + awful.button({ }, 3, client_menu_toggle_fn()), awful.button({ }, 4, function () awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end end), awful.button({ }, 5, function () awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end end)) -for s = 1, screen.count() do +local function set_wallpaper(s) + -- Wallpaper + if beautiful.wallpaper then + local wallpaper = beautiful.wallpaper + -- If wallpaper is a function, call it with the screen + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + end +end + +-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) +screen.connect_signal("property::geometry", set_wallpaper) + +awful.screen.connect_for_each_screen(function(s) + -- Wallpaper + set_wallpaper(s) + + -- Each screen has its own tag table. + awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) + -- Create a promptbox for each screen - mypromptbox[s] = awful.widget.prompt() - -- Create an imagebox widget which will contains an icon indicating which layout we're using. + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contain an icon indicating which layout we're using. -- We need one layoutbox per screen. - mylayoutbox[s] = awful.widget.layoutbox(s) - mylayoutbox[s]:buttons(awful.util.table.join( - awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), - awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(gears.table.join( + awful.button({ }, 1, function () awful.layout.inc( 1) end), + awful.button({ }, 3, function () awful.layout.inc(-1) end), + awful.button({ }, 4, function () awful.layout.inc( 1) end), + awful.button({ }, 5, function () awful.layout.inc(-1) end))) -- Create a taglist widget - mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons) + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons) -- Create a tasklist widget - mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons) + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons) -- Create the wibox - mywibox[s] = awful.wibox({ position = "top", screen = s }) + s.mywibox = awful.wibar({ position = "top", screen = s }) - -- Widgets that are aligned to the left - local left_layout = wibox.layout.fixed.horizontal() - left_layout:add(mylauncher) - left_layout:add(mytaglist[s]) - left_layout:add(mypromptbox[s]) - - -- Widgets that are aligned to the right - local right_layout = wibox.layout.fixed.horizontal() - right_layout:add(netwidget) - right_layout:add(cpuwidget) - for i=1, tablelength(batterywidgets) do - right_layout:add(batterywidgets[i]) - end - - right_layout:add(thermalwidget) - if s == 1 then right_layout:add(wibox.widget.systray()) end - right_layout:add(mytextclock) - right_layout:add(mylayoutbox[s]) - - -- Now bring it all together (with the tasklist in the middle) - local layout = wibox.layout.align.horizontal() - layout:set_left(left_layout) - layout:set_middle(mytasklist[s]) - layout:set_right(right_layout) - - mywibox[s]:set_widget(layout) -end + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + mylauncher, + s.mytaglist, + s.mypromptbox, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + netwidget, + cpuwidget, + batterywidget, + thermalwidget, + wibox.widget.systray(), + mytextclock, + s.mylayoutbox, + }, + } +end) -- }}} -- {{{ Mouse bindings -root.buttons(awful.util.table.join( +root.buttons(gears.table.join( awful.button({ }, 3, function () mymainmenu:toggle() end), awful.button({ }, 4, awful.tag.viewnext), awful.button({ }, 5, awful.tag.viewprev) @@ -215,37 +259,9 @@ root.buttons(awful.util.table.join( -- }}} -- {{{ Key bindings -globalkeys = awful.util.table.join( - awful.key({ modkey, }, "Left", awful.tag.viewprev ), - awful.key({ modkey, }, "Right", awful.tag.viewnext ), - awful.key({ modkey, }, "Escape", awful.tag.history.restore), - - awful.key({ modkey, }, "j", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ modkey, }, "k", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - awful.key({ modkey, }, "w", function () mymainmenu:show() end), - - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), +globalkeys = gears.table.join( + --- CUSTOM STUFF -- Set backlight awful.key({ modkey, "Mod1" }, "1", function() awful.util.spawn("/usr/bin/xbacklight -set 10") end), awful.key({ modkey, "Mod1" }, "2", function() awful.util.spawn("/usr/bin/xbacklight -set 20") end), @@ -276,10 +292,13 @@ globalkeys = awful.util.table.join( awful.util.spawn("/usr/bin/xbacklight -set "..newval) end), + -- Disable xautolock (win+alt#y) awful.key({ modkey, "Mod1" }, "y", function() awful.util.spawn("/usr/bin/killall xautolock") end), + -- Enable xautolock (win+alt#x) awful.key({ modkey, "Mod1" }, "x", function() awful.util.spawn("/usr/bin/xautolock -locker slock -time 5") end), -- Some Application shortcuts + awful.key({ modkey }, "e", function() awful.util.spawn("/usr/bin/emulationstation") end), awful.key({ modkey }, "v", function() awful.util.spawn("/usr/bin/chromium") end), awful.key({ modkey }, "b", function() awful.util.spawn("/usr/bin/firefox") end), awful.key({ modkey }, "n", function() awful.util.spawn("/usr/bin/thunderbird") end), @@ -291,169 +310,330 @@ globalkeys = awful.util.table.join( awful.util.spawn(editor_cmd .. " " .. os.getenv("HOME") .. "/.zshrc") end), awful.key({ modkey }, "y", function() awful.util.spawn("/usr/bin/thunar") end), - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), + -- Lock screen awful.key({ modkey, "Shift" }, "Return", function () awful.util.spawn("/usr/bin/slock") end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", function () awesome.quit() end), + --- END CUSTOM STUFF - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + awful.key({ modkey, }, "Left", awful.tag.viewprev, + {description = "view previous", group = "tag"}), + awful.key({ modkey, }, "Right", awful.tag.viewnext, + {description = "view next", group = "tag"}), + awful.key({ modkey, }, "Escape", awful.tag.history.restore, + {description = "go back", group = "tag"}), + + awful.key({ modkey, }, "j", + function () + awful.client.focus.byidx( 1) + end, + {description = "focus next by index", group = "client"} + ), + awful.key({ modkey, }, "k", + function () + awful.client.focus.byidx(-1) + end, + {description = "focus previous by index", group = "client"} + ), + awful.key({ modkey, }, "w", function () mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), + + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, + {description = "swap with next client by index", group = "client"}), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, + {description = "swap with previous client by index", group = "client"}), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", group = "client"}), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey, "Control" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Shift" }, "q", awesome.quit, + {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, + {description = "increase master width factor", group = "layout"}), + awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, + {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + {description = "increase the number of columns", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), + + awful.key({ modkey, "Control" }, "n", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + client.focus = c + c:raise() + end + end, + {description = "restore minimized", group = "client"}), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), + awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, + {description = "run prompt", group = "launcher"}), awful.key({ modkey }, "x", function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end), + awful.prompt.run { + prompt = "Run Lua code: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval" + } + end, + {description = "lua execute prompt", group = "awesome"}), -- Menubar - awful.key({ modkey }, "p", function() menubar.show() end) + awful.key({ modkey }, "p", function() menubar.show() end, + {description = "show the menubar", group = "launcher"}) ) -clientkeys = awful.util.table.join( - awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), - awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), - awful.key({ modkey, }, "o", awful.client.movetoscreen ), - awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), +clientkeys = gears.table.join( + awful.key({ modkey, }, "f", + function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , + {description = "toggle floating", group = "client"}), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), awful.key({ modkey, }, "n", function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. c.minimized = true - end), + end , + {description = "minimize", group = "client"}), awful.key({ modkey, }, "m", + function (c) + c.maximized = not c.maximized + c:raise() + end , + {description = "(un)maximize", group = "client"}), + awful.key({ modkey, "Control" }, "m", + function (c) + c.maximized_vertical = not c.maximized_vertical + c:raise() + end , + {description = "(un)maximize vertically", group = "client"}), + awful.key({ modkey, "Shift" }, "m", function (c) c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - end) + c:raise() + end , + {description = "(un)maximize horizontally", group = "client"}) ) +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it work on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, + globalkeys = gears.table.join(globalkeys, + -- View tag only. awful.key({ modkey }, "#" .. i + 9, function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] + local screen = awful.screen.focused() + local tag = screen.tags[i] if tag then - awful.tag.viewonly(tag) + tag:view_only() end - end), + end, + {description = "view tag #"..i, group = "tag"}), + -- Toggle tag display. awful.key({ modkey, "Control" }, "#" .. i + 9, function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] + local screen = awful.screen.focused() + local tag = screen.tags[i] if tag then awful.tag.viewtoggle(tag) end - end), + end, + {description = "toggle tag #" .. i, group = "tag"}), + -- Move client to tag. awful.key({ modkey, "Shift" }, "#" .. i + 9, function () if client.focus then - local tag = awful.tag.gettags(client.focus.screen)[i] + local tag = client.focus.screen.tags[i] if tag then - awful.client.movetotag(tag) + client.focus:move_to_tag(tag) end end - end), + end, + {description = "move focused client to tag #"..i, group = "tag"}), + -- Toggle tag on focused client. awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, function () if client.focus then - local tag = awful.tag.gettags(client.focus.screen)[i] + local tag = client.focus.screen.tags[i] if tag then - awful.client.toggletag(tag) + client.focus:toggle_tag(tag) end end - end)) + end, + {description = "toggle focused client on tag #" .. i, group = "tag"}) + ) end -clientbuttons = awful.util.table.join( +clientbuttons = gears.table.join( awful.button({ }, 1, function (c) client.focus = c; c: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, keys = clientkeys, - buttons = clientbuttons } }, - { rule = { class = "gimp" }, - properties = { floating = true } }, - { rule = { instance = "plugin-container" }, - properties = { floating = true } }, + buttons = clientbuttons, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + }, + + -- Floating clients. + { rule_any = { + instance = { + "DTA", -- Firefox addon DownThemAll. + "copyq", -- Includes session name in class. + }, + class = { + "Arandr", + "Gpick", + "Kruler", + "MessageWin", -- kalarm. + "Sxiv", + "Wpa_gui", + "pinentry", + "veromix", + "xtightvncviewer"}, + + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + } + }, properties = { floating = true }}, + + -- Add titlebars to normal clients and dialogs + { rule_any = {type = { "normal", "dialog" } + }, properties = { titlebars_enabled = false } + }, + + -- Set Firefox to always map on the tag named "2" on screen 1. + -- { rule = { class = "Firefox" }, + -- properties = { screen = 1, tag = "2" } }, } +-- }}} -client.connect_signal("manage", function (c, startup) - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end - if not startup then - if not c.size_hints.user_position and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end + if awesome.startup and + not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) end +end) - local titlebars_enabled = false - if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then - local buttons = awful.util.table.join( - awful.button({ }, 1, function() - client.focus = c - c:raise() - awful.mouse.client.move(c) - end), - awful.button({ }, 3, function() - client.focus = c - c:raise() - awful.mouse.client.resize(c) - end) - ) +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- buttons for the titlebar + local buttons = gears.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) - local left_layout = wibox.layout.fixed.horizontal() - left_layout:add(awful.titlebar.widget.iconwidget(c)) - left_layout:buttons(buttons) + awful.titlebar(c) : setup { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) - local right_layout = wibox.layout.fixed.horizontal() - right_layout:add(awful.titlebar.widget.floatingbutton(c)) - right_layout:add(awful.titlebar.widget.maximizedbutton(c)) - right_layout:add(awful.titlebar.widget.stickybutton(c)) - right_layout:add(awful.titlebar.widget.ontopbutton(c)) - right_layout:add(awful.titlebar.widget.closebutton(c)) - - local middle_layout = wibox.layout.flex.horizontal() - local title = awful.titlebar.widget.titlewidget(c) - title:set_align("center") - middle_layout:add(title) - middle_layout:buttons(buttons) - - local layout = wibox.layout.align.horizontal() - layout:set_left(left_layout) - layout:set_right(right_layout) - layout:set_middle(middle_layout) - - awful.titlebar(c):set_widget(layout) +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c 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) +-- }}} diff --git a/.config/awesome/rc.lua.old b/.config/awesome/rc.lua.old new file mode 100644 index 00000000..a5cc11f9 --- /dev/null +++ b/.config/awesome/rc.lua.old @@ -0,0 +1,460 @@ +-- require $HOME/.config/awesome/private.lua for including variables that are different on +-- my systems like private.thermal_zone or private.net_device; this makes sure that widgets +-- are displaying the right value... ;) +-- This file needs to exist. You need to explore this if you want to use my widget stuff! +require("private") +require("functions") + +-- Require some basic stuff +local gears = require("gears") +awful = require("awful") +awful.rules = require("awful.rules") +require("awful.autofocus") +local wibox = require("wibox") +beautiful = require("beautiful") +local naughty = require("naughty") +local menubar = require("menubar") +vicious = require("vicious") + +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +do + local in_error = false + awesome.connect_signal("debug::error", function (err) + 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 + +beautiful.init(os.getenv("HOME").."/.config/awesome/themes/hanez/theme.lua") + +-- To override the wallpaper provided by the theme you can just add a file named +-- ~/images/background.png and then this file will be used as wallpaper. No need +-- to change the theme or this file for that... ;) +name = os.getenv("HOME").."/images/background.png" +if file_exists(name) then + beautiful.wallpaper = name +end + +terminal = '/usr/bin/uxterm -bg black -fg grey -sb -leftbar -si -bc -cr orange -fa "'..private.font_xterm..'" -fs '..private.font_xterm_size +editor = "/usr/bin/vim" +editor_cmd = terminal .. " -e " .. editor + +modkey = "Mod4" + +for i, program in ipairs(private.autostart) do + run_once(program) +end + +local layouts = +{ + 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, + awful.layout.suit.floating +} + +if beautiful.wallpaper then + for s = 1, screen.count() do + gears.wallpaper.maximized(beautiful.wallpaper, s, true) + end +end + +tags = {} +for s = 1, screen.count() do + tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) +end + +-- Include the mainmenu from external file to make customisation easier +require("mymainmenu") +mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu }) + +local batterywidgets = {} +for i=1, tablelength(private.battery) do + batterywidgets[i] = wibox.widget.textbox() + vicious.register(batterywidgets[i], vicious.widgets.bat, "$1$2% / ", 20, private.battery[i]) +end + +local netwidget = wibox.widget.textbox() +vicious.register(netwidget, vicious.widgets.net, '⇩${'..private.net_device..' down_kb} / ${'..private.net_device..' up_kb}⇧ ', 1) + +local thermalwidget = wibox.widget.textbox() +vicious.register(thermalwidget, vicious.widgets.thermal, "$1°C ", 20, private.thermal_zone ) + +cpuwidget = awful.widget.graph() +cpuwidget:set_width(100) +cpuwidget:set_background_color("#222222") +cpuwidget:set_color({ type = "linear", from = { 0, 0 }, to = { 10,0 }, stops = { {0, "#FF5656"}, {0.5, "#88A175"}, {1, "#AECF96" }}}) +vicious.register(cpuwidget, vicious.widgets.cpu, "$1") + +mytextclock = awful.widget.textclock(" %a %b %d, %H:%M:%S ", 1) + +menubar.utils.terminal = terminal -- Set the terminal for applications that require it + +mywibox = {} +mypromptbox = {} +mylayoutbox = {} +mytaglist = {} +mytaglist.buttons = awful.util.table.join( + awful.button({ }, 1, awful.tag.viewonly), + awful.button({ modkey }, 1, awful.client.movetotag), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, awful.client.toggletag), + awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) + ) +mytasklist = {} +mytasklist.buttons = awful.util.table.join( + awful.button({ }, 1, function (c) + if c == client.focus then + c.minimized = true + else + -- Without this, the following + -- :isvisible() makes no sense + c.minimized = false + if not c:isvisible() then + awful.tag.viewonly(c:tags()[1]) + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() + end + end), + awful.button({ }, 3, function () + if instance then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ + theme = { width = 250 } + }) + end + end), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + if client.focus then client.focus:raise() end + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end)) + +for s = 1, screen.count() do + -- Create a promptbox for each screen + mypromptbox[s] = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + mylayoutbox[s] = awful.widget.layoutbox(s) + mylayoutbox[s]:buttons(awful.util.table.join( + awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), + awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) + -- Create a taglist widget + mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons) + + -- Create a tasklist widget + mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons) + + -- Create the wibox + mywibox[s] = awful.wibox({ position = "top", screen = s }) + + -- Widgets that are aligned to the left + local left_layout = wibox.layout.fixed.horizontal() + left_layout:add(mylauncher) + left_layout:add(mytaglist[s]) + left_layout:add(mypromptbox[s]) + + -- Widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(netwidget) + right_layout:add(cpuwidget) + for i=1, tablelength(batterywidgets) do + right_layout:add(batterywidgets[i]) + end + + right_layout:add(thermalwidget) + if s == 1 then right_layout:add(wibox.widget.systray()) end + right_layout:add(mytextclock) + right_layout:add(mylayoutbox[s]) + + -- Now bring it all together (with the tasklist in the middle) + local layout = wibox.layout.align.horizontal() + layout:set_left(left_layout) + layout:set_middle(mytasklist[s]) + layout:set_right(right_layout) + + mywibox[s]:set_widget(layout) +end +-- }}} + +-- {{{ Mouse bindings +root.buttons(awful.util.table.join( + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) +-- }}} + +-- {{{ Key bindings +globalkeys = awful.util.table.join( + awful.key({ modkey, }, "Left", awful.tag.viewprev ), + awful.key({ modkey, }, "Right", awful.tag.viewnext ), + awful.key({ modkey, }, "Escape", awful.tag.history.restore), + + awful.key({ modkey, }, "j", + function () + awful.client.focus.byidx( 1) + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, }, "k", + function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, }, "w", function () mymainmenu:show() end), + + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end), + + -- Set backlight + awful.key({ modkey, "Mod1" }, "1", function() awful.util.spawn("/usr/bin/xbacklight -set 10") end), + awful.key({ modkey, "Mod1" }, "2", function() awful.util.spawn("/usr/bin/xbacklight -set 20") end), + awful.key({ modkey, "Mod1" }, "3", function() awful.util.spawn("/usr/bin/xbacklight -set 30") end), + awful.key({ modkey, "Mod1" }, "4", function() awful.util.spawn("/usr/bin/xbacklight -set 40") end), + awful.key({ modkey, "Mod1" }, "5", function() awful.util.spawn("/usr/bin/xbacklight -set 50") end), + awful.key({ modkey, "Mod1" }, "6", function() awful.util.spawn("/usr/bin/xbacklight -set 60") end), + awful.key({ modkey, "Mod1" }, "7", function() awful.util.spawn("/usr/bin/xbacklight -set 70") end), + awful.key({ modkey, "Mod1" }, "8", function() awful.util.spawn("/usr/bin/xbacklight -set 80") end), + awful.key({ modkey, "Mod1" }, "9", function() awful.util.spawn("/usr/bin/xbacklight -set 90") end), + awful.key({ modkey, "Mod1" }, "0", function() awful.util.spawn("/usr/bin/xbacklight -set 100") end), + + awful.key({ modkey, "Mod1" }, "o", function() + local handle = io.popen("/usr/bin/xbacklight -get") + local result = handle:read("*a") + handle:close() + result = math.floor(result) + local newval = tonumber(result) - 5 + awful.util.spawn("/usr/bin/xbacklight -set "..newval) + end), + + awful.key({ modkey, "Mod1" }, "p", function() + local handle = io.popen("/usr/bin/xbacklight -get") + local result = handle:read("*a") + handle:close() + result = math.floor(result) + local newval = tonumber(result) + 5 + awful.util.spawn("/usr/bin/xbacklight -set "..newval) + end), + + awful.key({ modkey, "Mod1" }, "y", function() awful.util.spawn("/usr/bin/killall xautolock") end), + awful.key({ modkey, "Mod1" }, "x", function() awful.util.spawn("/usr/bin/xautolock -locker slock -time 5") end), + + -- Some Application shortcuts + awful.key({ modkey }, "e", function() awful.util.spawn("/usr/bin/emulationstation") end), + awful.key({ modkey }, "v", function() awful.util.spawn("/usr/bin/chromium") end), + awful.key({ modkey }, "b", function() awful.util.spawn("/usr/bin/firefox") end), + awful.key({ modkey }, "n", function() awful.util.spawn("/usr/bin/thunderbird") end), + awful.key({ modkey }, "m", function() awful.util.spawn("/usr/bin/claws-mail") end), + + awful.key({ modkey }, "c", function() + awful.util.spawn(editor_cmd .. " " .. awesome.conffile) end), + awful.key({ modkey }, "z", function() + awful.util.spawn(editor_cmd .. " " .. os.getenv("HOME") .. "/.zshrc") end), + awful.key({ modkey }, "y", function() awful.util.spawn("/usr/bin/thunar") end), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), + awful.key({ modkey, "Shift" }, "Return", function () awful.util.spawn("/usr/bin/slock") end), + awful.key({ modkey, "Control" }, "r", awesome.restart), + awful.key({ modkey, "Shift" }, "q", awesome.quit), + + awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), + awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), + awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), + + awful.key({ modkey, "Control" }, "n", awful.client.restore), + + -- Prompt + awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), + + awful.key({ modkey }, "x", + function () + awful.prompt.run({ prompt = "Run Lua code: " }, + mypromptbox[mouse.screen].widget, + awful.util.eval, nil, + awful.util.getdir("cache") .. "/history_eval") + end), + -- Menubar + awful.key({ modkey }, "p", function() menubar.show() end) +) + +clientkeys = awful.util.table.join( + awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), + awful.key({ modkey, }, "o", awful.client.movetoscreen ), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), + awful.key({ modkey, }, "n", + function (c) + c.minimized = true + end), + awful.key({ modkey, }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c.maximized_vertical = not c.maximized_vertical + end) +) + +for i = 1, 9 do + globalkeys = awful.util.table.join(globalkeys, + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = mouse.screen + local tag = awful.tag.gettags(screen)[i] + if tag then + awful.tag.viewonly(tag) + end + end), + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = mouse.screen + local tag = awful.tag.gettags(screen)[i] + if tag then + awful.tag.viewtoggle(tag) + end + end), + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = awful.tag.gettags(client.focus.screen)[i] + if tag then + awful.client.movetotag(tag) + end + end + end), + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = awful.tag.gettags(client.focus.screen)[i] + if tag then + awful.client.toggletag(tag) + end + end + end)) +end + +clientbuttons = awful.util.table.join( + awful.button({ }, 1, function (c) client.focus = c; c:raise() end), + awful.button({ modkey }, 1, awful.mouse.client.move), + awful.button({ modkey }, 3, awful.mouse.client.resize)) + +root.keys(globalkeys) + +awful.rules.rules = { + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = awful.client.focus.filter, + raise = true, + keys = clientkeys, + buttons = clientbuttons } }, + { rule = { class = "gimp" }, + properties = { floating = true } }, + { rule = { instance = "plugin-container" }, + properties = { floating = true } }, +} + +client.connect_signal("manage", function (c, startup) + c:connect_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c + end + end) + + if not startup then + if not c.size_hints.user_position and not c.size_hints.program_position then + awful.placement.no_overlap(c) + awful.placement.no_offscreen(c) + end + end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + local left_layout = wibox.layout.fixed.horizontal() + left_layout:add(awful.titlebar.widget.iconwidget(c)) + left_layout:buttons(buttons) + + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + local middle_layout = wibox.layout.flex.horizontal() + local title = awful.titlebar.widget.titlewidget(c) + title:set_align("center") + middle_layout:add(title) + middle_layout:buttons(buttons) + + local layout = wibox.layout.align.horizontal() + layout:set_left(left_layout) + layout:set_right(right_layout) + layout:set_middle(middle_layout) + + awful.titlebar(c):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) diff --git a/.config/awesome/themes/hanez/layouts/cornerne.png b/.config/awesome/themes/hanez/layouts/cornerne.png new file mode 100644 index 00000000..e7fb61bb Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornerne.png differ diff --git a/.config/awesome/themes/hanez/layouts/cornernew.png b/.config/awesome/themes/hanez/layouts/cornernew.png new file mode 100644 index 00000000..aeaf3311 Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornernew.png differ diff --git a/.config/awesome/themes/hanez/layouts/cornernw.png b/.config/awesome/themes/hanez/layouts/cornernw.png new file mode 100644 index 00000000..bac56728 Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornernw.png differ diff --git a/.config/awesome/themes/hanez/layouts/cornernww.png b/.config/awesome/themes/hanez/layouts/cornernww.png new file mode 100644 index 00000000..93b67067 Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornernww.png differ diff --git a/.config/awesome/themes/hanez/layouts/cornerse.png b/.config/awesome/themes/hanez/layouts/cornerse.png new file mode 100644 index 00000000..092a9057 Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornerse.png differ diff --git a/.config/awesome/themes/hanez/layouts/cornersew.png b/.config/awesome/themes/hanez/layouts/cornersew.png new file mode 100644 index 00000000..35e900b8 Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornersew.png differ diff --git a/.config/awesome/themes/hanez/layouts/cornersw.png b/.config/awesome/themes/hanez/layouts/cornersw.png new file mode 100644 index 00000000..0d519b5c Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornersw.png differ diff --git a/.config/awesome/themes/hanez/layouts/cornersww.png b/.config/awesome/themes/hanez/layouts/cornersww.png new file mode 100644 index 00000000..2d744fd5 Binary files /dev/null and b/.config/awesome/themes/hanez/layouts/cornersww.png differ diff --git a/.config/awesome/themes/hanez/layouts/dwindle.png b/.config/awesome/themes/hanez/layouts/dwindle.png index 943ece5b..0ec7a35a 100644 Binary files a/.config/awesome/themes/hanez/layouts/dwindle.png and b/.config/awesome/themes/hanez/layouts/dwindle.png differ diff --git a/.config/awesome/themes/hanez/layouts/dwindlew.png b/.config/awesome/themes/hanez/layouts/dwindlew.png index 36de1bae..8457892b 100644 Binary files a/.config/awesome/themes/hanez/layouts/dwindlew.png and b/.config/awesome/themes/hanez/layouts/dwindlew.png differ diff --git a/.config/awesome/themes/hanez/layouts/fairh.png b/.config/awesome/themes/hanez/layouts/fairh.png index b4e289d6..3c2d36bb 100644 Binary files a/.config/awesome/themes/hanez/layouts/fairh.png and b/.config/awesome/themes/hanez/layouts/fairh.png differ diff --git a/.config/awesome/themes/hanez/layouts/fairhw.png b/.config/awesome/themes/hanez/layouts/fairhw.png index 514d66d0..410e292e 100644 Binary files a/.config/awesome/themes/hanez/layouts/fairhw.png and b/.config/awesome/themes/hanez/layouts/fairhw.png differ diff --git a/.config/awesome/themes/hanez/layouts/fairv.png b/.config/awesome/themes/hanez/layouts/fairv.png index e5aad70f..ad99f4b5 100644 Binary files a/.config/awesome/themes/hanez/layouts/fairv.png and b/.config/awesome/themes/hanez/layouts/fairv.png differ diff --git a/.config/awesome/themes/hanez/layouts/fairvw.png b/.config/awesome/themes/hanez/layouts/fairvw.png index f97ce56b..1a4ee273 100644 Binary files a/.config/awesome/themes/hanez/layouts/fairvw.png and b/.config/awesome/themes/hanez/layouts/fairvw.png differ diff --git a/.config/awesome/themes/hanez/layouts/floating.png b/.config/awesome/themes/hanez/layouts/floating.png index cbc78042..bf749901 100644 Binary files a/.config/awesome/themes/hanez/layouts/floating.png and b/.config/awesome/themes/hanez/layouts/floating.png differ diff --git a/.config/awesome/themes/hanez/layouts/floatingw.png b/.config/awesome/themes/hanez/layouts/floatingw.png index 7ddf7ae8..7aecb06e 100644 Binary files a/.config/awesome/themes/hanez/layouts/floatingw.png and b/.config/awesome/themes/hanez/layouts/floatingw.png differ diff --git a/.config/awesome/themes/hanez/layouts/fullscreen.png b/.config/awesome/themes/hanez/layouts/fullscreen.png index 46716f58..d02f6fc3 100644 Binary files a/.config/awesome/themes/hanez/layouts/fullscreen.png and b/.config/awesome/themes/hanez/layouts/fullscreen.png differ diff --git a/.config/awesome/themes/hanez/layouts/fullscreenw.png b/.config/awesome/themes/hanez/layouts/fullscreenw.png index 2c3cfad9..5c35bfa8 100644 Binary files a/.config/awesome/themes/hanez/layouts/fullscreenw.png and b/.config/awesome/themes/hanez/layouts/fullscreenw.png differ diff --git a/.config/awesome/themes/hanez/layouts/magnifier.png b/.config/awesome/themes/hanez/layouts/magnifier.png index 14765551..2ea2792e 100644 Binary files a/.config/awesome/themes/hanez/layouts/magnifier.png and b/.config/awesome/themes/hanez/layouts/magnifier.png differ diff --git a/.config/awesome/themes/hanez/layouts/magnifierw.png b/.config/awesome/themes/hanez/layouts/magnifierw.png index 97c1d112..5cd5e16d 100644 Binary files a/.config/awesome/themes/hanez/layouts/magnifierw.png and b/.config/awesome/themes/hanez/layouts/magnifierw.png differ diff --git a/.config/awesome/themes/hanez/layouts/max.png b/.config/awesome/themes/hanez/layouts/max.png index fe70bef1..8d208445 100644 Binary files a/.config/awesome/themes/hanez/layouts/max.png and b/.config/awesome/themes/hanez/layouts/max.png differ diff --git a/.config/awesome/themes/hanez/layouts/maxw.png b/.config/awesome/themes/hanez/layouts/maxw.png index d8debb86..85f5ce3a 100644 Binary files a/.config/awesome/themes/hanez/layouts/maxw.png and b/.config/awesome/themes/hanez/layouts/maxw.png differ diff --git a/.config/awesome/themes/hanez/layouts/spiral.png b/.config/awesome/themes/hanez/layouts/spiral.png index a24faf56..ca418141 100644 Binary files a/.config/awesome/themes/hanez/layouts/spiral.png and b/.config/awesome/themes/hanez/layouts/spiral.png differ diff --git a/.config/awesome/themes/hanez/layouts/spiralw.png b/.config/awesome/themes/hanez/layouts/spiralw.png index f34ceb0b..d1284610 100644 Binary files a/.config/awesome/themes/hanez/layouts/spiralw.png and b/.config/awesome/themes/hanez/layouts/spiralw.png differ diff --git a/.config/awesome/themes/hanez/layouts/tile.png b/.config/awesome/themes/hanez/layouts/tile.png index 071a385f..db1ce15c 100644 Binary files a/.config/awesome/themes/hanez/layouts/tile.png and b/.config/awesome/themes/hanez/layouts/tile.png differ diff --git a/.config/awesome/themes/hanez/layouts/tilebottom.png b/.config/awesome/themes/hanez/layouts/tilebottom.png index aeedbe23..73a72fec 100644 Binary files a/.config/awesome/themes/hanez/layouts/tilebottom.png and b/.config/awesome/themes/hanez/layouts/tilebottom.png differ diff --git a/.config/awesome/themes/hanez/layouts/tilebottomw.png b/.config/awesome/themes/hanez/layouts/tilebottomw.png index f42da9dd..64aa289e 100644 Binary files a/.config/awesome/themes/hanez/layouts/tilebottomw.png and b/.config/awesome/themes/hanez/layouts/tilebottomw.png differ diff --git a/.config/awesome/themes/hanez/layouts/tileleft.png b/.config/awesome/themes/hanez/layouts/tileleft.png index ab55e087..829475a8 100644 Binary files a/.config/awesome/themes/hanez/layouts/tileleft.png and b/.config/awesome/themes/hanez/layouts/tileleft.png differ diff --git a/.config/awesome/themes/hanez/layouts/tileleftw.png b/.config/awesome/themes/hanez/layouts/tileleftw.png index c18e7b43..24c39410 100644 Binary files a/.config/awesome/themes/hanez/layouts/tileleftw.png and b/.config/awesome/themes/hanez/layouts/tileleftw.png differ diff --git a/.config/awesome/themes/hanez/layouts/tiletop.png b/.config/awesome/themes/hanez/layouts/tiletop.png index 3febc350..1964d4d5 100644 Binary files a/.config/awesome/themes/hanez/layouts/tiletop.png and b/.config/awesome/themes/hanez/layouts/tiletop.png differ diff --git a/.config/awesome/themes/hanez/layouts/tiletopw.png b/.config/awesome/themes/hanez/layouts/tiletopw.png index daf965fa..d2eee79e 100644 Binary files a/.config/awesome/themes/hanez/layouts/tiletopw.png and b/.config/awesome/themes/hanez/layouts/tiletopw.png differ diff --git a/.config/awesome/themes/hanez/layouts/tilew.png b/.config/awesome/themes/hanez/layouts/tilew.png index c722a358..4451a667 100644 Binary files a/.config/awesome/themes/hanez/layouts/tilew.png and b/.config/awesome/themes/hanez/layouts/tilew.png differ diff --git a/.config/awesome/themes/hanez/theme.lua b/.config/awesome/themes/hanez/theme.lua index db10dc98..d767f9e4 100644 --- a/.config/awesome/themes/hanez/theme.lua +++ b/.config/awesome/themes/hanez/theme.lua @@ -12,7 +12,7 @@ theme.bg_minimize = "#444444" theme.bg_systray = theme.bg_normal theme.fg_normal = "#aaaaaa" -theme.fg_focus = "#e95421" +theme.fg_focus = "#ffa500" theme.fg_urgent = "#ffffff" theme.fg_minimize = "#ffffff" diff --git a/.config/awesome/themes/hanez/titlebar/close_focus.png b/.config/awesome/themes/hanez/titlebar/close_focus.png index a5b79584..e4763b6c 100644 Binary files a/.config/awesome/themes/hanez/titlebar/close_focus.png and b/.config/awesome/themes/hanez/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/hanez/titlebar/close_normal.png b/.config/awesome/themes/hanez/titlebar/close_normal.png index a6e1977a..77028393 100644 Binary files a/.config/awesome/themes/hanez/titlebar/close_normal.png and b/.config/awesome/themes/hanez/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/hanez/titlebar/floating_focus_active.png b/.config/awesome/themes/hanez/titlebar/floating_focus_active.png index 3447bb2e..80c1b4a8 100644 Binary files a/.config/awesome/themes/hanez/titlebar/floating_focus_active.png and b/.config/awesome/themes/hanez/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/floating_focus_inactive.png b/.config/awesome/themes/hanez/titlebar/floating_focus_inactive.png index 09c28e86..a96f00c7 100644 Binary files a/.config/awesome/themes/hanez/titlebar/floating_focus_inactive.png and b/.config/awesome/themes/hanez/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/hanez/titlebar/floating_normal_active.png b/.config/awesome/themes/hanez/titlebar/floating_normal_active.png index 0a603d34..b9c70ca3 100644 Binary files a/.config/awesome/themes/hanez/titlebar/floating_normal_active.png and b/.config/awesome/themes/hanez/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/floating_normal_inactive.png b/.config/awesome/themes/hanez/titlebar/floating_normal_inactive.png index 2d03df05..55cbc0cc 100644 Binary files a/.config/awesome/themes/hanez/titlebar/floating_normal_inactive.png and b/.config/awesome/themes/hanez/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/hanez/titlebar/maximized_focus_active.png b/.config/awesome/themes/hanez/titlebar/maximized_focus_active.png index 78a29145..dad461d3 100644 Binary files a/.config/awesome/themes/hanez/titlebar/maximized_focus_active.png and b/.config/awesome/themes/hanez/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/hanez/titlebar/maximized_focus_inactive.png index 8a9e02e2..3cc46fef 100644 Binary files a/.config/awesome/themes/hanez/titlebar/maximized_focus_inactive.png and b/.config/awesome/themes/hanez/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/hanez/titlebar/maximized_normal_active.png b/.config/awesome/themes/hanez/titlebar/maximized_normal_active.png index 2f3d9abf..0bbbf6ab 100644 Binary files a/.config/awesome/themes/hanez/titlebar/maximized_normal_active.png and b/.config/awesome/themes/hanez/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/hanez/titlebar/maximized_normal_inactive.png index 47b36d9a..5f1e98fe 100644 Binary files a/.config/awesome/themes/hanez/titlebar/maximized_normal_inactive.png and b/.config/awesome/themes/hanez/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/hanez/titlebar/minimize_focus.png b/.config/awesome/themes/hanez/titlebar/minimize_focus.png new file mode 100644 index 00000000..ff427b36 Binary files /dev/null and b/.config/awesome/themes/hanez/titlebar/minimize_focus.png differ diff --git a/.config/awesome/themes/hanez/titlebar/minimize_normal.png b/.config/awesome/themes/hanez/titlebar/minimize_normal.png new file mode 100644 index 00000000..aa474473 Binary files /dev/null and b/.config/awesome/themes/hanez/titlebar/minimize_normal.png differ diff --git a/.config/awesome/themes/hanez/titlebar/ontop_focus_active.png b/.config/awesome/themes/hanez/titlebar/ontop_focus_active.png index f954bed4..d79c8e29 100644 Binary files a/.config/awesome/themes/hanez/titlebar/ontop_focus_active.png and b/.config/awesome/themes/hanez/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/hanez/titlebar/ontop_focus_inactive.png index f4748075..03aef5a1 100644 Binary files a/.config/awesome/themes/hanez/titlebar/ontop_focus_inactive.png and b/.config/awesome/themes/hanez/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/hanez/titlebar/ontop_normal_active.png b/.config/awesome/themes/hanez/titlebar/ontop_normal_active.png index fdfab2c2..e09f32d2 100644 Binary files a/.config/awesome/themes/hanez/titlebar/ontop_normal_active.png and b/.config/awesome/themes/hanez/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/hanez/titlebar/ontop_normal_inactive.png index aaaa996e..9917b9e5 100644 Binary files a/.config/awesome/themes/hanez/titlebar/ontop_normal_inactive.png and b/.config/awesome/themes/hanez/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/hanez/titlebar/sticky_focus_active.png b/.config/awesome/themes/hanez/titlebar/sticky_focus_active.png index 1106399d..80194630 100644 Binary files a/.config/awesome/themes/hanez/titlebar/sticky_focus_active.png and b/.config/awesome/themes/hanez/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/hanez/titlebar/sticky_focus_inactive.png index 00e70a29..6d7fe40a 100644 Binary files a/.config/awesome/themes/hanez/titlebar/sticky_focus_inactive.png and b/.config/awesome/themes/hanez/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/hanez/titlebar/sticky_normal_active.png b/.config/awesome/themes/hanez/titlebar/sticky_normal_active.png index cb3f4d99..0d003efe 100644 Binary files a/.config/awesome/themes/hanez/titlebar/sticky_normal_active.png and b/.config/awesome/themes/hanez/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/hanez/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/hanez/titlebar/sticky_normal_inactive.png index 2998ba3a..f1e87892 100644 Binary files a/.config/awesome/themes/hanez/titlebar/sticky_normal_inactive.png and b/.config/awesome/themes/hanez/titlebar/sticky_normal_inactive.png differ diff --git a/.config/emulationstation/es_input.cfg b/.config/emulationstation/es_input.cfg index 36390294..9b951228 100644 --- a/.config/emulationstation/es_input.cfg +++ b/.config/emulationstation/es_input.cfg @@ -4,10 +4,26 @@ + + + + + + + + + + + + + + + + diff --git a/.config/emulationstation/es_settings.cfg b/.config/emulationstation/es_settings.cfg index 469ef0f7..3dc03ab2 100644 --- a/.config/emulationstation/es_settings.cfg +++ b/.config/emulationstation/es_settings.cfg @@ -1,18 +1,48 @@ + - + + + + + + - + + + + + + + + + + + + - + + + + + + + + + + + + + + diff --git a/.config/emulationstation/es_systems.cfg b/.config/emulationstation/es_systems.cfg index ddc41e24..cf2bfa94 100644 --- a/.config/emulationstation/es_systems.cfg +++ b/.config/emulationstation/es_systems.cfg @@ -1,5 +1,60 @@ - + + gb + Nintendo Gameboy + ~/roms/gb + .gb .zip .7z + retroarch -f -L /usr/lib/libretro/gambatte_libretro.so %ROM% + gb + gb + + + nes + Nintendo Entertainment System + ~/roms/nes + .nes .zip .7z + retroarch -f -L /usr/lib/libretro/quicknes_libretro.so %ROM% + nes + nes + + + snes + Super Nintendo Entertainment System + ~/roms/snes + .sfc .zip .7z + retroarch -f -L /usr/lib/libretro/snes9x_libretro.so %ROM% + snes + snes + + + gamegear + Sega Game Gear + ~/roms/gamegear + .zip .7z + retroarch -f -L /usr/lib/libretro/genesis_plus_gx_libretro.so %ROM% + gamegear + gamegear + + + mastersystem + Sega Master System + ~/roms/mastersystem + .zip .7z + retroarch -f -L /usr/lib/libretro/picodrive_libretro.so %ROM% + mastersystem + mastersystem + + + megadrive + Sega Megadrive + ~/roms/megadrive + .zip .7z + + retroarch -f -L /usr/lib/libretro/picodrive_libretro.so %ROM% + megadrive + megadrive + + atari2600 Atari 2600 ~/roms/atari2600 @@ -35,76 +90,4 @@ atarilynx atarilynx - - c64 - Commodore C64 - ~/roms/c64 - .zip .7z - retroarch -f -L /usr/lib/libretro/frodo_libretro.so %ROM% - c64 - c64 - - - gb - Nintendo Gameboy - ~/roms/gb - .gb .zip .7z - retroarch -f -L /usr/lib/libretro/gambatte_libretro.so %ROM% - gb - gb - - - gba - Nintendo Gameboy Advance - ~/roms/gba - .gba .zip .7z - retroarch -f -L /usr/lib/libretro/vba_next_libretro.so %ROM% - gba - gba - - - nes - Nintendo Entertainment System - ~/roms/nes - .nes .zip .7z - retroarch -f -L /usr/lib/libretro/quicknes_libretro.so %ROM% - nes - nes - - - snes - Super Nintendo Entertainment System - ~/roms/snes - .sfc .zip - retroarch -f -L /usr/lib/libretro/snes9x_libretro.so %ROM% - snes - snes - - - gamegear - Sega Game Gear - ~/roms/gamegear - .zip .7z - retroarch -f -L /usr/lib/libretro/picodrive_libretro %ROM% - gamegear - gamegear - - - mastersystem - Sega Master System - ~/roms/mastersystem - .zip .7z - retroarch -f -L /usr/lib/libretro/picodrive_libretro %ROM% - mastersystem - mastersystem - - - megadrive - Sega Megadrive - ~/roms/megadrive - .zip .7z - retroarch -f -L /usr/lib/libretro/picodrive_libretro %ROM% - megadrive - megadrive - diff --git a/.zshrc b/.zshrc index c4feff5c..71dbe913 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,5 @@ # Extend my $PATH to $HOME/bin -export PATH=$HOME/bin:$HOME/.gem/ruby/2.2.0/bin:$HOME/.gem/ruby/2.3.0/bin:$PATH +export PATH=$HOME/bin:$HOME/.gem/ruby/2.4.0/bin:$PATH # Export the $EDITOR and $TERMINAL export BROWSER=/usr/bin/firefox