diff --git a/.config/awesome/README.md b/.config/awesome/README.md
new file mode 100644
index 0000000..290641f
--- /dev/null
+++ b/.config/awesome/README.md
@@ -0,0 +1,9 @@
+# Awesome4Laptop
+
+Installation:
+
+ git clone https://github.com/msjche/Awesome4Laptop.git ~/.config/awesome
+ cd ~/.config/awesome && cp -r Awesome4Laptop/* .
+ rm -r Awesome4Laptop
+
+
diff --git a/.config/awesome/README.org b/.config/awesome/README.org
deleted file mode 100644
index b92f7f9..0000000
--- a/.config/awesome/README.org
+++ /dev/null
@@ -1,923 +0,0 @@
-#+TITLE: Awesome WM Config
-#+AUTHOR: Derek Taylor
-#+PROPERTY: header-args :tangle rc.lua
-#+auto_tangle: t
-#+STARTUP: showeverything
-
-* Table of Contents :toc:
-- [[#about-this-config][About This Config]]
-- [[#features-of-awesome][Features of Awesome]]
-- [[#libraries][Libraries]]
-- [[#error-handling][Error Handling]]
-- [[#auto-start-windowless-processes][Auto start windowless processes]]
-- [[#setting-our-theme][Setting our theme]]
-- [[#variable-definitions][Variable definitions]]
-- [[#tags-and-layouts][Tags and Layouts]]
-- [[#menu][Menu]]
-- [[#system-sounds][System Sounds]]
-- [[#screen-and-wallpaper][Screen and wallpaper]]
-- [[#mouse-bindings][Mouse bindings]]
-- [[#keybindings][Keybindings]]
-- [[#rules][Rules]]
-- [[#signals][Signals]]
-- [[#enable-sloppy-focus][Enable sloppy focus]]
-- [[#autostart][Autostart]]
-
-* About This Config
-#+CAPTION: Awesome Scrot
-#+ATTR_HTML: :alt Awesome Scrot :title Awesome Scrot :align left
-[[https://gitlab.com/dwt1/dotfiles/-/raw/master/.screenshots/dotfiles09-thumb.png]]
-
-This is the awesome window manager configuration of Derek Taylor (DistroTube)
-- My YouTube: http://www.youtube.com/c/DistroTube
-- My GitLab: http://www.gitlab.com/dwt1/
-
-My awesome window manager configuration. Keep in mind, that my configs are purposely bloated with examples of what you can do with awesome. It is written more as a study guide rather than a config that you should download and use. Take what works for you; leave the rest!
-
-* Features of Awesome
-- Simple enough for beginner's but flexible enough for the power user.
-- Extremely customizable, maybe more so than any other window manager.
-- Configured in Lua.
-- A documented API to configure and define the behavior of your window manager.
-
-* Libraries
-These are Lua modules that we must import so that we can use their functions later in the config.
-
-#+BEGIN_SRC lua
-local awesome, client, mouse, screen, tag = awesome, client, mouse, screen, tag
-local ipairs, string, os, table, tostring, tonumber, type = ipairs, string, os, table, tostring, tonumber, type
-
--- Standard awesome library
-local gears = require("gears") --Utilities such as color parsing and objects
-local awful = require("awful") --Everything related to window managment
- require("awful.autofocus")
--- Widget and layout library
-local wibox = require("wibox")
-
--- Theme handling library
-local beautiful = require("beautiful")
-
--- Notification library
-local naughty = require("naughty")
-naughty.config.defaults['icon_size'] = 100
-
-local lain = require("lain")
-local freedesktop = require("freedesktop")
-
--- Enable hotkeys help widget for VIM and other apps
--- when client with a matching name is opened:
-local hotkeys_popup = require("awful.hotkeys_popup").widget
- require("awful.hotkeys_popup.keys")
-local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
-#+END_SRC
-
-* 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)
-
-#+BEGIN_SRC lua
-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 = tostring(err) })
- in_error = false
- end)
-end
-#+END_SRC
-
-* Auto start windowless processes
-#+BEGIN_SRC lua
-local function run_once(cmd_arr)
- for _, cmd in ipairs(cmd_arr) do
- awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd))
- end
-end
-
-run_once({ "unclutter -root" }) -- entries must be comma-separated
-#+END_SRC
-
-* Setting our theme
-We can have multiple themes available to us and set the one we want to use with chosen_theme.
-#+BEGIN_SRC lua
-local themes = {
- "powerarrow", -- 1
-}
-
--- choose your theme here
-local chosen_theme = themes[1]
-local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)
-beautiful.init(theme_path)
-#+END_SRC
-
-* Variable definitions
-It's nice to assign values to stuff that you will use more than once
-in the config. Setting values for things like font, terminal and editor
-means you only have to change the value here to make changes globally.
-
-#+BEGIN_SRC lua
-local modkey = "Mod4"
-local altkey = "Mod1"
-local ctrlkey = "Control"
-local terminal = "alacritty"
-local browser = "qutebrowser"
-local editor = os.getenv("EDITOR") or "vim"
-local emacs = "emacsclient -c -a 'emacs' "
-local colorscheme = "DoomOne"
-local mediaplayer = "mpv"
-local soundplayer = "ffplay -nodisp -autoexit " -- The program that will play system sounds
-#+END_SRC
-
-* Tags and Layouts
-Tags are essentially our workspaces. There are a ton of layouts available in awesome. I have most of them commented out, but if you want to try them out, then simply uncomment them.
-
-#+BEGIN_SRC lua
--- awesome variables
-awful.util.terminal = terminal
---awful.util.tagnames = { " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }
-awful.util.tagnames = { " DEV ", " WWW ", " SYS ", " DOC ", " VBOX ", " CHAT ", " MUS ", " VID ", " GFX " }
-awful.layout.suit.tile.left.mirror = true
-awful.layout.layouts = {
- awful.layout.suit.tile,
- awful.layout.suit.floating,
- --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.corner.nw,
- --awful.layout.suit.corner.ne,
- --awful.layout.suit.corner.sw,
- --awful.layout.suit.corner.se,
- --lain.layout.cascade,
- --lain.layout.cascade.tile,
- --lain.layout.centerwork,
- --lain.layout.centerwork.horizontal,
- --lain.layout.termfair,
- --lain.layout.termfair.center,
-}
-
-awful.util.taglist_buttons = my_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, 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)
-)
-
-awful.util.tasklist_buttons = my_table.join(
- awful.button({ }, 1, function (c)
- if c == client.focus then
- c.minimized = true
- else
- c:emit_signal("request::activate", "tasklist", {raise = true})
- end
- end),
- awful.button({ }, 3, function ()
- 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),
- awful.button({ }, 4, function () awful.client.focus.byidx(1) end),
- awful.button({ }, 5, function () awful.client.focus.byidx(-1) end)
-)
-
-lain.layout.termfair.nmaster = 3
-lain.layout.termfair.ncol = 1
-lain.layout.termfair.center.nmaster = 3
-lain.layout.termfair.center.ncol = 1
-lain.layout.cascade.tile.offset_x = 2
-lain.layout.cascade.tile.offset_y = 32
-lain.layout.cascade.tile.extra_padding = 5
-lain.layout.cascade.tile.nmaster = 5
-lain.layout.cascade.tile.ncol = 2
-
-beautiful.init(string.format(gears.filesystem.get_configuration_dir() .. "/themes/%s/theme.lua", chosen_theme))
-#+END_SRC
-
-* Menu
-Awesome has a menu system if you want to use it.
-
-#+BEGIN_SRC lua
-local myawesomemenu = {
- { "hotkeys", function() return false, hotkeys_popup.show_help end },
- { "manual", terminal .. " -e 'man awesome'" },
- { "edit config", "emacsclient -c -a emacs ~/.config/awesome/rc.lua" },
- { "arandr", "arandr" },
- { "restart", awesome.restart },
-}
-
-awful.util.mymainmenu = freedesktop.menu.build({
- icon_size = beautiful.menu_height or 16,
- before = {
- { "Awesome", myawesomemenu, beautiful.awesome_icon },
- --{ "Atom", "atom" },
- -- other triads can be put here
- },
- after = {
- { "Terminal", terminal },
- { "Log out", function() awesome.quit() end },
- { "Sleep", "systemctl suspend" },
- { "Restart", "systemctl reboot" },
- { "Exit", "systemctl poweroff" },
- -- other triads can be put here
- }
-})
---menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it
-#+END_SRC
-
-* System Sounds
-Available sounds that are part of the default =dtos-sounds= package include:
-+ menu-01.mp3
-+ menu-02.mp3
-+ menu-03.mp3
-+ shutdown-01.mp3
-+ shutdown-02.mp3
-+ shutdown-03.mp3
-+ startup-01.mp3
-+ startup-02.mp3
-+ startup-03.mp3
-
-#+begin_src lua
-local soundDir = "/opt/dtos-sounds/" -- The directory that has the sound files
-
-local startupSound = soundDir .. "startup-01.mp3"
-local shutdownSound = soundDir .. "shutdown-01.mp3"
-local dmenuSound = soundDir .. "menu-01.mp3"
-#+end_src
-
-* Screen and wallpaper
-You can set wallpaper with awesome. This is optional, of course. Otherwise, just set wallpaper with your preferred wallpaper utility (such as nitrogen or feh).
-#+BEGIN_SRC lua
--- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
-screen.connect_signal("property::geometry", function(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)
--- Create a wibox for each screen and add it
-awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end)
-#+END_SRC
-
-* Mouse bindings
-Defining what our mouse clicks do.
-
-#+BEGIN_SRC lua
-root.buttons(my_table.join(
- awful.button({ }, 3, function () awful.util.mymainmenu:toggle() end),
- awful.button({ }, 4, awful.tag.viewnext),
- awful.button({ }, 5, awful.tag.viewprev)
-))
-#+END_SRC
-
-* Keybindings
-| Keybinding | Action |
-|-------------------------+--------------------------------------------------------------------------|
-| MODKEY + RETURN | opens terminal (alacritty is the terminal but can be easily changed) |
-| MODKEY + SHIFT + RETURN | opens run launcher (dmenu is the run launcher but can be easily changed) |
-| MODKEY + SHIFT + c | closes window with focus |
-| MODKEY + SHIFT + r | restarts awesome |
-| MODKEY + SHIFT + q | quits awesome |
-| MODKEY + 1-9 | switch focus to workspace (1-9) |
-| MODKEY + SHIFT + 1-9 | send focused window to workspace (1-9) |
-| MODKEY + j,k | switches focus between windows in the stack, |
-| MODKEY + SHIFT + j,k | rotates the windows in the stack |
-| MODKEY + SHIFT + h,l | Decrease/increase master width factor |
-| ALT + h,j,k,l | switches focus between windows across all monitors |
-| MODKEY + period | switch focus to next monitor |
-| MODKEY + comma | switch focus to prev monitor |
-
-
-#+BEGIN_SRC lua
-globalkeys = my_table.join(
-
- -- {{{ Personal keybindings
-
- -- Awesome keybindings
- awful.key({ modkey, }, "Return", function () awful.spawn( terminal ) end,
- {description = "Launch terminal", group = "awesome"}),
- awful.key({ modkey, }, "b", function () awful.spawn( "qutebrowser" ) end,
- {description = "Launch qutebrowser", group = "awesome"}),
- awful.key({ modkey, "Shift" }, "r", awesome.restart,
- {description = "Reload awesome", group = "awesome"}),
- awful.key({ modkey, "Shift" }, "q", function () awful.spawn.with_shell("dm-logout") end,
- {description = "Quit awesome", group = "awesome"}),
- awful.key({ modkey, }, "s", hotkeys_popup.show_help,
- {description = "Show help", group="awesome"}),
- awful.key({ modkey, "Shift" }, "w", function () awful.util.mymainmenu:show() end,
- {description = "Show main menu", group = "awesome"}),
- awful.key({ modkey, "Shift" }, "b", function ()
- for s in screen do
- s.mywibox.visible = not s.mywibox.visible
- if s.mybottomwibox then
- s.mybottomwibox.visible = not s.mybottomwibox.visible
- end
- end
- end,
- {description = "Show/hide wibox (bar)", group = "awesome"}),
-
- -- Run launcher
- awful.key({ modkey, "Shift" }, "Return", function () awful.util.spawn("dm-run") end,
- {description = "Run launcher", group = "hotkeys"}),
-
- -- Dmscripts (Super + p followed by KEY)
- awful.key( {modkey}, "p", function()
- local grabber
- grabber =
- awful.keygrabber.run(
- function(_, key, event)
- if event == "release" then return end
-
- if key == "h" then awful.spawn.with_shell("dm-hub")
- elseif key == "a" then awful.spawn.with_shell("dm-sounds")
- elseif key == "b" then awful.spawn.with_shell("dm-setbg")
- elseif key == "c" then awful.spawn.with_shell("dtos-colorscheme")
- elseif key == "e" then awful.spawn.with_shell("dm-confedit")
- elseif key == "i" then awful.spawn.with_shell("dm-maim")
- elseif key == "k" then awful.spawn.with_shell("dm-kill")
- elseif key == "m" then awful.spawn.with_shell("dm-man")
- elseif key == "n" then awful.spawn.with_shell("dm-note")
- elseif key == "o" then awful.spawn.with_shell("dm-bookman")
- elseif key == "p" then awful.spawn.with_shell("passmenu -p \"Pass: \"")
- elseif key == "q" then awful.spawn.with_shell("dm-logout")
- elseif key == "r" then awful.spawn.with_shell("dm-radio")
- elseif key == "s" then awful.spawn.with_shell("dm-websearch")
- elseif key == "t" then awful.spawn.with_shell("dm-translate")
- end
- awful.keygrabber.stop(grabber)
- end
- )
- end,
- {description = "followed by KEY", group = "Dmscripts"}
- ),
-
- -- Emacs (Super + e followed by KEY)
- awful.key( {modkey}, "e", function()
- local grabber
- grabber =
- awful.keygrabber.run(
- function(_, key, event)
- if event == "release" then return end
-
- if key == "e" then awful.spawn.with_shell(emacs .. "--eval '(dashboard-refresh-buffer)'")
- elseif key == "a" then awful.spawn.with_shell(emacs .. "--eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/\")'")
- elseif key == "b" then awful.spawn.with_shell(emacs .. "--eval '(ibuffer)'")
- elseif key == "d" then awful.spawn.with_shell(emacs .. "--eval '(dired nil)'")
- elseif key == "i" then awful.spawn.with_shell(emacs .. "--eval '(erc)'")
- elseif key == "n" then awful.spawn.with_shell(emacs .. "--eval '(elfeed)'")
- elseif key == "s" then awful.spawn.with_shell(emacs .. "--eval '(eshell)'")
- elseif key == "v" then awful.spawn.with_shell(emacs .. "--eval '(+vterm/here nil)'")
- elseif key == "w" then awful.spawn.with_shell(emacs .. "--eval '(doom/window-maximize-buffer(eww \"distro.tube\"))'")
- end
- awful.keygrabber.stop(grabber)
- end
- )
- end,
- {description = "followed by KEY", group = "Emacs"}
- ),
-
- -- Tag browsing with modkey
- 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({ altkey, }, "Escape", awful.tag.history.restore,
- {description = "go back", group = "tag"}),
-
- -- Tag browsing ALT+TAB (ALT+SHIFT+TAB)
- awful.key({ altkey, }, "Tab", awful.tag.viewnext,
- {description = "view next", group = "tag"}),
- awful.key({ altkey, "Shift" }, "Tab", awful.tag.viewprev,
- {description = "view previous", group = "tag"}),
-
- -- Non-empty tag browsing CTRL+TAB (CTRL+SHIFT+TAB)
- awful.key({ ctrlkey }, "Tab", function () lain.util.tag_view_nonempty(-1) end,
- {description = "view previous nonempty", group = "tag"}),
- awful.key({ ctrlkey, "Shift" }, "Tab", function () lain.util.tag_view_nonempty(1) end,
- {description = "view previous nonempty", group = "tag"}),
-
- -- Default client focus
- 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"}),
-
- -- By direction client focus
- awful.key({ altkey }, "j", function() awful.client.focus.global_bydirection("down")
- if client.focus then client.focus:raise() end end,
- {description = "Focus down", group = "client"}),
- awful.key({ altkey }, "k", function() awful.client.focus.global_bydirection("up")
- if client.focus then client.focus:raise() end end,
- {description = "Focus up", group = "client"}),
- awful.key({ altkey }, "h", function() awful.client.focus.global_bydirection("left")
- if client.focus then client.focus:raise() end end,
- {description = "Focus left", group = "client"}),
- awful.key({ altkey }, "l", function() awful.client.focus.global_bydirection("right")
- if client.focus then client.focus:raise() end end,
- {description = "Focus right", group = "client"}),
-
- -- By direction client focus with arrows
- awful.key({ ctrlkey, modkey }, "Down", function() awful.client.focus.global_bydirection("down")
- if client.focus then client.focus:raise() end end,
- {description = "Focus down", group = "client"}),
- awful.key({ ctrlkey, modkey }, "Up", function() awful.client.focus.global_bydirection("up")
- if client.focus then client.focus:raise() end end,
- {description = "Focus up", group = "client"}),
- awful.key({ ctrlkey, modkey }, "Left", function() awful.client.focus.global_bydirection("left")
- if client.focus then client.focus:raise() end end,
- {description = "Focus left", group = "client"}),
- awful.key({ ctrlkey, modkey }, "Right", function() awful.client.focus.global_bydirection("right")
- if client.focus then client.focus:raise() end end,
- {description = "Focus right", group = "client"}),
-
- -- 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 }, ".", function () awful.screen.focus_relative(1) end,
- {description = "focus the next screen", group = "screen"}),
- awful.key({ modkey }, ",", 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({ ctrlkey, }, "Tab", function () awful.client.focus.history.previous()
- if client.focus then client.focus:raise() end end,
- {description = "go back", group = "client"}),
-
- -- On the fly useless gaps change
- awful.key({ altkey, ctrlkey }, "j", function () lain.util.useless_gaps_resize(1) end,
- {description = "increment useless gaps", group = "tag"}),
- awful.key({ altkey, ctrlkey }, "k", function () lain.util.useless_gaps_resize(-1) end,
- {description = "decrement useless gaps", group = "tag"}),
-
- -- Dynamic tagging
- awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end,
- {description = "add new tag", group = "tag"}),
- awful.key({ modkey, ctrlkey }, "r", function () lain.util.rename_tag() end,
- {description = "rename tag", group = "tag"}),
- awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(-1) end,
- {description = "move tag to the left", group = "tag"}),
- awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(1) end,
- {description = "move tag to the right", group = "tag"}),
- awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end,
- {description = "delete tag", group = "tag"}),
-
- 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" }, "Up", function () awful.tag.incnmaster( 1, nil, true) end,
- {description = "increase the number of master clients", group = "layout"}),
- awful.key({ modkey, "Shift" }, "Down", function () awful.tag.incnmaster(-1, nil, true) end,
- {description = "decrease the number of master clients", group = "layout"}),
- awful.key({ modkey, ctrlkey }, "h", function () awful.tag.incncol( 1, nil, true) end,
- {description = "increase the number of columns", group = "layout"}),
- awful.key({ modkey, ctrlkey }, "l", function () awful.tag.incncol(-1, nil, true) end,
- {description = "decrease the number of columns", group = "layout"}),
- awful.key({ modkey, }, "Tab", function () awful.layout.inc( 1) end,
- {description = "select next", group = "layout"}),
- awful.key({ modkey, "Shift" }, "Tab", function () awful.layout.inc(-1) end,
- {description = "select previous", group = "layout"}),
-
- awful.key({ modkey, ctrlkey }, "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"}),
-
- -- Dropdown application
- awful.key({ modkey, }, "F12", function () awful.screen.focused().quake:toggle() end,
- {description = "dropdown application", group = "super"}),
-
- -- Widgets popups
- awful.key({ altkey, }, "c", function () lain.widget.cal.show(7) end,
- {description = "show calendar", group = "widgets"}),
- awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end,
- {description = "show filesystem", group = "widgets"}),
- awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end,
- {description = "show weather", group = "widgets"}),
-
- -- Brightness
- awful.key({ }, "XF86MonBrightnessUp", function () os.execute("xbacklight -inc 10") end,
- {description = "+10%", group = "hotkeys"}),
- awful.key({ }, "XF86MonBrightnessDown", function () os.execute("xbacklight -dec 10") end,
- {description = "-10%", group = "hotkeys"}),
-
- -- ALSA volume control
- --awful.key({ ctrlkey }, "Up",
- awful.key({ }, "XF86AudioRaiseVolume",
- function ()
- os.execute(string.format("amixer -q set %s 1%%+", beautiful.volume.channel))
- beautiful.volume.update()
- end),
- --awful.key({ ctrlkey }, "Down",
- awful.key({ }, "XF86AudioLowerVolume",
- function ()
- os.execute(string.format("amixer -q set %s 1%%-", beautiful.volume.channel))
- beautiful.volume.update()
- end),
- awful.key({ }, "XF86AudioMute",
- function ()
- os.execute(string.format("amixer -q set %s toggle", beautiful.volume.togglechannel or beautiful.volume.channel))
- beautiful.volume.update()
- end),
- awful.key({ ctrlkey, "Shift" }, "m",
- function ()
- os.execute(string.format("amixer -q set %s 100%%", beautiful.volume.channel))
- beautiful.volume.update()
- end),
- awful.key({ ctrlkey, "Shift" }, "0",
- function ()
- os.execute(string.format("amixer -q set %s 0%%", beautiful.volume.channel))
- beautiful.volume.update()
- end),
-
- -- Copy primary to clipboard (terminals to gtk)
- awful.key({ modkey }, "c", function () awful.spawn.with_shell("xsel | xsel -i -b") end,
- {description = "copy terminal to gtk", group = "hotkeys"}),
- -- Copy clipboard to primary (gtk to terminals)
- awful.key({ modkey }, "v", function () awful.spawn.with_shell("xsel -b | xsel") end,
- {description = "copy gtk to terminal", group = "hotkeys"}),
- awful.key({ altkey, "Shift" }, "x",
- function ()
- 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"})
- --]]
-)
-
-clientkeys = my_table.join(
- awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client,
- {description = "magnify client", group = "client"}),
- awful.key({ modkey, }, "space",
- 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 = "hotkeys"}),
- awful.key({ modkey, }, "t", awful.client.floating.toggle,
- {description = "toggle floating", group = "client"}),
- awful.key({ modkey, ctrlkey }, "Return", function (c) c:swap(awful.client.getmaster()) end,
- {description = "move to master", group = "client"}),
- awful.key({ modkey, "Shift" }, "t", function (c) c.ontop = not c.ontop end,
- {description = "toggle keep on top", group = "client"}),
- awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
- {description = "move to screen", 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 ,
- {description = "minimize", group = "client"}),
- awful.key({ modkey, }, "m",
- function (c)
- c.maximized = not c.maximized
- c:raise()
- end ,
- {description = "maximize", group = "client"})
-)
-
--- Bind all key numbers to tags.
--- Be careful: we use keycodes to make it works on any keyboard layout.
--- This should map on the top row of your keyboard, usually 1 to 9.
-for i = 1, 9 do
- -- Hack to only show tags 1 and 9 in the shortcut window (mod+s)
- local descr_view, descr_toggle, descr_move, descr_toggle_focus
- if i == 1 or i == 9 then
- descr_view = {description = "view tag #", group = "tag"}
- descr_toggle = {description = "toggle tag #", group = "tag"}
- descr_move = {description = "move focused client to tag #", group = "tag"}
- descr_toggle_focus = {description = "toggle focused client on tag #", group = "tag"}
- end
- globalkeys = my_table.join(globalkeys,
- -- View tag only.
- awful.key({ modkey }, "#" .. i + 9,
- function ()
- local screen = awful.screen.focused()
- local tag = screen.tags[i]
- if tag then
- tag:view_only()
- end
- end,
- descr_view),
- -- Toggle tag display.
- awful.key({ modkey, ctrlkey }, "#" .. i + 9,
- function ()
- local screen = awful.screen.focused()
- local tag = screen.tags[i]
- if tag then
- awful.tag.viewtoggle(tag)
- end
- end,
- descr_toggle),
- -- Move client to tag.
- awful.key({ modkey, "Shift" }, "#" .. i + 9,
- function ()
- if client.focus then
- local tag = client.focus.screen.tags[i]
- if tag then
- client.focus:move_to_tag(tag)
- end
- end
- end,
- descr_move),
- -- Toggle tag on focused client.
- awful.key({ modkey, ctrlkey, "Shift" }, "#" .. i + 9,
- function ()
- if client.focus then
- local tag = client.focus.screen.tags[i]
- if tag then
- client.focus:toggle_tag(tag)
- end
- end
- end,
- descr_toggle_focus)
- )
-end
-
-clientbuttons = gears.table.join(
- awful.button({ }, 1, function (c)
- c:emit_signal("request::activate", "mouse_click", {raise = true})
- end),
- awful.button({ modkey }, 1, function (c)
- c:emit_signal("request::activate", "mouse_click", {raise = true})
- awful.mouse.client.move(c)
- end),
- awful.button({ modkey }, 3, function (c)
- c:emit_signal("request::activate", "mouse_click", {raise = true})
- awful.mouse.client.resize(c)
- end)
-)
-
--- Set keys
-root.keys(globalkeys)
-#+END_SRC
-
-* Rules
-#+BEGIN_SRC lua
--- 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,
- screen = awful.screen.preferred,
- placement = awful.placement.no_overlap+awful.placement.no_offscreen,
- size_hints_honor = false
- }
- },
-
- -- Titlebars
- { rule_any = { type = { "dialog", "normal" } },
- properties = { titlebars_enabled = false } },
-
- -- Set applications to always map on the tag 1 on screen 1.
- -- find class or role via xprop command
- --{ rule = { class = browser1 },
- --properties = { screen = 1, tag = awful.util.tagnames[1] } },
-
- --{ rule = { class = editorgui },
- --properties = { screen = 1, tag = awful.util.tagnames[2] } },
-
- --{ rule = { class = "Geany" },
- --properties = { screen = 1, tag = awful.util.tagnames[2] } },
-
- -- Set applications to always map on the tag 3 on screen 1.
- --{ rule = { class = "Inkscape" },
- --properties = { screen = 1, tag = awful.util.tagnames[3] } },
-
- -- Set applications to always map on the tag 4 on screen 1.
- --{ rule = { class = "Gimp" },
- --properties = { screen = 1, tag = awful.util.tagnames[4] } },
-
- -- Set applications to be maximized at startup.
- -- find class or role via xprop command
-
- { rule = { class = "Gimp*", role = "gimp-image-window" },
- properties = { maximized = true } },
-
- { rule = { class = "inkscape" },
- properties = { maximized = true } },
-
- { rule = { class = mediaplayer },
- properties = { maximized = true } },
-
- { rule = { class = "Vlc" },
- properties = { maximized = true } },
-
- { rule = { class = "VirtualBox Manager" },
- properties = { maximized = true } },
-
- { rule = { class = "VirtualBox Machine" },
- properties = { maximized = true } },
-
- { rule = { class = "Xfce4-settings-manager" },
- properties = { floating = false } },
-
-
-
- -- Floating clients.
- { rule_any = {
- instance = {
- "DTA", -- Firefox addon DownThemAll.
- "copyq", -- Includes session name in class.
- },
- class = {
- "Arandr",
- "Blueberry",
- "Galculator",
- "Gnome-font-viewer",
- "Gpick",
- "Imagewriter",
- "Font-manager",
- "Kruler",
- "MessageWin", -- kalarm.
- "Oblogout",
- "Peek",
- "Skype",
- "System-config-printer.py",
- "Sxiv",
- "Unetbootin.elf",
- "Wpa_gui",
- "pinentry",
- "veromix",
- "xtightvncviewer"},
-
- name = {
- "Event Tester", -- xev.
- },
- role = {
- "AlarmWindow", -- Thunderbird's calendar.
- "pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
- "Preferences",
- "setup",
- }
- }, properties = { floating = true }},
-
-}
-#+END_SRC
-
-* Signals
-#+BEGIN_SRC lua
--- 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 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)
-
--- Add a titlebar if titlebars_enabled is set to true in the rules.
-client.connect_signal("request::titlebars", function(c)
- -- Custom
- if beautiful.titlebar_fun then
- beautiful.titlebar_fun(c)
- return
- end
-
- -- Default
- -- buttons for the titlebar
- local buttons = my_table.join(
- awful.button({ }, 1, function()
- c:emit_signal("request::activate", "titlebar", {raise = true})
- awful.mouse.client.move(c)
- end),
- awful.button({ }, 3, function()
- c:emit_signal("request::activate", "titlebar", {raise = true})
- awful.mouse.client.resize(c)
- end)
- )
-
- awful.titlebar(c, {size = 21}) : 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)
-#+END_SRC
-
-* Enable sloppy focus
-Enable sloppy focus, so that focus follows mouse.
-
-#+BEGIN_SRC lua
-client.connect_signal("mouse::enter", function(c)
- c:emit_signal("request::activate", "mouse_enter", {raise = true})
-end)
-
--- No border for maximized clients
-function border_adjust(c)
- if c.maximized then -- no borders if only 1 client visible
- c.border_width = 0
- elseif #awful.screen.focused().clients > 1 then
- c.border_width = beautiful.border_width
- c.border_color = beautiful.border_focus
- end
-end
-
-client.connect_signal("focus", border_adjust)
-client.connect_signal("property::maximized", border_adjust)
-client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-#+END_SRC
-
-* Autostart
-#+BEGIN_SRC lua
-awful.spawn.with_shell(soundplayer .. startupSound)
-awful.spawn.with_shell("lxsession")
-awful.spawn.with_shell("picom")
-awful.spawn.with_shell("nm-applet")
-awful.spawn.with_shell("volumeicon")
-awful.spawn.with_shell("killall conky")
-awful.spawn.with_shell("sleep 3 && conky -c $HOME/.config/conky/awesome/" .. colorscheme .. "-01.conkyrc")
-awful.spawn.with_shell("/usr/bin/emacs --daemon")
-#+END_SRC
-
-Select only =ONE= of the following four ways to set the wallpaper.
-
-#+BEGIN_SRC lua
-awful.spawn.with_shell("xargs xwallpaper --stretch < ~/.cache/wall")
---awful.spawn.with_shell("~/.fehbg") -- set last saved feh wallpaper
---awful.spawn.with_shell("feh --randomize --bg-fill /usr/share/backgrounds/dtos-backgrounds/*") -- feh sets random wallpaper
---awful.spawn.with_shell("nitrogen --restore") -- if you prefer nitrogen to feh/xwallpaper
-#+END_SRC
diff --git a/.config/awesome/autostart.sh b/.config/awesome/autostart.sh
new file mode 100755
index 0000000..9554672
--- /dev/null
+++ b/.config/awesome/autostart.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+function run {
+ if ! pgrep $1 ;
+ then
+ $@&
+ fi
+}
+
+#run "megasync"
+run "xscreensaver -no-splash"
+#run "/usr/bin/dropbox"
+#run "insync start"
+run "picom"
+#run "/usr/bin/redshift"
+run "mpd"
+run "nm-applet"
+
+# sleep 3
+# run "$HOME/Scripts/Theming/1440.sh"
+
diff --git a/.config/awesome/conky/conkyrc.lua b/.config/awesome/conky/conkyrc.lua
new file mode 100644
index 0000000..9ad9d0b
--- /dev/null
+++ b/.config/awesome/conky/conkyrc.lua
@@ -0,0 +1,131 @@
+-----------------------------------------------------------------------------
+-- conkyrc_seamod
+-- Date : 04/23/2016
+-- Author : SeaJey and Maxiwell
+-- Conky : >= 1.10
+-- License : Distributed under the terms of GNU GPL version 2 or later
+-----------------------------------------------------------------------------
+
+conky.config = {
+
+ background = true,
+ update_interval = 1,
+ time_in_seconds = true,
+
+ cpu_avg_samples = 2,
+ net_avg_samples = 2,
+ temperature_unit = 'farenheight',
+
+ double_buffer = true,
+ no_buffers = true,
+ text_buffer_size = 2048,
+
+ gap_x = 0,
+ gap_y = 150,
+ minimum_width = 100, minimum_height = 900,
+ maximum_width = 115,
+
+ own_window = true,
+ own_window_type = 'desktop',
+ own_window_transparent = true,
+ own_window_argb_visual = true,
+ own_window_class = 'conky-semi',
+ own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
+
+ border_inner_margin = 0,
+ border_outer_margin = 0,
+ alignment = 'top_left',
+
+
+ draw_shades = false,
+ draw_outline = false,
+ draw_borders = false,
+ draw_graph_borders = false,
+
+ override_utf8_locale = true,
+ use_xft = true,
+ font = 'caviar dreams:size=11',
+ xftalpha = 0.5,
+ uppercase = false,
+
+-- Defining colors
+ default_color = '#FFFFFF',
+-- Shades of Gray
+ color1 = '#DDDDDD',
+ color2 = '#AAAAAA',
+ color3 = '#888888',
+-- Gentoo Purple
+ color4 = '#7A5ADA',
+-- Green
+ color5 = '#8FEB8F',
+-- Red
+ color6 = '#F45F45',
+-- Loading lua script for drawning rings
+ lua_load = '~/.config/awesome/conky/seamod_rings.lua',
+ lua_draw_hook_pre = 'main',
+
+};
+
+--${offset 15}${font Droid Sans:size=11:style=normal}${color1}${pre_exec lsb_release -d | cut -f 2} - $sysname $kernel
+conky.text = [[
+
+${font Droid Sans:size=8:style=normal}${color1}$kernel
+${font Droid Sans:size=8:style=normal}${color1}Temp ${color3}$alignr${exec 10 sensors | grep Core\ 3 | awk '{print $3}'}
+${font Droid Sans:size=9:style=normal}${color1}NVidia Optimus: ${color3}$alignr${execi 10 cat /proc/acpi/bbswitch | awk '{print $2}'}
+${font Droid Sans:size=9:style=normal}${color1}Uptime: $alignr${color3}${color3}$uptime
+#${voffset 40}
+#${offset 65}${font Droid Sans:size=16:style=bold}${color5}BAT
+#
+#${voffset -35}
+${font Droid Sans:size=8:style=normal}${color1}Status ${color3}$alignr${battery BAT1}
+${font Droid Sans:size=8:style=normal}${color1}Time Left ${font Droid Sans:size=8:bold:style=normal}${color4}$alignr${format_time $battery_time "\hh\mm"}${battery_time BAT1}
+
+# Showing CPU Graph
+${voffset 40}
+${offset 65}${font Droid Sans:size=19:style=bold}${color5}CPU
+${voffset 10}
+${cpugraph cpu1 20,118 666666 666666}
+${voffset -40}
+${font Droid Sans:size=9:style=normal}${color1}CPU Freq: ${font Droid Sans:size=9:bold:style=normal}${alignr}${color4}${freq} ${color2}MHz
+
+# Showing TOP 5 CPU-consumers
+${font Droid Sans:bold:size=8:style=normal}${color4}${top name 1}${alignr}${top cpu 1}%
+${font Droid Sans:size=8:style=normal}${color1}${top name 2}${alignr}${top cpu 2}%
+${font Droid Sans:size=8:style=normal}${color2}${top name 3}${alignr}${top cpu 3}%
+${font Droid Sans:size=8:style=normal}${color3}${top name 4}${alignr}${top cpu 4}%
+${font Droid Sans:size=8:style=normal}${color3}${top name 5}${alignr}${top cpu 5}%
+
+#Showing memory part with TOP 5
+${voffset 30}
+${offset 65}${font Droid Sans:size=14:style=bold}${color5}MEM
+${voffset 1}
+${font Droid Sans:bold:size=8:style=normal}${color4}${top_mem name 1}${alignr}${top_mem mem_res 1}
+${font Droid Sans:size=8:style=normal}${color1}${top_mem name 2}${alignr}${top_mem mem_res 2}
+${font Droid Sans:size=8:style=normal}${color2}${top_mem name 3}${alignr}${top_mem mem_res 3}
+${font Droid Sans:size=8:style=normal}${color3}${top_mem name 4}${alignr}${top_mem mem_res 4}
+${font Droid Sans:size=8:style=normal}${color3}${top_mem name 4}${alignr}${top_mem mem_res 5}
+
+# Showing disk partitions: boot, root, home
+${voffset 47}
+${offset 70}${font Droid Sans:size=12:style=bold}${color5}DISKS
+${voffset 20}
+${diskiograph 20,118 666666 666666}${voffset -30}
+${voffset 10}
+${font Droid Sans:size=8:}${color1}Boot Free: ${alignr}$color3${font Droid Sans:size=8:style=normal}${fs_free /boot}
+${font Droid Sans:size=8:}${color1}Root Free: ${alignr}$color3${font Droid Sans:size=8:style=normal}${fs_free /}
+${font Droid Sans:size=8:}${color1}Home Free: ${alignr}$color3${font Droid Sans:size=8:style=normal}${fs_free /home}
+
+# Network
+${voffset 49}
+${offset 70}${font Droid Sans:size=14:style=bold}${color5}WiFi
+${voffset 10}
+${font Droid Sans:size=10:style=bold}${color1}${color2}VPN: ${font Droid Sans:size=10:style=bold}${color5}${if_up tun0}UP${else}${color6}Down$endif$font$color
+${font Droid Sans:size=8:style=bold}${color1}Lan IP: ${alignr}$color3${addr wlp6s0}
+${font Droid Sans:size=8:style=bold}${color1}Ext IP: ${alignr}${color3}NOPE#${alignr}$color3${execi 600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1}
+#${font Droid Sans:size=8:style=bold}${alignr}$color3${execi 600 wget -q -O /dev/stdout https://www.dnsleaktest.com/ | grep from | grep -o '
.*.*<' | grep -oEi '[a-zA-Z0-9 ,]+'}
+${voffset 10}
+${color1}${font Droid Sans:size=8:style=bold}Up: ${alignr}${font Droid Sans:size=8:style=normal}$color2${upspeed wlp6s0} / ${totalup wlp6s0}
+${upspeedgraph wlp6s0 40,118 4B1B0C FF5C2B 1280KiB -l}
+${color1}${font Droid Sans:size=8:style=bold}Down: ${alignr}${font Droid Sans:size=8:style=normal}$color2${downspeed wlp6s0} / ${totaldown wlp6s0}
+${downspeedgraph wlp6s0 40,118 324D23 77B753 1280KiB -l}
+]];
diff --git a/.config/awesome/conky/seamod_rings.lua b/.config/awesome/conky/seamod_rings.lua
new file mode 100644
index 0000000..fce8333
--- /dev/null
+++ b/.config/awesome/conky/seamod_rings.lua
@@ -0,0 +1,478 @@
+--==============================================================================
+-- seamod_rings.lua
+--
+-- Date : 05/02/2012
+-- Author : SeaJey
+-- Version : v0.1
+-- License : Distributed under the terms of GNU GPL version 2 or later
+--
+-- This version is a modification of lunatico_rings.lua wich is modification of conky_orange.lua
+--
+-- conky_orange.lua: http://gnome-look.org/content/show.php?content=137503&forumpage=0
+-- lunatico_rings.lua: http://gnome-look.org/content/show.php?content=142884
+--==============================================================================
+
+require 'cairo'
+
+gauge = {
+{
+ name='cpu', arg='cpu1', max_value=100,
+ x=60, y=175,
+ graph_radius=54,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='cpu', arg='cpu2', max_value=100,
+ x=60, y=175,
+ graph_radius=48,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='cpu', arg='cpu3', max_value=100,
+ x=60, y=175,
+ graph_radius=42,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='cpu', arg='cpu4', max_value=100,
+ x=60, y=175,
+ graph_radius=36,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='cpu', arg='cpu5', max_value=100,
+ x=60, y=175,
+ graph_radius=30,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='cpu', arg='cpu6', max_value=100,
+ x=60, y=175,
+ graph_radius=24,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='cpu', arg='cpu7', max_value=100,
+ x=60, y=175,
+ graph_radius=18,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='cpu', arg='cpu8', max_value=100,
+ x=60, y=175,
+ graph_radius=12,
+ graph_thickness=5,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=0,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='',
+ caption_weight=1, caption_size=9.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+--{
+-- name='battery_percent', arg='BAT1', max_value=100,
+-- x=60, y=133,
+-- graph_radius=35,
+-- graph_thickness=20,
+-- graph_start_angle=180,
+-- graph_unit_angle=2.7, graph_unit_thickness=2.7,
+-- graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+-- graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+-- hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+-- txt_radius=13,
+-- txt_weight=1, txt_size=10.0,
+-- txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+-- graduation_radius=23,
+-- graduation_thickness=0, graduation_mark_thickness=2,
+-- graduation_unit_angle=27,
+-- graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
+-- caption='',
+-- caption_weight=1, caption_size=10.0,
+-- caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+--},
+{
+ name='memperc', arg='', max_value=100,
+ x=60, y=428,
+ graph_radius=35,
+ graph_thickness=20,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=18,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=23,
+ graduation_thickness=0, graduation_mark_thickness=2,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
+ caption='',
+ caption_weight=1, caption_size=10.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.3,
+},
+{
+ name='fs_used_perc', arg='/home', max_value=100,
+ x=60, y=620,
+ graph_radius=52,
+ graph_thickness=7,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=65,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=23,
+ graduation_thickness=0, graduation_mark_thickness=2,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='/home',
+ caption_weight=1, caption_size=12.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.5,
+},
+{
+ name='fs_used_perc', arg='/', max_value=100,
+ x=60, y=620,
+ graph_radius=40,
+ graph_thickness=7,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=27,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=23,
+ graduation_thickness=0, graduation_mark_thickness=2,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='/',
+ caption_weight=1, caption_size=12.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.5,
+},
+{
+ name='fs_used_perc', arg='/boot', max_value=100,
+ x=60, y=620,
+ graph_radius=28,
+ graph_thickness=7,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=1.0,
+ txt_radius=16,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=23,
+ graduation_thickness=0, graduation_mark_thickness=2,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='/boot',
+ caption_weight=1, caption_size=12.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.5,
+},
+{
+ name='downspeedf', arg='wlp6s0', max_value=100,
+ x=60, y=835,
+ graph_radius=42,
+ graph_thickness=7,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=0,
+ txt_radius=60,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='Down',
+ caption_weight=1, caption_size=12.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.5,
+},
+{
+ name='upspeedf', arg='wlp6s0', max_value=100,
+ x=60, y=835,
+ graph_radius=30,
+ graph_thickness=7,
+ graph_start_angle=180,
+ graph_unit_angle=2.7, graph_unit_thickness=2.7,
+ graph_bg_colour=0xffffff, graph_bg_alpha=0.1,
+ graph_fg_colour=0xFFFFFF, graph_fg_alpha=0.3,
+ hand_fg_colour=0x7A5ADA, hand_fg_alpha=0,
+ txt_radius=20,
+ txt_weight=0, txt_size=10.0,
+ txt_fg_colour=0x7A5ADA, txt_fg_alpha=1.0,
+ graduation_radius=28,
+ graduation_thickness=0, graduation_mark_thickness=1,
+ graduation_unit_angle=27,
+ graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
+ caption='Up',
+ caption_weight=1, caption_size=12.0,
+ caption_fg_colour=0xFFFFFF, caption_fg_alpha=0.5,
+},
+}
+
+-- converts color in hexa to decimal
+function rgb_to_r_g_b(colour, alpha)
+ return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
+end
+
+-- convert degree to rad and rotate (0 degree is top/north)
+function angle_to_position(start_angle, current_angle)
+ local pos = current_angle + start_angle
+ return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
+end
+
+
+-- displays gauges
+function draw_gauge_ring(display, data, value)
+ local max_value = data['max_value']
+ local x, y = data['x'], data['y']
+ local graph_radius = data['graph_radius']
+ local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
+ local graph_start_angle = data['graph_start_angle']
+ local graph_unit_angle = data['graph_unit_angle']
+ local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
+ local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
+ local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
+ local graph_end_angle = (max_value * graph_unit_angle) % 360
+
+ -- background ring
+ cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
+ cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
+ cairo_set_line_width(display, graph_thickness)
+ cairo_stroke(display)
+
+ -- arc of value
+ local val = value % (max_value + 1)
+ local start_arc = 0
+ local stop_arc = 0
+ local i = 1
+ while i <= val do
+ start_arc = (graph_unit_angle * i) - graph_unit_thickness
+ stop_arc = (graph_unit_angle * i)
+ cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
+ cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
+ cairo_stroke(display)
+ i = i + 1
+ end
+ local angle = start_arc
+
+ -- hand
+ start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
+ stop_arc = (graph_unit_angle * val)
+ cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
+ cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
+ cairo_stroke(display)
+
+ -- graduations marks
+ local graduation_radius = data['graduation_radius']
+ local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
+ local graduation_unit_angle = data['graduation_unit_angle']
+ local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
+ if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
+ local nb_graduation = graph_end_angle / graduation_unit_angle
+ local i = 0
+ while i < nb_graduation do
+ cairo_set_line_width(display, graduation_thickness)
+ start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
+ stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
+ cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
+ cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
+ cairo_stroke(display)
+ cairo_set_line_width(display, graph_thickness)
+ i = i + 1
+ end
+ end
+
+ -- text
+ local txt_radius = data['txt_radius']
+ local txt_weight, txt_size = data['txt_weight'], data['txt_size']
+ local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
+ local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
+ local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
+ cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
+ cairo_set_font_size (display, txt_size)
+ cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
+ if txt_radius > 0 then
+ cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
+ cairo_show_text (display, value)
+ cairo_stroke (display)
+ end
+
+ -- caption
+ local caption = data['caption']
+ local caption_weight, caption_size = data['caption_weight'], data['caption_size']
+ local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
+ local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
+ local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
+ cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
+ cairo_set_font_size (display, caption_size)
+ cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
+ cairo_move_to (display, x + tox + 5, y + toy + 5)
+ -- bad hack but not enough time !
+ if graph_start_angle < 105 then
+ cairo_move_to (display, x + tox - 30, y + toy + 1)
+ end
+ cairo_show_text (display, caption)
+ cairo_stroke (display)
+end
+
+
+-- loads data and displays gauges
+function go_gauge_rings(display)
+ local function load_gauge_rings(display, data)
+ local str, value = '', 0
+ str = string.format('${%s %s}',data['name'], data['arg'])
+ str = conky_parse(str)
+ value = tonumber(str)
+ draw_gauge_ring(display, data, value)
+ end
+
+ for i in pairs(gauge) do
+ load_gauge_rings(display, gauge[i])
+ end
+end
+
+-------------------------------------------------------------------------------
+-- MAIN
+function conky_main()
+ if conky_window == nil then
+ return
+ end
+
+ local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
+ local display = cairo_create(cs)
+
+ local updates = conky_parse('${updates}')
+ update_num = tonumber(updates)
+
+ if update_num > 5 then
+ go_gauge_rings(display)
+ end
+
+ cairo_surface_destroy(cs)
+ cairo_destroy(display)
+
+end
+
diff --git a/.config/awesome/freedesktop/LICENSE b/.config/awesome/freedesktop/LICENSE
new file mode 100644
index 0000000..23cb790
--- /dev/null
+++ b/.config/awesome/freedesktop/LICENSE
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {description}
+ Copyright (C) {year} {fullname}
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ {signature of Ty Coon}, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/.config/awesome/freedesktop/README.rst b/.config/awesome/freedesktop/README.rst
new file mode 100644
index 0000000..7a2eef6
--- /dev/null
+++ b/.config/awesome/freedesktop/README.rst
@@ -0,0 +1,52 @@
+Awesome-Freedesktop
+===================
+
+-------------------------------------------------------------------
+Freedesktop.org menu and desktop icons support for Awesome WM 4.x
+-------------------------------------------------------------------
+
+:Original author: Antonio Terceiro
+:Maintainer: Luke Bonham
+:Version: git
+:License: GNU-GPL2_
+:Source: https://github.com/copycat-killer/awesome-freedesktop
+
+Description
+-----------
+
+This is a port of awesome-freedesktop_ to Awesome_ 4.x.
+
+See branches_ for previous versions.
+
+Since the introduction of Menubar_ as core library for providing Freedesktop.org menu functionalities in Awesome,
+we can now avoid all the dirty work by just exploiting ``menubar.utils`` functions.
+
+At the initial status of this port, the menu is pretty much complete, while the desktop icons are very basic,
+so the long term objective will be to complete functionalities on this part too.
+
+More specifically, the todo list is:
+
+- A better way to handle desktop icons path
+- Ability to drag and line up icons
+- Event-based signals, in particular:
+ - Updating trash icon according to its status
+ - Dynamic update (no need to restart Awesome to see changes on desktop)
+
+Screenshot
+----------
+
+.. image:: screenshot.png
+ :align: center
+ :alt: Showcase of Freedesktop support in Awesome, using Adwaita icons
+
+Installation and usage
+----------------------
+
+Read the wiki_.
+
+.. _GNU-GPL2: http://www.gnu.org/licenses/gpl-2.0.html
+.. _awesome-freedesktop: https://github.com/terceiro/awesome-freedesktop
+.. _Awesome: https://github.com/awesomeWM/awesome
+.. _branches: https://github.com/copycat-killer/awesome-freedesktop/branches
+.. _Menubar: https://github.com/awesomeWM/awesome/tree/master/lib/menubar
+.. _wiki: https://github.com/copycat-killer/awesome-freedesktop/wiki
diff --git a/.config/awesome/freedesktop/awesome-freedesktop-scm-1.rockspec b/.config/awesome/freedesktop/awesome-freedesktop-git.rockspec
old mode 100755
new mode 100644
similarity index 66%
rename from .config/awesome/freedesktop/awesome-freedesktop-scm-1.rockspec
rename to .config/awesome/freedesktop/awesome-freedesktop-git.rockspec
index 36cab17..36264f2
--- a/.config/awesome/freedesktop/awesome-freedesktop-scm-1.rockspec
+++ b/.config/awesome/freedesktop/awesome-freedesktop-git.rockspec
@@ -1,12 +1,12 @@
package = "awesome-freedesktop"
-version = "scm-1"
+version = "git"
source = {
- url = "https://github.com/lcpz/awesome-freedesktop",
- tag = "scm-1`"
+ url = "https://github.com/copycat-killer/awesome-freedesktop",
+ tag = "git"
}
description = {
summary = "Freedesktop.org menu and desktop icons support for Awesome WM",
- homepage = "https://github.com/lcpz/awesome-freedesktop",
+ homepage = "https://github.com/copycat-killer/awesome-freedesktop",
license = "GPL v2"
}
dependencies = {
diff --git a/.config/awesome/freedesktop/desktop.lua b/.config/awesome/freedesktop/desktop.lua
old mode 100755
new mode 100644
index 748debd..cf6139b
--- a/.config/awesome/freedesktop/desktop.lua
+++ b/.config/awesome/freedesktop/desktop.lua
@@ -1,14 +1,15 @@
+
--[[
-
- Awesome-Freedesktop
- Freedesktop.org compliant desktop entries and menu
-
- Desktop section
-
- Licensed under GNU General Public License v2
- * (c) 2016, Luke Bonham
- * (c) 2009-2015, Antonio Terceiro
-
+
+ Awesome-Freedesktop
+ Freedesktop.org compliant desktop entries and menu
+
+ Desktop section
+
+ Licensed under GNU General Public License v2
+ * (c) 2016, Luke Bonham
+ * (c) 2009-2015, Antonio Terceiro
+
--]]
local awful = require("awful")
@@ -16,12 +17,12 @@ local theme = require("beautiful")
local utils = require("menubar.utils")
local wibox = require("wibox")
-local capi = capi
+local capi = { screen = screen }
local io = io
local ipairs = ipairs
local mouse = mouse
local os = os
-local string = string
+local string = { format = string.format }
local table = table
-- Desktop icons
@@ -140,7 +141,7 @@ end
function desktop.add_base_icons(args)
for _,base in ipairs(args.baseicons) do
desktop.add_single_icon(args, base.label, utils.lookup_icon(base.icon), function()
- awful.spawn(string.format("%s '%s'", args.open_with, base.onclick))
+ awful.spawn(string.format("%s '%s'", args.open_width, base.onclick))
end)
end
end
diff --git a/.config/awesome/freedesktop/init.lua b/.config/awesome/freedesktop/init.lua
old mode 100755
new mode 100644
index 9350b44..cb0548f
--- a/.config/awesome/freedesktop/init.lua
+++ b/.config/awesome/freedesktop/init.lua
@@ -1,12 +1,13 @@
+
--[[
-
- Awesome-Freedesktop
- Freedesktop.org compliant desktop entries and menu
-
- Licensed under GNU General Public License v2
- * (c) 2016, Luke Bonham
- * (c) 2009-2015, Antonio Terceiro
-
+
+ Awesome-Freedesktop
+ Freedesktop.org compliant desktop entries and menu
+
+ Licensed under GNU General Public License v2
+ * (c) 2016, Luke Bonham
+ * (c) 2009-2015, Antonio Terceiro
+
--]]
return {
diff --git a/.config/awesome/freedesktop/menu.lua b/.config/awesome/freedesktop/menu.lua
old mode 100755
new mode 100644
index d2171d0..591fd74
--- a/.config/awesome/freedesktop/menu.lua
+++ b/.config/awesome/freedesktop/menu.lua
@@ -1,23 +1,30 @@
+
--[[
-
- Awesome-Freedesktop
- Freedesktop.org compliant desktop entries and menu
-
- Menu section
-
- Licensed under GNU General Public License v2
- * (c) 2016, Luke Bonham
- * (c) 2014, Harvey Mittens
-
+
+ Awesome-Freedesktop
+ Freedesktop.org compliant desktop entries and menu
+
+ Menu section
+
+ Licensed under GNU General Public License v2
+ * (c) 2016, Luke Bonham
+ * (c) 2014, Harvey Mittens
+
--]]
local awful_menu = require("awful.menu")
local menu_gen = require("menubar.menu_gen")
local menu_utils = require("menubar.utils")
local icon_theme = require("menubar.icon_theme")
-local gls = require("gears.filesystem")
-local pairs, string, table, os = pairs, string, table, os
+local os = { execute = os.execute,
+ getenv = os.getenv }
+local pairs = pairs
+local string = { byte = string.byte,
+ format = string.format }
+local table = { insert = table.insert,
+ remove = table.remove,
+ sort = table.sort }
-- Add support for NixOS systems too
table.insert(menu_gen.all_menu_dirs, string.format("%s/.nix-profile/share/applications", os.getenv("HOME")))
@@ -25,7 +32,7 @@ table.insert(menu_gen.all_menu_dirs, string.format("%s/.nix-profile/share/applic
-- Remove non existent paths in order to avoid issues
local existent_paths = {}
for k,v in pairs(menu_gen.all_menu_dirs) do
- if gls.is_dir(v) then
+ if os.execute(string.format("ls %s &> /dev/null", v)) then
table.insert(existent_paths, v)
end
end
@@ -42,8 +49,8 @@ local menu = {}
-- @param tab a given table
-- @param val the element to search for
-- @return true if the given string is found within the search table; otherwise, false if not
-function menu.has_value (tab, val)
- for index, value in pairs(tab) do
+local function has_value (tab, val)
+ for index, value in ipairs(tab) do
if val:find(value) then
return true
end
@@ -59,7 +66,6 @@ function menu.build(args)
local before = args.before or {}
local after = args.after or {}
local skip_items = args.skip_items or {}
- local sub_menu = args.sub_menu or false
local result = {}
local _menu = awful_menu({ items = before })
@@ -74,7 +80,7 @@ function menu.build(args)
for k, v in pairs(entries) do
for _, cat in pairs(result) do
if cat[1] == v.category then
- if not menu.has_value(skip_items, v.name) then
+ if not has_value(skip_items, v.name) then
table.insert(cat[2], { v.name, v.cmdline, v.icon })
end
break
@@ -99,11 +105,6 @@ function menu.build(args)
-- Sort categories alphabetically also
table.sort(result, function(a, b) return string.byte(a[1]) < string.byte(b[1]) end)
- -- Add menu item to hold the generated menu
- if sub_menu then
- result = {{sub_menu, result}}
- end
-
-- Add items to menu
for _, v in pairs(result) do _menu:add(v) end
for _, v in pairs(after) do _menu:add(v) end
@@ -116,9 +117,6 @@ function menu.build(args)
end
end
- -- Hold the menu in the module
- menu.menu = _menu
-
return _menu
end
diff --git a/.config/awesome/freedesktop/screenshot.png b/.config/awesome/freedesktop/screenshot.png
new file mode 100644
index 0000000..2cf88e5
Binary files /dev/null and b/.config/awesome/freedesktop/screenshot.png differ
diff --git a/.config/awesome/lain/ISSUE_TEMPLATE.md b/.config/awesome/lain/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..37c2141
--- /dev/null
+++ b/.config/awesome/lain/ISSUE_TEMPLATE.md
@@ -0,0 +1,21 @@
+# If you have a question
+
+Take the following steps:
+
+1. [Google it](https://encrypted.google.com)
+2. Search [Awesome doc](https://awesomewm.org/doc)
+3. Ask [community](https://awesomewm.org/community)
+
+and, if you still don't have an answer, you can ask here.
+
+**Please be warned:** if your question is __unrelated__ to this repository, a reply is only an act of kindness.
+
+# If you have an issue
+
+**Please read the [wiki](https://github.com/copycat-killer/lain/wiki) and search the [Issues section](https://github.com/copycat-killer/lain/issues) first.**
+
+If you can't find a solution there, then go ahead and provide:
+
+* output of `awesome -v` and `lua -v`
+* expected behavior and actual behavior
+* steps to reproduce the problem
diff --git a/.config/awesome/lain/LICENSE b/.config/awesome/lain/LICENSE
new file mode 100644
index 0000000..23cb790
--- /dev/null
+++ b/.config/awesome/lain/LICENSE
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {description}
+ Copyright (C) {year} {fullname}
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ {signature of Ty Coon}, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/.config/awesome/lain/README.rst b/.config/awesome/lain/README.rst
new file mode 100644
index 0000000..9ba9715
--- /dev/null
+++ b/.config/awesome/lain/README.rst
@@ -0,0 +1,39 @@
+Lain
+====
+
+-------------------------------------------------
+Layouts, widgets and utilities for Awesome WM 4.x
+-------------------------------------------------
+
+:Author: Luke Bonham
+:Version: git
+:License: GNU-GPL2_
+:Source: https://github.com/copycat-killer/lain
+
+Description
+-----------
+
+Successor of awesome-vain_, this module provides alternative layouts, asynchronous widgets and utility functions for Awesome_ WM. Read the wiki_ for all the info.
+
+Contributions
+-------------
+
+Constructive criticism and suggestions are welcome.
+
+If you want to create a pull request, make sure that:
+
+- Your code fits with the general style of the module. In particular, you should use the same indentation pattern that the code uses, and also avoid adding space at the ends of lines.
+
+- Your code its easy to understand, maintainable, and modularized. You should also avoid code duplication wherever possible by adding functions to or using lain.helpers_. If something is unclear, or you can't write it in such a way that it will be clear, explain it with a comment.
+
+- You test your changes before submitting to make sure that you code works and does not break other parts of the module.
+
+- You eventually update ``wiki`` submodule with a thorough section.
+
+Contributed widgets have to be put in ``widget/contrib``.
+
+.. _GNU-GPL2: http://www.gnu.org/licenses/gpl-2.0.html
+.. _awesome-vain: https://github.com/vain/awesome-vain
+.. _Awesome: https://github.com/awesomeWM/awesome
+.. _wiki: https://github.com/copycat-killer/lain/wiki
+.. _lain.helpers: https://github.com/copycat-killer/lain/blob/master/helpers.lua
diff --git a/.config/awesome/lain/helpers.lua b/.config/awesome/lain/helpers.lua
old mode 100755
new mode 100644
index 4d75f7b..7fa8564
--- a/.config/awesome/lain/helpers.lua
+++ b/.config/awesome/lain/helpers.lua
@@ -1,16 +1,15 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
--]]
-local spawn = require("awful.spawn")
+local easy_async = require("awful.spawn").easy_async
local timer = require("gears.timer")
local debug = require("debug")
local io = { lines = io.lines,
open = io.open }
-local pairs = pairs
local rawget = rawget
local table = { sort = table.sort }
@@ -33,49 +32,53 @@ end
-- {{{ File operations
--- check if the file exists and is readable
-function helpers.file_exists(path)
- local file = io.open(path, "rb")
- if file then file:close() end
- return file ~= nil
+-- see if the file exists and is readable
+function helpers.file_exists(file)
+ local f = io.open(file)
+ if f then
+ local s = f:read()
+ f:close()
+ f = s
+ end
+ return f ~= nil
end
--- get a table with all lines from a file
-function helpers.lines_from(path)
- local lines = {}
- for line in io.lines(path) do
- lines[#lines + 1] = line
- end
- return lines
+-- get all lines from a file, returns an empty
+-- list/table if the file does not exist
+function helpers.lines_from(file)
+ if not helpers.file_exists(file) then return {} end
+ local lines = {}
+ for line in io.lines(file) do
+ lines[#lines + 1] = line
+ end
+ return lines
end
--- get a table with all lines from a file matching regexp
-function helpers.lines_match(regexp, path)
- local lines = {}
- for line in io.lines(path) do
- if string.match(line, regexp) then
- lines[#lines + 1] = line
- end
- end
- return lines
+-- match all lines from a file, returns an empty
+-- list/table if the file or match does not exist
+function helpers.lines_match(regexp, file)
+ local lines = {}
+ for index,line in pairs(helpers.lines_from(file)) do
+ if string.match(line, regexp) then
+ lines[index] = line
+ end
+ end
+ return lines
end
--- get first line of a file
-function helpers.first_line(path)
- local file, first = io.open(path, "rb"), nil
- if file then
- first = file:read("*l")
- file:close()
- end
- return first
+-- get first line of a file, return nil if
+-- the file does not exist
+function helpers.first_line(file)
+ return helpers.lines_from(file)[1]
end
--- get first non empty line from a file
-function helpers.first_nonempty_line(path)
- for line in io.lines(path) do
- if #line then return line end
- end
- return nil
+-- get first non empty line from a file,
+-- returns nil otherwise
+function helpers.first_nonempty_line(file)
+ for k,v in pairs(helpers.lines_from(file)) do
+ if #v then return v end
+ end
+ return nil
end
-- }}}
@@ -107,29 +110,12 @@ end
-- @param callback function to execute on cmd output
-- @return cmd PID
function helpers.async(cmd, callback)
- return spawn.easy_async(cmd,
+ return easy_async(cmd,
function (stdout, stderr, reason, exit_code)
- callback(stdout, exit_code)
+ callback(stdout)
end)
end
--- like above, but call spawn.easy_async with a shell
-function helpers.async_with_shell(cmd, callback)
- return spawn.easy_async_with_shell(cmd,
- function (stdout, stderr, reason, exit_code)
- callback(stdout, exit_code)
- end)
-end
-
--- run a command and execute a function on its output line by line
-function helpers.line_callback(cmd, callback)
- return spawn.with_line_callback(cmd, {
- stdout = function (line)
- callback(line)
- end,
- })
-end
-
-- }}}
-- {{{ A map utility
@@ -176,28 +162,6 @@ function helpers.spairs(t)
end
end
--- create the partition of singletons of a given set
--- example: the trivial partition set of {a, b, c}, is {{a}, {b}, {c}}
-function helpers.trivial_partition_set(set)
- local ss = {}
- for _,e in pairs(set) do
- ss[#ss+1] = {e}
- end
- return ss
-end
-
--- creates the powerset of a given set
-function helpers.powerset(s)
- if not s then return {} end
- local t = {{}}
- for i = 1, #s do
- for j = 1, #t do
- t[#t+1] = {s[i],unpack(t[j])}
- end
- end
- return t
-end
-
-- }}}
return helpers
diff --git a/.config/awesome/lain/icons/cal/black/1.png b/.config/awesome/lain/icons/cal/black/1.png
deleted file mode 100755
index d2fb62e..0000000
Binary files a/.config/awesome/lain/icons/cal/black/1.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/10.png b/.config/awesome/lain/icons/cal/black/10.png
deleted file mode 100755
index 507b079..0000000
Binary files a/.config/awesome/lain/icons/cal/black/10.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/11.png b/.config/awesome/lain/icons/cal/black/11.png
deleted file mode 100755
index 336141b..0000000
Binary files a/.config/awesome/lain/icons/cal/black/11.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/12.png b/.config/awesome/lain/icons/cal/black/12.png
deleted file mode 100755
index c589729..0000000
Binary files a/.config/awesome/lain/icons/cal/black/12.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/13.png b/.config/awesome/lain/icons/cal/black/13.png
deleted file mode 100755
index 377518b..0000000
Binary files a/.config/awesome/lain/icons/cal/black/13.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/14.png b/.config/awesome/lain/icons/cal/black/14.png
deleted file mode 100755
index 6f4a9fe..0000000
Binary files a/.config/awesome/lain/icons/cal/black/14.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/15.png b/.config/awesome/lain/icons/cal/black/15.png
deleted file mode 100755
index 1a271c1..0000000
Binary files a/.config/awesome/lain/icons/cal/black/15.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/16.png b/.config/awesome/lain/icons/cal/black/16.png
deleted file mode 100755
index 5e65835..0000000
Binary files a/.config/awesome/lain/icons/cal/black/16.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/17.png b/.config/awesome/lain/icons/cal/black/17.png
deleted file mode 100755
index f3fa0a9..0000000
Binary files a/.config/awesome/lain/icons/cal/black/17.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/18.png b/.config/awesome/lain/icons/cal/black/18.png
deleted file mode 100755
index 7acb37a..0000000
Binary files a/.config/awesome/lain/icons/cal/black/18.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/19.png b/.config/awesome/lain/icons/cal/black/19.png
deleted file mode 100755
index a557957..0000000
Binary files a/.config/awesome/lain/icons/cal/black/19.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/2.png b/.config/awesome/lain/icons/cal/black/2.png
deleted file mode 100755
index 17b33e0..0000000
Binary files a/.config/awesome/lain/icons/cal/black/2.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/20.png b/.config/awesome/lain/icons/cal/black/20.png
deleted file mode 100755
index 558d111..0000000
Binary files a/.config/awesome/lain/icons/cal/black/20.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/21.png b/.config/awesome/lain/icons/cal/black/21.png
deleted file mode 100755
index 0bbedc8..0000000
Binary files a/.config/awesome/lain/icons/cal/black/21.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/22.png b/.config/awesome/lain/icons/cal/black/22.png
deleted file mode 100755
index 762d262..0000000
Binary files a/.config/awesome/lain/icons/cal/black/22.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/23.png b/.config/awesome/lain/icons/cal/black/23.png
deleted file mode 100755
index a39dcee..0000000
Binary files a/.config/awesome/lain/icons/cal/black/23.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/24.png b/.config/awesome/lain/icons/cal/black/24.png
deleted file mode 100755
index c00dbca..0000000
Binary files a/.config/awesome/lain/icons/cal/black/24.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/25.png b/.config/awesome/lain/icons/cal/black/25.png
deleted file mode 100755
index dc9243c..0000000
Binary files a/.config/awesome/lain/icons/cal/black/25.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/26.png b/.config/awesome/lain/icons/cal/black/26.png
deleted file mode 100755
index 50bb182..0000000
Binary files a/.config/awesome/lain/icons/cal/black/26.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/27.png b/.config/awesome/lain/icons/cal/black/27.png
deleted file mode 100755
index 0fbf9fc..0000000
Binary files a/.config/awesome/lain/icons/cal/black/27.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/28.png b/.config/awesome/lain/icons/cal/black/28.png
deleted file mode 100755
index def6ab2..0000000
Binary files a/.config/awesome/lain/icons/cal/black/28.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/29.png b/.config/awesome/lain/icons/cal/black/29.png
deleted file mode 100755
index 531923c..0000000
Binary files a/.config/awesome/lain/icons/cal/black/29.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/3.png b/.config/awesome/lain/icons/cal/black/3.png
deleted file mode 100755
index 98b552d..0000000
Binary files a/.config/awesome/lain/icons/cal/black/3.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/30.png b/.config/awesome/lain/icons/cal/black/30.png
deleted file mode 100755
index ca58151..0000000
Binary files a/.config/awesome/lain/icons/cal/black/30.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/31.png b/.config/awesome/lain/icons/cal/black/31.png
deleted file mode 100755
index 6e8da21..0000000
Binary files a/.config/awesome/lain/icons/cal/black/31.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/4.png b/.config/awesome/lain/icons/cal/black/4.png
deleted file mode 100755
index 4335979..0000000
Binary files a/.config/awesome/lain/icons/cal/black/4.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/5.png b/.config/awesome/lain/icons/cal/black/5.png
deleted file mode 100755
index 576ec11..0000000
Binary files a/.config/awesome/lain/icons/cal/black/5.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/6.png b/.config/awesome/lain/icons/cal/black/6.png
deleted file mode 100755
index 56fa8ab..0000000
Binary files a/.config/awesome/lain/icons/cal/black/6.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/7.png b/.config/awesome/lain/icons/cal/black/7.png
deleted file mode 100755
index 7c90b3a..0000000
Binary files a/.config/awesome/lain/icons/cal/black/7.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/8.png b/.config/awesome/lain/icons/cal/black/8.png
deleted file mode 100755
index 9d1f28e..0000000
Binary files a/.config/awesome/lain/icons/cal/black/8.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/black/9.png b/.config/awesome/lain/icons/cal/black/9.png
deleted file mode 100755
index 00d0933..0000000
Binary files a/.config/awesome/lain/icons/cal/black/9.png and /dev/null differ
diff --git a/.config/awesome/lain/icons/cal/white/1.png b/.config/awesome/lain/icons/cal/white/1.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/10.png b/.config/awesome/lain/icons/cal/white/10.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/11.png b/.config/awesome/lain/icons/cal/white/11.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/12.png b/.config/awesome/lain/icons/cal/white/12.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/13.png b/.config/awesome/lain/icons/cal/white/13.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/14.png b/.config/awesome/lain/icons/cal/white/14.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/15.png b/.config/awesome/lain/icons/cal/white/15.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/16.png b/.config/awesome/lain/icons/cal/white/16.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/17.png b/.config/awesome/lain/icons/cal/white/17.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/18.png b/.config/awesome/lain/icons/cal/white/18.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/19.png b/.config/awesome/lain/icons/cal/white/19.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/2.png b/.config/awesome/lain/icons/cal/white/2.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/20.png b/.config/awesome/lain/icons/cal/white/20.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/21.png b/.config/awesome/lain/icons/cal/white/21.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/22.png b/.config/awesome/lain/icons/cal/white/22.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/23.png b/.config/awesome/lain/icons/cal/white/23.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/24.png b/.config/awesome/lain/icons/cal/white/24.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/25.png b/.config/awesome/lain/icons/cal/white/25.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/26.png b/.config/awesome/lain/icons/cal/white/26.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/27.png b/.config/awesome/lain/icons/cal/white/27.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/28.png b/.config/awesome/lain/icons/cal/white/28.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/29.png b/.config/awesome/lain/icons/cal/white/29.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/3.png b/.config/awesome/lain/icons/cal/white/3.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/30.png b/.config/awesome/lain/icons/cal/white/30.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/31.png b/.config/awesome/lain/icons/cal/white/31.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/4.png b/.config/awesome/lain/icons/cal/white/4.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/5.png b/.config/awesome/lain/icons/cal/white/5.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/6.png b/.config/awesome/lain/icons/cal/white/6.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/7.png b/.config/awesome/lain/icons/cal/white/7.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/8.png b/.config/awesome/lain/icons/cal/white/8.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/cal/white/9.png b/.config/awesome/lain/icons/cal/white/9.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/cascade.png b/.config/awesome/lain/icons/layout/default/cascade.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/cascadetile.png b/.config/awesome/lain/icons/layout/default/cascadetile.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/cascadetilew.png b/.config/awesome/lain/icons/layout/default/cascadetilew.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/cascadew.png b/.config/awesome/lain/icons/layout/default/cascadew.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/centerfair.png b/.config/awesome/lain/icons/layout/default/centerfair.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/centerfairw.png b/.config/awesome/lain/icons/layout/default/centerfairw.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/centerwork.png b/.config/awesome/lain/icons/layout/default/centerwork.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/centerworkh.png b/.config/awesome/lain/icons/layout/default/centerworkh.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/centerworkhw.png b/.config/awesome/lain/icons/layout/default/centerworkhw.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/centerworkw.png b/.config/awesome/lain/icons/layout/default/centerworkw.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/termfair.png b/.config/awesome/lain/icons/layout/default/termfair.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/default/termfairw.png b/.config/awesome/lain/icons/layout/default/termfairw.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/zenburn/cascade.png b/.config/awesome/lain/icons/layout/zenburn/cascade.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/zenburn/cascadetile.png b/.config/awesome/lain/icons/layout/zenburn/cascadetile.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/zenburn/centerfair.png b/.config/awesome/lain/icons/layout/zenburn/centerfair.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/zenburn/centerwork.png b/.config/awesome/lain/icons/layout/zenburn/centerwork.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/zenburn/centerworkh.png b/.config/awesome/lain/icons/layout/zenburn/centerworkh.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/layout/zenburn/termfair.png b/.config/awesome/lain/icons/layout/zenburn/termfair.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/mail.png b/.config/awesome/lain/icons/mail.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/no_net.png b/.config/awesome/lain/icons/no_net.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/01d.png b/.config/awesome/lain/icons/openweathermap/01d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/01n.png b/.config/awesome/lain/icons/openweathermap/01n.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/02d.png b/.config/awesome/lain/icons/openweathermap/02d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/02n.png b/.config/awesome/lain/icons/openweathermap/02n.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/03d.png b/.config/awesome/lain/icons/openweathermap/03d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/03n.png b/.config/awesome/lain/icons/openweathermap/03n.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/04d.png b/.config/awesome/lain/icons/openweathermap/04d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/09d.png b/.config/awesome/lain/icons/openweathermap/09d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/10d.png b/.config/awesome/lain/icons/openweathermap/10d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/11d.png b/.config/awesome/lain/icons/openweathermap/11d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/13d.png b/.config/awesome/lain/icons/openweathermap/13d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/50d.png b/.config/awesome/lain/icons/openweathermap/50d.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/README.md b/.config/awesome/lain/icons/openweathermap/README.md
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/openweathermap/na.png b/.config/awesome/lain/icons/openweathermap/na.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/icons/taskwarrior.png b/.config/awesome/lain/icons/taskwarrior.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/init.lua b/.config/awesome/lain/init.lua
old mode 100755
new mode 100644
index b59d5dd..46c7659
--- a/.config/awesome/lain/init.lua
+++ b/.config/awesome/lain/init.lua
@@ -4,7 +4,7 @@
Layouts, widgets and utilities for Awesome WM
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
--]]
diff --git a/.config/awesome/lain/lain-scm-1.rockspec b/.config/awesome/lain/lain-git.rockspec
old mode 100755
new mode 100644
similarity index 62%
rename from .config/awesome/lain/lain-scm-1.rockspec
rename to .config/awesome/lain/lain-git.rockspec
index fb1eaaf..1b42903
--- a/.config/awesome/lain/lain-scm-1.rockspec
+++ b/.config/awesome/lain/lain-git.rockspec
@@ -1,23 +1,22 @@
package = "lain"
-version = "scm-1"
+version = "git"
source = {
- url = "https://github.com/lcpz/lain",
- tag = "scm-1`"
+ url = "https://github.com/copycat-killer/lain",
+ tag = "git"
}
description = {
summary = "Layout, widgets and utilities for Awesome WM",
detailed = [[
Successor of awesome-vain, this module provides alternative layouts, asynchronous widgets and utility functions for Awesome WM.
- Dependencies: curl (for IMAP, MPD and weather widgets); Glib >= 2.54 (for filesystems widget).
+ Optional dependency: curl (for IMAP, MPD and weather widgets).
]],
- homepage = "https://github.com/lcpz/lain",
- license = "GPL-2.0"
+ homepage = "https://github.com/copycat-killer/lain",
+ license = "GPL v2"
}
dependencies = {
"lua >= 5.1",
"awesome >= 4.0",
- "Glib >= 2.54",
"curl"
}
supported_platforms = { "linux" }
diff --git a/.config/awesome/lain/layout/cascade.lua b/.config/awesome/lain/layout/cascade.lua
old mode 100755
new mode 100644
index cbc3877..f7dffb9
--- a/.config/awesome/lain/layout/cascade.lua
+++ b/.config/awesome/lain/layout/cascade.lua
@@ -2,7 +2,7 @@
Licensed under GNU General Public License v2
* (c) 2014, projektile
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
diff --git a/.config/awesome/lain/layout/centerwork.lua b/.config/awesome/lain/layout/centerwork.lua
old mode 100755
new mode 100644
index 2b38a69..aff2771
--- a/.config/awesome/lain/layout/centerwork.lua
+++ b/.config/awesome/lain/layout/centerwork.lua
@@ -1,32 +1,33 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2018, Eugene Pakhomov
* (c) 2016, Henrik Antonsson
* (c) 2015, Joerg Jaspert
* (c) 2014, projektile
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
-local floor, max, mouse, mousegrabber, screen = math.floor, math.max, mouse, mousegrabber, screen
+local floor = math.floor
+local screen = screen
local centerwork = {
- name = "centerwork",
- horizontal = { name = "centerworkh" }
+ name = "centerwork",
+ horizontal = { name = "centerworkh" }
}
-local function arrange(p, layout)
- local t = p.tag or screen[p.screen].selected_tag
- local wa = p.workarea
+local function do_centerwork(p, orientation)
+ local t = p.tag or screen[p.screen].selected_tag
+ local wa = p.workarea
local cls = p.clients
if #cls == 0 then return end
- local c, g = cls[1], {}
+ local c = cls[1]
+ local g = {}
- -- Main column, fixed width and height
+ -- Main column, fixed width and height.
local mwfact = t.master_width_factor
local mainhei = floor(wa.height * mwfact)
local mainwid = floor(wa.width * mwfact)
@@ -41,7 +42,7 @@ local function arrange(p, layout)
local slaveFirstDim, slaveSecondDim = 0, 0
- if layout.name == "centerwork" then -- vertical
+ if orientation == "vertical" then
if nbrFirstSlaves > 0 then slaveFirstDim = floor(wa.height / nbrFirstSlaves) end
if nbrSecondSlaves > 0 then slaveSecondDim = floor(wa.height / nbrSecondSlaves) end
@@ -50,7 +51,7 @@ local function arrange(p, layout)
g.x = wa.x + slaveLwid
g.y = wa.y
- else -- horizontal
+ else
if nbrFirstSlaves > 0 then slaveFirstDim = floor(wa.width / nbrFirstSlaves) end
if nbrSecondSlaves > 0 then slaveSecondDim = floor(wa.width / nbrSecondSlaves) end
@@ -61,134 +62,92 @@ local function arrange(p, layout)
g.y = wa.y + slaveThei
end
- g.width = max(g.width, 1)
- g.height = max(g.height, 1)
+ if g.width < 1 then g.width = 1 end
+ if g.height < 1 then g.height = 1 end
p.geometries[c] = g
- -- Auxiliary clients
+ -- Auxiliary windows.
if #cls <= 1 then return end
- for i = 2, #cls do
- local c, g = cls[i], {}
- local idxChecker, dimToAssign
+ for i = 2,#cls do
+ local c = cls[i]
+ local g = {}
local rowIndex = floor(i/2)
- if layout.name == "centerwork" then
- if i % 2 == 0 then -- left slave
- g.x = wa.x
- g.y = wa.y + (rowIndex - 1) * slaveFirstDim
+ if orientation == "vertical" then
+ if i % 2 == 0 then
+ -- left slave
+ g.x = wa.x
+ g.y = wa.y + (rowIndex-1)*slaveFirstDim
+
g.width = slaveLwid
- idxChecker, dimToAssign = nbrFirstSlaves, slaveFirstDim
- else -- right slave
- g.x = wa.x + slaveLwid + mainwid
- g.y = wa.y + (rowIndex - 1) * slaveSecondDim
+ -- if last slave in left row use remaining space for that slave
+ if rowIndex == nbrFirstSlaves then
+ g.height = wa.y + wa.height - g.y
+ else
+ g.height = slaveFirstDim
+ end
+ else
+ -- right slave
+ g.x = wa.x + slaveLwid + mainwid
+ g.y = wa.y + (rowIndex-1)*slaveSecondDim
+
g.width = slaveRwid
- idxChecker, dimToAssign = nbrSecondSlaves, slaveSecondDim
- end
-
- -- if last slave in row, use remaining space for it
- if rowIndex == idxChecker then
- g.height = wa.y + wa.height - g.y
- else
- g.height = dimToAssign
+ -- if last slave in right row use remaining space for that slave
+ if rowIndex == nbrSecondSlaves then
+ g.height = wa.y + wa.height - g.y
+ else
+ g.height = slaveSecondDim
+ end
end
else
- if i % 2 == 0 then -- top slave
- g.x = wa.x + (rowIndex - 1) * slaveFirstDim
- g.y = wa.y
+ if i % 2 == 0 then
+ -- top slave
+ g.x = wa.x + (rowIndex-1)*slaveFirstDim
+ g.y = wa.y
+
g.height = slaveThei
- idxChecker, dimToAssign = nbrFirstSlaves, slaveFirstDim
- else -- bottom slave
- g.x = wa.x + (rowIndex - 1) * slaveSecondDim
- g.y = wa.y + slaveThei + mainhei
+ -- if last slave in top row use remaining space for that slave
+ if rowIndex == nbrFirstSlaves then
+ g.width = wa.x + wa.width - g.x
+ else
+ g.width = slaveFirstDim
+ end
+ else
+ -- bottom slave
+ g.x = wa.x + (rowIndex-1)*slaveSecondDim
+ g.y = wa.y + slaveThei + mainhei
+
g.height = slaveBhei
- idxChecker, dimToAssign = nbrSecondSlaves, slaveSecondDim
- end
+ -- if last slave in bottom row use remaining space for that slave
+ if rowIndex == nbrSecondSlaves then
+ g.width = wa.x + wa.width - g.x
+ else
+ g.width = slaveSecondDim
+ end
- -- if last slave in row, use remaining space for it
- if rowIndex == idxChecker then
- g.width = wa.x + wa.width - g.x
- else
- g.width = dimToAssign
end
end
- g.width = max(g.width, 1)
- g.height = max(g.height, 1)
+ if g.width < 1 then g.width = 1 end
+ if g.height < 1 then g.height = 1 end
p.geometries[c] = g
end
end
-local function mouse_resize_handler(c, corner, x, y, orientation)
- local wa = c.screen.workarea
- local mwfact = c.screen.selected_tag.master_width_factor
- local g = c:geometry()
- local offset = 0
- local cursor = "cross"
- local corner_coords
-
- if orientation == 'vertical' then
- if g.height + 15 >= wa.height then
- offset = g.height * .5
- cursor = "sb_h_double_arrow"
- elseif not (g.y + g.height + 15 > wa.y + wa.height) then
- offset = g.height
- end
- corner_coords = { x = wa.x + wa.width * (1 - mwfact) / 2, y = g.y + offset }
- else
- if g.width + 15 >= wa.width then
- offset = g.width * .5
- cursor = "sb_v_double_arrow"
- elseif not (g.x + g.width + 15 > wa.x + wa.width) then
- offset = g.width
- end
- corner_coords = { y = wa.y + wa.height * (1 - mwfact) / 2, x = g.x + offset }
- end
-
- mouse.coords(corner_coords)
-
- local prev_coords = {}
-
- mousegrabber.run(function(_mouse)
- if not c.valid then return false end
- for _, v in ipairs(_mouse.buttons) do
- if v then
- prev_coords = { x = _mouse.x, y = _mouse.y }
- local new_mwfact
- if orientation == 'vertical' then
- new_mwfact = 1 - (_mouse.x - wa.x) / wa.width * 2
- else
- new_mwfact = 1 - (_mouse.y - wa.y) / wa.height * 2
- end
- c.screen.selected_tag.master_width_factor = math.min(math.max(new_mwfact, 0.01), 0.99)
- return true
- end
- end
- return prev_coords.x == _mouse.x and prev_coords.y == _mouse.y
- end, cursor)
+function centerwork.horizontal.arrange(p)
+ return do_centerwork(p, "horizontal")
end
function centerwork.arrange(p)
- return arrange(p, centerwork)
-end
-
-function centerwork.horizontal.arrange(p)
- return arrange(p, centerwork.horizontal)
-end
-
-function centerwork.mouse_resize_handler(c, corner, x, y)
- return mouse_resize_handler(c, corner, x, y, 'vertical')
-end
-
-function centerwork.horizontal.mouse_resize_handler(c, corner, x, y)
- return mouse_resize_handler(c, corner, x, y, 'horizontal')
+ return do_centerwork(p, "vertical")
end
return centerwork
diff --git a/.config/awesome/lain/layout/init.lua b/.config/awesome/lain/layout/init.lua
old mode 100755
new mode 100644
index 6478b06..b311f45
--- a/.config/awesome/lain/layout/init.lua
+++ b/.config/awesome/lain/layout/init.lua
@@ -6,7 +6,7 @@
Layouts section
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
diff --git a/.config/awesome/lain/layout/termfair.lua b/.config/awesome/lain/layout/termfair.lua
old mode 100755
new mode 100644
index e33894e..60b3c7d
--- a/.config/awesome/lain/layout/termfair.lua
+++ b/.config/awesome/lain/layout/termfair.lua
@@ -2,13 +2,15 @@
Licensed under GNU General Public License v2
* (c) 2014, projektile
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010, Nicolas Estibals
* (c) 2010-2012, Peter Hofmann
--]]
-local math = math
+local math = { ceil = math.ceil,
+ floor = math.floor,
+ max = math.max }
local screen = screen
local tonumber = tonumber
diff --git a/.config/awesome/lain/scripts/dfs b/.config/awesome/lain/scripts/dfs
new file mode 100755
index 0000000..47c7b82
--- /dev/null
+++ b/.config/awesome/lain/scripts/dfs
@@ -0,0 +1,397 @@
+#!/usr/bin/env bash
+#
+# Adapted from Eridan's "fs" (cleanup, enhancements and switch to bash/Linux)
+# JM, 10/12/2004
+#
+# Integrated into Lain in september 2013
+# https://github.com/copycat-killer/lain
+
+# Requires gawk
+
+# -------------------------------------------------------------------------
+# Decoding options
+# -------------------------------------------------------------------------
+USAGE="Usage: $0 [-h(elp)] | [-n(arrow mode)] | [-w(eb output) | --type= | --exclude-type=]"
+
+NARROW_MODE=0
+WEB_OUTPUT=0
+DF_OPTIONS=""
+
+while [ $# -gt 0 ]; do
+case "$1" in
+"-h" )
+echo $USAGE
+exit
+;;
+"-d" )
+DEBUG=1
+;;
+"-n" )
+NARROW_MODE=1
+;;
+"-w" )
+WEB_OUTPUT=1
+;;
+--type=*)
+DF_OPTIONS+=" $1"
+;;
+--exclude-type=*)
+DF_OPTIONS+=" $1"
+;;
+* )
+echo $USAGE
+exit
+;;
+esac
+shift
+done
+
+# -------------------------------------------------------------------------
+# Preparations
+# -------------------------------------------------------------------------
+SYSTEM=`uname -s`
+PATTERN="/"
+
+case "$SYSTEM" in
+"Linux" )
+DF_COMMAND="/usr/bin/env df -k"
+SORT_COMMAND="/usr/bin/env sort -k6"
+AWK_COMMAND="/usr/bin/env awk"
+;;
+* )
+DF_COMMAND="/bin/df -k"
+SORT_COMMAND="/usr/bin/sort -k6"
+AWK_COMMAND="/usr/bin/env gawk"
+;;
+esac
+
+# Add additional df options
+DF_COMMAND+=$DF_OPTIONS
+
+# -------------------------------------------------------------------------
+# Grabbing "df" result
+# -------------------------------------------------------------------------
+DF_RESULT=`$DF_COMMAND`
+if [ ! -z $DEBUG ]; then
+echo "--> DF_RESULT:"
+echo "$DF_RESULT"
+echo ""
+fi
+
+# -------------------------------------------------------------------------
+# Preprocessing "df" result, to join split logical lines
+# -------------------------------------------------------------------------
+PREPROCESSING_RESULT=` \
+ echo "$DF_RESULT" | $AWK_COMMAND -v PATTERN=$PATTERN \
+ '
+ NF == 1 {
+ printf ("%s", $0)
+ }
+
+NF == 5 {
+ printf ("%s\n", $0)
+}
+
+NF > 6 {
+}
+
+NF == 6 {
+ printf ("%s\n", $0)
+}'
+`
+if [ ! -z $DEBUG ]; then
+echo "--> PREPROCESSING_RESULT:"
+echo "$PREPROCESSING_RESULT"
+echo ""
+fi
+
+SORTED_FILE_SYSTEMS_INFO=`echo "$PREPROCESSING_RESULT" | $SORT_COMMAND`
+
+if [ ! -z $DEBUG ]; then
+echo "--> SORTED_FILE_SYSTEMS_INFO:"
+echo "$SORTED_FILE_SYSTEMS_INFO"
+echo ""
+fi
+
+# -------------------------------------------------------------------------
+# Computing mount point max length
+# -------------------------------------------------------------------------
+MOUNT_POINT_MAX_LENGTH=` \
+ echo "$SORTED_FILE_SYSTEMS_INFO" | $AWK_COMMAND -v PATTERN=$PATTERN \
+ '
+ BEGIN {
+ mount_point_length_max = 15;
+ }
+
+END {
+ printf ("%d", mount_point_length_max);
+}
+
+$0 ~ PATTERN {
+# printf ("$6 = %s\n", $6);
+
+ mount_point = $6;
+# printf ("mount_point = %s\n", mount_point);
+
+ mount_point_length = length (mount_point);
+# printf ("mount_point_length = %d\n", mount_point_length);
+
+ if (mount_point_length > mount_point_length_max)
+ mount_point_length_max = mount_point_length;
+}'
+`
+if [ ! -z $DEBUG ]; then
+echo "MOUNT_POINT_MAX_LENGTH: $MOUNT_POINT_MAX_LENGTH"
+fi
+
+# -------------------------------------------------------------------------
+# Computing mount point data max size
+# -------------------------------------------------------------------------
+MOUNT_POINT_MAX_SIZE=` \
+ echo "$SORTED_FILE_SYSTEMS_INFO" | $AWK_COMMAND -v PATTERN=$PATTERN \
+ '
+ BEGIN {
+ mount_point_size_max = 0;
+ }
+
+END {
+ printf ("%d", mount_point_size_max);
+}
+
+$0 ~ PATTERN {
+# df -k shows k_bytes!
+# printf ("$2 = %s\n", $2);
+
+ mount_point_size = $2 * 1024;
+# printf ("mount_point_size = %d\n", mount_point_size);
+
+ if (mount_point_size > mount_point_size_max)
+ mount_point_size_max = mount_point_size;
+}'
+`
+if [ ! -z $DEBUG ]; then
+echo "MOUNT_POINT_MAX_SIZE: $MOUNT_POINT_MAX_SIZE"
+fi
+
+# -------------------------------------------------------------------------
+# Let's go!
+# -------------------------------------------------------------------------
+echo "$SORTED_FILE_SYSTEMS_INFO" | $AWK_COMMAND -v DEBUG=$DEBUG -v PATTERN=$PATTERN -v NARROW_MODE=$NARROW_MODE -v LEFT_COLUMN=$MOUNT_POINT_MAX_LENGTH -v MAX_SIZE=$MOUNT_POINT_MAX_SIZE -v SCALE=$SCALE -v WEB_OUTPUT=$WEB_OUTPUT \
+ '
+# {printf ("$0 = %s\n", $0);}
+# {printf ("$1 = %s\n", $1);}
+# {printf ("PATTERN = %s\n", PATTERN);}
+# {printf ("LEFT_COLUMN = %s\n", LEFT_COLUMN);}
+
+ BEGIN {
+ k_bytes = 1024.0;
+ m_bytes = 1024.0 * k_bytes;
+ g_bytes = 1024.0 * m_bytes;
+ t_bytes = 1024.0 * g_bytes;
+
+ if (WEB_OUTPUT)
+ {
+ all_stars = "**************************************************";
+ current_date = strftime ("%d-%m-%Y @ %H:%M:%S", localtime (systime ()));
+ free_threshold = 10; # %
+
+ printf ("\n");
+
+ printf ( \
+ "\n" \
+ "
\n");
+ }
+
+ else
+ {
+# printf ("percentage_occupied = %d\n", percentage_occupied);
+# printf ("percentage_free = %d\n", percentage_free);
+
+ printf ("%-*s", LEFT_COLUMN + 2, mount_point);
+ if (NARROW_MODE)
+ printf ("\n%s", narrow_margin);
+
+# printf ("stars_number = %d\n", stars_number);
+
+ printf ("|");
+ for (i = 1; i <= stars_number && i <= 49; i++)
+ {
+ printf ("%s", "*");
+ }
+ for (i = stars_number + 1; i <= 49; i++)
+ {
+ printf ("%s", "-");
+ }
+
+
+ if (total_size > 1 * t_bytes)
+ printf ( \
+ "| %3d%% %6.1f %6.1f Tb\n", \
+ percentage_occupied, free_size / t_bytes, total_size / t_bytes \
+ );
+ else if (total_size > 1 * g_bytes)
+ printf ( \
+ "| %3d%% %6.1f %6.1f Gb\n", \
+ percentage_occupied, free_size / g_bytes, total_size / g_bytes \
+ );
+ else if (total_size > 1 * m_byptes)
+ printf ( \
+ "| %3d%% %6.1f %6.1f Mb\n", \
+ percentage_occupied, free_size / m_bytes, total_size / m_bytes \
+ );
+ else
+ printf ( \
+ "| %3d%% %6.1f %6.1f Kb\n", \
+ percentage_occupied, free_size / k_bytes, total_size / k_bytes \
+ );
+ }
+ } # if
+}'
diff --git a/.config/awesome/lain/util/dkjson.lua b/.config/awesome/lain/util/dkjson.lua
old mode 100755
new mode 100644
diff --git a/.config/awesome/lain/util/init.lua b/.config/awesome/lain/util/init.lua
old mode 100755
new mode 100644
index 55bfa26..c43a9ed
--- a/.config/awesome/lain/util/init.lua
+++ b/.config/awesome/lain/util/init.lua
@@ -6,7 +6,7 @@
Utilities section
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
@@ -76,7 +76,7 @@ function util.magnify_client(c, width_f, height_f)
end
end
--- https://github.com/lcpz/lain/issues/195
+-- https://github.com/copycat-killer/lain/issues/195
function util.mc(c, width_f, height_f)
c = c or util.magnified_client
if not c then return end
@@ -158,10 +158,9 @@ end
-- }}}
-- On the fly useless gaps change
-function util.useless_gaps_resize(thatmuch, s, t)
- local scr = s or awful.screen.focused()
- local tag = t or scr.selected_tag
- tag.gap = tag.gap + tonumber(thatmuch)
+function util.useless_gaps_resize(thatmuch)
+ local scr = awful.screen.focused()
+ scr.selected_tag.gap = scr.selected_tag.gap + tonumber(thatmuch)
awful.layout.arrange(scr)
end
diff --git a/.config/awesome/lain/util/markup.lua b/.config/awesome/lain/util/markup.lua
old mode 100755
new mode 100644
index 63f9486..0eb9bfa
--- a/.config/awesome/lain/util/markup.lua
+++ b/.config/awesome/lain/util/markup.lua
@@ -1,61 +1,61 @@
--[[
Licensed under MIT License
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2009, Uli Schlachter
* (c) 2009, Majic
--]]
-local format = string.format
+local string = { format = string.format }
local setmetatable = setmetatable
-- Lain markup util submodule
-- lain.util.markup
local markup = { fg = {}, bg = {} }
--- Convenience tags
-function markup.bold(text) return format("%s", text) end
-function markup.italic(text) return format("%s", text) end
-function markup.strike(text) return format("%s", text) end
-function markup.underline(text) return format("%s", text) end
-function markup.monospace(text) return format("%s", text) end
-function markup.big(text) return format("%s", text) end
-function markup.small(text) return format("%s", text) end
+-- Convenience tags.
+function markup.bold(text) return '' .. text .. '' end
+function markup.italic(text) return '' .. text .. '' end
+function markup.strike(text) return '' .. text .. '' end
+function markup.underline(text) return '' .. text .. '' end
+function markup.monospace(text) return '' .. text .. '' end
+function markup.big(text) return '' .. text .. '' end
+function markup.small(text) return '' .. text .. '' end
--- Set the font
+-- Set the font.
function markup.font(font, text)
- return format("%s", font, text)
+ return '' .. text ..''
end
--- Set the foreground
+-- Set the foreground.
function markup.fg.color(color, text)
- return format("%s", color, text)
+ return '' .. text .. ''
end
--- Set the background
+-- Set the background.
function markup.bg.color(color, text)
- return format("%s", color, text)
+ return '' .. text .. ''
end
--- Set foreground and background
+-- Set foreground and background.
function markup.color(fg, bg, text)
- return format("%s", fg, bg, text)
+ return string.format('%s', fg, bg, text)
end
--- Set font and foreground
+-- Set font and foreground.
function markup.fontfg(font, fg, text)
- return format("%s", font, fg, text)
+ return string.format('%s', font, fg, text)
end
--- Set font and background
+-- Set font and background.
function markup.fontbg(font, bg, text)
- return format("%s", font, bg, text)
+ return string.format('%s', font, bg, text)
end
--- Set font, foreground and background
+-- Set font, foreground and background.
function markup.fontcolor(font, fg, bg, text)
- return format("%s", font, fg, bg, text)
+ return string.format('%s', font, fg, bg, text)
end
-- link markup.{fg,bg}(...) calls to markup.{fg,bg}.color(...)
diff --git a/.config/awesome/lain/util/menu_iterator.lua b/.config/awesome/lain/util/menu_iterator.lua
deleted file mode 100755
index 0ea4e0e..0000000
--- a/.config/awesome/lain/util/menu_iterator.lua
+++ /dev/null
@@ -1,144 +0,0 @@
---[[
-
- Licensed under GNU General Public License v2
- * (c) 2017, Simon Désaulniers
- * (c) 2017, Uli Schlachter
- * (c) 2017, Jeferson Siqueira
-
---]]
-
--- Menu iterator with Naughty notifications
--- lain.util.menu_iterator
-
-local naughty = require("naughty")
-local util = require("lain.util")
-local atable = require("awful.util").table
-local assert = assert
-local pairs = pairs
-local tconcat = table.concat
-local unpack = unpack
-
-local state = { cid = nil }
-
-local function naughty_destroy_callback(reason)
- local closed = naughty.notificationClosedReason
- if reason == closed.expired or reason == closed.dismissedByUser then
- local actions = state.index and state.menu[state.index - 1][2]
- if actions then
- for _,action in pairs(actions) do
- -- don't try to call nil callbacks
- if action then action() end
- end
- state.index = nil
- end
- end
-end
-
--- Iterates over a menu.
--- After the timeout, callbacks associated to the last visited choice are
--- executed. Inputs:
--- * menu: a list of {label, {callbacks}} pairs
--- * timeout: time to wait before confirming the menu selection
--- * icon: icon to display in the notification of the chosen label
-local function iterate(menu, timeout, icon)
- local timeout = timeout or 4 -- default timeout for each menu entry
- local icon = icon or nil -- icon to display on the menu
-
- -- Build the list of choices
- if not state.index then
- state.menu = menu
- state.index = 1
- end
-
- -- Select one and display the appropriate notification
- local label
- local next = state.menu[state.index]
- state.index = state.index + 1
-
- if not next then
- label = "Cancel"
- state.index = nil
- else
- label, _ = unpack(next)
- end
-
- state.cid = naughty.notify({
- text = label,
- icon = icon,
- timeout = timeout,
- screen = mouse.screen,
- replaces_id = state.cid,
- destroy = naughty_destroy_callback
- }).id
-end
-
--- Generates a menu compatible with the first argument of `iterate` function and
--- suitable for the following cases:
--- * all possible choices individually (partition of singletons);
--- * all possible subsets of the set of choices (powerset).
---
--- Inputs:
--- * args: an array containing the following members:
--- * choices: Array of choices (string) on which the menu will be
--- generated.
--- * name: Displayed name of the menu (in the form "name: choices").
--- * selected_cb: Callback to execute for each selected choice. Takes
--- the choice as a string argument. Can be `nil` (no action
--- to execute).
--- * rejected_cb: Callback to execute for each rejected choice (possible
--- choices which are not selected). Takes the choice as a
--- string argument. Can be `nil` (no action to execute).
--- * extra_choices: An array of extra { choice_str, callback_fun } pairs to be
--- added to the menu. Each callback_fun can be `nil`.
--- * combination: The combination of choices to generate. Possible values:
--- "powerset" and "single" (default).
--- Output:
--- * m: menu to be iterated over.
-local function menu(args)
- local choices = assert(args.choices or args[1])
- local name = assert(args.name or args[2])
- local selected_cb = args.selected_cb
- local rejected_cb = args.rejected_cb
- local extra_choices = args.extra_choices or {}
-
- local ch_combinations = args.combination == "powerset" and helpers.powerset(choices) or helpers.trivial_partition_set(choices)
-
- for _,c in pairs(extra_choices) do
- ch_combinations = atable.join(ch_combinations, {{c[1]}})
- end
-
- local m = {} -- the menu
-
- for _,c in pairs(ch_combinations) do
- if #c > 0 then
- local cbs = {}
-
- -- selected choices
- for _,ch in pairs(c) do
- if atable.hasitem(choices, ch) then
- cbs[#cbs + 1] = selected_cb and function() selected_cb(ch) end or nil
- end
- end
-
- -- rejected choices
- for _,ch in pairs(choices) do
- if not atable.hasitem(c, ch) and atable.hasitem(choices, ch) then
- cbs[#cbs + 1] = rejected_cb and function() rejected_cb(ch) end or nil
- end
- end
-
- -- add user extra choices (like the choice "None" for example)
- for _,x in pairs(extra_choices) do
- if x[1] == c[1] then
- cbs[#cbs + 1] = x[2]
- end
- end
-
- m[#m + 1] = { name .. ": " .. tconcat(c, " + "), cbs }
- end
- end
-
- return m
-end
-
-return { iterate = iterate, menu = menu }
diff --git a/.config/awesome/lain/util/quake.lua b/.config/awesome/lain/util/quake.lua
old mode 100755
new mode 100644
index 01891b0..38b9917
--- a/.config/awesome/lain/util/quake.lua
+++ b/.config/awesome/lain/util/quake.lua
@@ -1,17 +1,20 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2016, Luca CPZ
+ * (c) 2016, Luke Bonham
* (c) 2015, unknown
--]]
local awful = require("awful")
local capi = { client = client }
-local math = math
-local string = string
+
+local math = { floor = math.floor }
+local string = { format = string.format }
+
local pairs = pairs
local screen = screen
+
local setmetatable = setmetatable
-- Quake-like Dropdown application spawn
@@ -60,7 +63,7 @@ function quake:display()
client.floating = true
client.border_width = self.border
client.size_hints_honor = false
- client:geometry(self.geometry[self.screen.index] or self:compute_size())
+ client:geometry(self.geometry[self.screen] or self:compute_size())
-- Set not sticky and on top
client.sticky = false
@@ -92,12 +95,12 @@ end
function quake:compute_size()
-- skip if we already have a geometry for this screen
- if not self.geometry[self.screen.index] then
+ if not self.geometry[self.screen] then
local geom
if not self.overlap then
- geom = screen[self.screen.index].workarea
+ geom = screen[self.screen].workarea
else
- geom = screen[self.screen.index].geometry
+ geom = screen[self.screen].geometry
end
local width, height = self.width, self.height
if width <= 1 then width = math.floor(geom.width * width) - 2 * self.border end
@@ -109,9 +112,9 @@ function quake:compute_size()
if self.vert == "top" then y = geom.y
elseif self.vert == "bottom" then y = geom.height + geom.y - height
else y = geom.y + (geom.height - height)/2 end
- self.geometry[self.screen.index] = { x = x, y = y, width = width, height = height }
+ self.geometry[self.screen] = { x = x, y = y, width = width, height = height }
end
- return self.geometry[self.screen.index]
+ return self.geometry[self.screen]
end
function quake:new(config)
@@ -155,10 +158,7 @@ function quake:toggle()
if self.followtag then self.screen = awful.screen.focused() end
local current_tag = self.screen.selected_tag
if current_tag and self.last_tag ~= current_tag and self.visible then
- local c=self:display()
- if c then
- c:move_to_tag(current_tag)
- end
+ self:display():move_to_tag(current_tag)
else
self.visible = not self.visible
self:display()
diff --git a/.config/awesome/lain/util/separators.lua b/.config/awesome/lain/util/separators.lua
old mode 100755
new mode 100644
index 465132d..c86af92
--- a/.config/awesome/lain/util/separators.lua
+++ b/.config/awesome/lain/util/separators.lua
@@ -1,13 +1,13 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2015, Luca CPZ
+ * (c) 2015, Luke Bonham
* (c) 2015, plotnikovanton
--]]
-local wibox = require("wibox")
-local gears = require("gears")
+local wibox = require("wibox")
+local gears = require("gears")
-- Lain Cairo separators util submodule
-- lain.util.separators
@@ -18,22 +18,14 @@ local separators = { height = 0, width = 9 }
-- Right
function separators.arrow_right(col1, col2)
local widget = wibox.widget.base.make_widget()
- widget.col1 = col1
- widget.col2 = col2
widget.fit = function(m, w, h)
return separators.width, separators.height
end
- widget.update = function(col1, col2)
- widget.col1 = col1
- widget.col2 = col2
- widget:emit_signal("widget::redraw_needed")
- end
-
widget.draw = function(mycross, wibox, cr, width, height)
- if widget.col2 ~= "alpha" then
- cr:set_source_rgb(gears.color.parse_color(widget.col2))
+ if col2 ~= "alpha" then
+ cr:set_source_rgb(gears.color.parse_color(col2))
cr:new_path()
cr:move_to(0, 0)
cr:line_to(width, height/2)
@@ -49,8 +41,8 @@ function separators.arrow_right(col1, col2)
cr:fill()
end
- if widget.col1 ~= "alpha" then
- cr:set_source_rgb(gears.color.parse_color(widget.col1))
+ if col1 ~= "alpha" then
+ cr:set_source_rgb(gears.color.parse_color(col1))
cr:new_path()
cr:move_to(0, 0)
cr:line_to(width, height/2)
@@ -66,22 +58,14 @@ end
-- Left
function separators.arrow_left(col1, col2)
local widget = wibox.widget.base.make_widget()
- widget.col1 = col1
- widget.col2 = col2
widget.fit = function(m, w, h)
return separators.width, separators.height
end
- widget.update = function(col1, col2)
- widget.col1 = col1
- widget.col2 = col2
- widget:emit_signal("widget::redraw_needed")
- end
-
widget.draw = function(mycross, wibox, cr, width, height)
- if widget.col1 ~= "alpha" then
- cr:set_source_rgb(gears.color.parse_color(widget.col1))
+ if col1 ~= "alpha" then
+ cr:set_source_rgb(gears.color.parse_color(col1))
cr:new_path()
cr:move_to(width, 0)
cr:line_to(0, height/2)
@@ -97,14 +81,14 @@ function separators.arrow_left(col1, col2)
cr:fill()
end
- if widget.col2 ~= "alpha" then
+ if col2 ~= "alpha" then
cr:new_path()
cr:move_to(width, 0)
cr:line_to(0, height/2)
cr:line_to(width, height)
cr:close_path()
- cr:set_source_rgb(gears.color.parse_color(widget.col2))
+ cr:set_source_rgb(gears.color.parse_color(col2))
cr:fill()
end
end
diff --git a/.config/awesome/lain/widget/alsa.lua b/.config/awesome/lain/widget/alsa.lua
old mode 100755
new mode 100644
index 3b6c6d6..29e3a05
--- a/.config/awesome/lain/widget/alsa.lua
+++ b/.config/awesome/lain/widget/alsa.lua
@@ -1,7 +1,7 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010, Adrian C.
--]]
@@ -9,7 +9,8 @@
local helpers = require("lain.helpers")
local shell = require("awful.util").shell
local wibox = require("wibox")
-local string = string
+local string = { match = string.match,
+ format = string.format }
-- ALSA volume
-- lain.widget.alsa
diff --git a/.config/awesome/lain/widget/alsabar.lua b/.config/awesome/lain/widget/alsabar.lua
old mode 100755
new mode 100644
index 9b9f4b9..750933a
--- a/.config/awesome/lain/widget/alsabar.lua
+++ b/.config/awesome/lain/widget/alsabar.lua
@@ -1,19 +1,20 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2013, Rman
--]]
-local helpers = require("lain.helpers")
-local awful = require("awful")
-local naughty = require("naughty")
-local wibox = require("wibox")
-local math = math
-local string = string
-local type = type
-local tonumber = tonumber
+local helpers = require("lain.helpers")
+local awful = require("awful")
+local naughty = require("naughty")
+local wibox = require("wibox")
+local math = { modf = math.modf }
+local string = { format = string.format,
+ match = string.match,
+ rep = string.rep }
+local type, tonumber = type, tonumber
-- ALSA volume bar
-- lain.widget.alsabar
@@ -35,8 +36,6 @@ local function factory(args)
local settings = args.settings or function() end
local width = args.width or 63
local height = args.height or 1
- local margins = args.margins or 1
- local paddings = args.paddings or 1
local ticks = args.ticks or false
local ticks_size = args.ticks_size or 7
@@ -60,12 +59,12 @@ local function factory(args)
end
alsabar.bar = wibox.widget {
- color = alsabar.colors.unmute,
- background_color = alsabar.colors.background,
forced_height = height,
forced_width = width,
- margins = margins,
- paddings = margins,
+ color = alsabar.colors.unmute,
+ background_color = alsabar.colors.background,
+ margins = 1,
+ paddings = 1,
ticks = ticks,
ticks_size = ticks_size,
widget = wibox.widget.progressbar
@@ -114,23 +113,9 @@ local function factory(args)
preset.title = preset.title .. " Muted"
end
- -- tot is the maximum number of ticks to display in the notification
- -- fallback: default horizontal wibox height
- local wib, tot = awful.screen.focused().mywibox, 20
-
- -- if we can grab mywibox, tot is defined as its height if
- -- horizontal, or width otherwise
- if wib then
- if wib.position == "left" or wib.position == "right" then
- tot = wib.width
- else
- tot = wib.height
- end
- end
-
- int = math.modf((alsabar._current_level / 100) * tot)
+ int = math.modf((alsabar._current_level / 100) * awful.screen.focused().mywibox.height)
preset.text = string.format("[%s%s]", string.rep("|", int),
- string.rep(" ", tot - int))
+ string.rep(" ", awful.screen.focused().mywibox.height - int))
if alsabar.followtag then preset.screen = awful.screen.focused() end
diff --git a/.config/awesome/lain/widget/bat.lua b/.config/awesome/lain/widget/bat.lua
old mode 100755
new mode 100644
index 5a301b5..73c9a52
--- a/.config/awesome/lain/widget/bat.lua
+++ b/.config/awesome/lain/widget/bat.lua
@@ -1,53 +1,36 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
-local helpers = require("lain.helpers")
-local fs = require("gears.filesystem")
-local naughty = require("naughty")
-local wibox = require("wibox")
-local math = math
-local string = string
-local ipairs = ipairs
-local tonumber = tonumber
+local first_line = require("lain.helpers").first_line
+local newtimer = require("lain.helpers").newtimer
+local naughty = require("naughty")
+local wibox = require("wibox")
+local math = { abs = math.abs,
+ floor = math.floor,
+ log10 = math.log10,
+ min = math.min }
+local string = { format = string.format }
+local ipairs = ipairs
+local tonumber = tonumber
-- Battery infos
-- lain.widget.bat
local function factory(args)
- local pspath = args.pspath or "/sys/class/power_supply/"
-
- if not fs.is_dir(pspath) then
- naughty.notify { text = "lain.widget.bat: invalid power supply path", timeout = 0 }
- return
- end
-
local bat = { widget = wibox.widget.textbox() }
local args = args or {}
local timeout = args.timeout or 30
+ local batteries = args.batteries or (args.battery and {args.battery}) or {"BAT1"}
+ local ac = args.ac or "AC0"
local notify = args.notify or "on"
local n_perc = args.n_perc or { 5, 15 }
- local batteries = args.batteries or (args.battery and {args.battery}) or {}
- local ac = args.ac or "AC0"
local settings = args.settings or function() end
- function bat.get_batteries()
- helpers.line_callback("ls -1 " .. pspath, function(line)
- local bstr = string.match(line, "BAT%w+")
- if bstr then
- batteries[#batteries + 1] = bstr
- else
- ac = string.match(line, "A%w+") or "AC0"
- end
- end)
- end
-
- if #batteries == 0 then bat.get_batteries() end
-
bat_notification_critical_preset = {
title = "Battery exhausted",
text = "Shutdown imminent",
@@ -64,14 +47,6 @@ local function factory(args)
bg = "#CDCDCD"
}
- bat_notification_charged_preset = {
- title = "Battery full",
- text = "You can unplug the cable",
- timeout = 15,
- fg = "#202020",
- bg = "#CDCDCD"
- }
-
bat_now = {
status = "N/A",
ac_status = "N/A",
@@ -87,9 +62,6 @@ local function factory(args)
bat_now.n_perc[i] = 0
end
- -- used to notify full charge only once before discharging
- local fullnotification = false
-
function bat.update()
local sum_rate_current = 0
local sum_rate_voltage = 0
@@ -97,29 +69,30 @@ local function factory(args)
local sum_rate_energy = 0
local sum_energy_now = 0
local sum_energy_full = 0
+ local pspath = "/sys/class/power_supply/"
for i, battery in ipairs(batteries) do
local bstr = pspath .. battery
- local present = helpers.first_line(bstr .. "/present")
+ local present = first_line(bstr .. "/present")
if tonumber(present) == 1 then
-- current_now(I)[uA], voltage_now(U)[uV], power_now(P)[uW]
- local rate_current = tonumber(helpers.first_line(bstr .. "/current_now"))
- local rate_voltage = tonumber(helpers.first_line(bstr .. "/voltage_now"))
- local rate_power = tonumber(helpers.first_line(bstr .. "/power_now"))
+ local rate_current = tonumber(first_line(bstr .. "/current_now"))
+ local rate_voltage = tonumber(first_line(bstr .. "/voltage_now"))
+ local rate_power = tonumber(first_line(bstr .. "/power_now"))
-- energy_now(P)[uWh], charge_now(I)[uAh]
- local energy_now = tonumber(helpers.first_line(bstr .. "/energy_now") or
- helpers.first_line(bstr .. "/charge_now"))
+ local energy_now = tonumber(first_line(bstr .. "/energy_now") or
+ first_line(bstr .. "/charge_now"))
-- energy_full(P)[uWh], charge_full(I)[uAh]
- local energy_full = tonumber(helpers.first_line(bstr .. "/energy_full") or
- helpers.first_line(bstr .. "/charge_full"))
+ local energy_full = tonumber(first_line(bstr .. "/energy_full") or
+ first_line(bstr .. "/charge_full"))
- local energy_percentage = tonumber(helpers.first_line(bstr .. "/capacity")) or
+ local energy_percentage = tonumber(first_line(bstr .. "/capacity")) or
math.floor((energy_now / energy_full) * 100)
- bat_now.n_status[i] = helpers.first_line(bstr .. "/status") or "N/A"
+ bat_now.n_status[i] = first_line(bstr .. "/status") or "N/A"
bat_now.n_perc[i] = energy_percentage or bat_now.n_perc[i]
sum_rate_current = sum_rate_current + (rate_current or 0)
@@ -141,7 +114,7 @@ local function factory(args)
bat_now.status = status
end
end
- bat_now.ac_status = tonumber(helpers.first_line(string.format("%s%s/online", pspath, ac))) or "N/A"
+ bat_now.ac_status = tonumber(first_line(string.format("%s%s/online", pspath, ac))) or "N/A"
if bat_now.status ~= "N/A" then
if bat_now.status ~= "Full" and sum_rate_power == 0 and bat_now.ac_status == 1 then
@@ -183,32 +156,23 @@ local function factory(args)
widget = bat.widget
settings()
- -- notifications for critical, low, and full levels
- if notify == "on" then
- if bat_now.status == "Discharging" then
- if tonumber(bat_now.perc) <= n_perc[1] then
- bat.id = naughty.notify({
- preset = bat_notification_critical_preset,
- replaces_id = bat.id
- }).id
- elseif tonumber(bat_now.perc) <= n_perc[2] then
- bat.id = naughty.notify({
- preset = bat_notification_low_preset,
- replaces_id = bat.id
- }).id
- end
- fullnotification = false
- elseif bat_now.status == "Full" and not fullnotification then
+ -- notifications for critical and low levels
+ if notify == "on" and bat_now.status == "Discharging" then
+ if tonumber(bat_now.perc) <= n_perc[1] then
bat.id = naughty.notify({
- preset = bat_notification_charged_preset,
+ preset = bat_notification_critical_preset,
+ replaces_id = bat.id
+ }).id
+ elseif tonumber(bat_now.perc) <= n_perc[2] then
+ bat.id = naughty.notify({
+ preset = bat_notification_low_preset,
replaces_id = bat.id
}).id
- fullnotification = true
end
end
end
- helpers.newtimer("batteries", timeout, bat.update)
+ newtimer("batteries", timeout, bat.update)
return bat
end
diff --git a/.config/awesome/lain/widget/cal.lua b/.config/awesome/lain/widget/cal.lua
deleted file mode 100755
index 9b613bf..0000000
--- a/.config/awesome/lain/widget/cal.lua
+++ /dev/null
@@ -1,130 +0,0 @@
---[[
-
- Licensed under GNU General Public License v2
- * (c) 2018, Luca CPZ
-
---]]
-
-local helpers = require("lain.helpers")
-local markup = require("lain.util.markup")
-local awful = require("awful")
-local naughty = require("naughty")
-local floor = math.floor
-local os = os
-local pairs = pairs
-local string = string
-local tconcat = table.concat
-local tonumber = tonumber
-local tostring = tostring
-
--- Calendar notification
--- lain.widget.cal
-
-local function factory(args)
- args = args or {}
- local cal = {
- attach_to = args.attach_to or {},
- week_start = args.week_start or 2,
- three = args.three or false,
- followtag = args.followtag or false,
- icons = args.icons or helpers.icons_dir .. "cal/white/",
- notification_preset = args.notification_preset or {
- font = "Monospace 10", fg = "#FFFFFF", bg = "#000000"
- }
- }
-
- function cal.build(month, year)
- local current_month, current_year = tonumber(os.date("%m")), tonumber(os.date("%Y"))
- local is_current_month = (not month or not year) or (month == current_month and year == current_year)
- local today = is_current_month and tonumber(os.date("%d")) -- otherwise nil and not highlighted
- local t = os.time { year = year or current_year, month = month and month+1 or current_month+1, day = 0 }
- local d = os.date("*t", t)
- local mth_days, st_day, this_month = d.day, (d.wday-d.day-cal.week_start+1)%7, os.date("%B %Y", t)
- local notifytable = { [1] = string.format("%s%s\n", string.rep(" ", floor((28 - this_month:len())/2)), markup.bold(this_month)) }
- for x = 0,6 do notifytable[#notifytable+1] = os.date("%a ", os.time { year=2006, month=1, day=x+cal.week_start }) end
- notifytable[#notifytable] = string.format("%s\n%s", notifytable[#notifytable]:sub(1, -2), string.rep(" ", st_day*4))
- for x = 1,mth_days do
- local strx = x ~= today and x or markup.bold(markup.color(cal.notification_preset.bg, cal.notification_preset.fg, x) .. " ")
- strx = string.format("%s%s", string.rep(" ", 3 - tostring(x):len()), strx)
- notifytable[#notifytable+1] = string.format("%-4s%s", strx, (x+st_day)%7==0 and x ~= mth_days and "\n" or "")
- end
- if string.len(cal.icons or "") > 0 and today then cal.icon = cal.icons .. today .. ".png" end
- cal.month, cal.year = d.month, d.year
- return notifytable
- end
-
- function cal.getdate(month, year, offset)
- if not month or not year then
- month = tonumber(os.date("%m"))
- year = tonumber(os.date("%Y"))
- end
-
- month = month + offset
-
- while month > 12 do
- month = month - 12
- year = year + 1
- end
-
- while month < 1 do
- month = month + 12
- year = year - 1
- end
-
- return month, year
- end
-
- function cal.hide()
- if not cal.notification then return end
- naughty.destroy(cal.notification)
- cal.notification = nil
- end
-
- function cal.show(timeout, month, year, scr)
- cal.notification_preset.text = tconcat(cal.build(month, year))
-
- if cal.three then
- local current_month, current_year = cal.month, cal.year
- local prev_month, prev_year = cal.getdate(cal.month, cal.year, -1)
- local next_month, next_year = cal.getdate(cal.month, cal.year, 1)
- cal.notification_preset.text = string.format("%s\n\n%s\n\n%s",
- tconcat(cal.build(prev_month, prev_year)), cal.notification_preset.text,
- tconcat(cal.build(next_month, next_year)))
- cal.month, cal.year = current_month, current_year
- end
-
- cal.hide()
- cal.notification = naughty.notify {
- preset = cal.notification_preset,
- screen = cal.followtag and awful.screen.focused() or scr or 1,
- icon = cal.icon,
- timeout = timeout or cal.notification_preset.timeout or 5
- }
- end
-
- function cal.hover_on() cal.show(0) end
- function cal.move(offset)
- local offset = offset or 0
- cal.month, cal.year = cal.getdate(cal.month, cal.year, offset)
- cal.show(0, cal.month, cal.year)
- end
- function cal.prev() cal.move(-1) end
- function cal.next() cal.move( 1) end
-
- function cal.attach(widget)
- widget:connect_signal("mouse::enter", cal.hover_on)
- widget:connect_signal("mouse::leave", cal.hide)
- widget:buttons(awful.util.table.join(
- awful.button({}, 1, cal.prev),
- awful.button({}, 3, cal.next),
- awful.button({}, 2, cal.hover_on),
- awful.button({}, 5, cal.prev),
- awful.button({}, 4, cal.next)))
- end
-
- for _, widget in pairs(cal.attach_to) do cal.attach(widget) end
-
- return cal
-end
-
-return factory
diff --git a/.config/awesome/lain/widget/calendar.lua b/.config/awesome/lain/widget/calendar.lua
new file mode 100644
index 0000000..2dda890
--- /dev/null
+++ b/.config/awesome/lain/widget/calendar.lua
@@ -0,0 +1,127 @@
+--[[
+
+ Licensed under GNU General Public License v2
+ * (c) 2013, Luke Bonham
+
+--]]
+
+local helpers = require("lain.helpers")
+local markup = require("lain.util.markup")
+local awful = require("awful")
+local naughty = require("naughty")
+local mouse = mouse
+local os = { date = os.date }
+local string = { format = string.format,
+ gsub = string.gsub }
+local ipairs = ipairs
+local tonumber = tonumber
+local setmetatable = setmetatable
+
+-- Calendar notification
+-- lain.widget.calendar
+local calendar = { offset = 0 }
+
+function calendar.hide()
+ if not calendar.notification then return end
+ naughty.destroy(calendar.notification)
+ calendar.notification = nil
+end
+
+function calendar.show(t_out, inc_offset, scr)
+ local f, offs = nil, inc_offset or 0
+
+ calendar.notification_preset.screen = scr or (calendar.followtag and awful.screen.focused()) or 1
+ calendar.offset = calendar.offset + offs
+
+ local current_month = (offs == 0 or calendar.offset == 0)
+
+ if current_month then -- today highlighted
+ calendar.offset = 0
+ calendar.icon = calendar.icons:len() > 0 and string.format("%s%s.png", calendar.icons, tonumber(os.date("%d")))
+ f = calendar.cal
+ else -- no current month showing, no day to highlight
+ local month = tonumber(os.date("%m"))
+ local year = tonumber(os.date("%Y"))
+
+ month = month + calendar.offset
+
+ while month > 12 do
+ month = month - 12
+ year = year + 1
+ end
+
+ while month < 1 do
+ month = month + 12
+ year = year - 1
+ end
+
+ calendar.icon = nil
+ f = string.format("%s %s %s", calendar.cal, month, year)
+ end
+
+ helpers.async(f, function(ws)
+ local fg, bg = calendar.notification_preset.fg, calendar.notification_preset.bg
+ calendar.notification_preset.text = ws:gsub("%c%[%d+[m]?%s?%d+%c%[%d+[m]?",
+ markup.bold(markup.color(bg, fg, os.date("%e")))):gsub("\n*$", "")
+
+ local widget_focused = true
+
+ if t_out == 0 and mouse.current_widgets then
+ widget_focused = false
+ for i, widget in ipairs(calendar.attach_to) do
+ for _,v in ipairs(mouse.current_widgets) do
+ if widget == v then
+ widget_focused = true
+ break
+ end
+ end
+ end
+ end
+
+ if widget_focused then
+ calendar.hide()
+ calendar.notification = naughty.notify({
+ preset = calendar.notification_preset,
+ icon = calendar.icon,
+ timeout = t_out or calendar.notification_preset.timeout or 5
+ })
+ end
+ end)
+end
+
+function calendar.hover_on() calendar.show(0) end
+function calendar.hover_off() calendar.hide() end
+function calendar.prev() calendar.show(0, -1) end
+function calendar.next() calendar.show(0, 1) end
+
+function calendar.attach(widget)
+ widget:connect_signal("mouse::enter", calendar.hover_on)
+ widget:connect_signal("mouse::leave", calendar.hover_off)
+ widget:buttons(awful.util.table.join(
+ awful.button({}, 1, calendar.prev),
+ awful.button({}, 3, calendar.next),
+ awful.button({}, 2, calendar.hover_on),
+ awful.button({}, 4, calendar.prev),
+ awful.button({}, 5, calendar.next)))
+end
+
+local function factory(args)
+ local args = args or {}
+ calendar.cal = args.cal or "/usr/bin/cal"
+ calendar.attach_to = args.attach_to or {}
+ calendar.followtag = args.followtag or false
+ calendar.icons = args.icons or helpers.icons_dir .. "cal/white/"
+ calendar.notification_preset = args.notification_preset
+
+ if not calendar.notification_preset then
+ calendar.notification_preset = {
+ font = "Monospace 10",
+ fg = "#FFFFFF",
+ bg = "#000000"
+ }
+ end
+
+ for i, widget in ipairs(calendar.attach_to) do calendar.attach(widget) end
+end
+
+return setmetatable(calendar, { __call = function(_, ...) return factory(...) end })
diff --git a/.config/awesome/lain/widget/contrib/init.lua b/.config/awesome/lain/widget/contrib/init.lua
old mode 100755
new mode 100644
index 9e863a5..ccc1046
--- a/.config/awesome/lain/widget/contrib/init.lua
+++ b/.config/awesome/lain/widget/contrib/init.lua
@@ -6,7 +6,7 @@
Users contributed widgets section
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
--]]
diff --git a/.config/awesome/lain/widget/contrib/kbdlayout.lua b/.config/awesome/lain/widget/contrib/kbdlayout.lua
new file mode 100644
index 0000000..5a503ab
--- /dev/null
+++ b/.config/awesome/lain/widget/contrib/kbdlayout.lua
@@ -0,0 +1,77 @@
+--[[
+
+ Licensed under GNU General Public License v2
+ * (c) 2015, Dario Gjorgjevski
+
+--]]
+
+local helpers = require("lain.helpers")
+local awful = require("awful")
+local wibox = require("wibox")
+local string = { format = string.format,
+ match = string.match }
+local execute = os.execute
+local setmetatable = setmetatable
+
+-- Keyboard layout switcher
+-- lain.widget.contrib.kblayout
+
+local function factory(args)
+ local kbdlayout = { widget = wibox.widget.textbox() }
+ local args = args or {}
+ local layouts = args.layouts or {}
+ local settings = args.settings or function () end
+ local add_us_secondary = true
+ local timeout = args.timeout or 5
+ local idx = 1
+
+ if args.add_us_secondary == false then add_us_secondary = false end
+
+ local function kbd_run_settings(layout, variant)
+ kbdlayout_now = {
+ layout = string.match(layout, "[^,]+"), -- Make sure to match the primary layout only.
+ variant = variant
+ }
+ widget = kbdlayout.widget
+ settings()
+ end
+
+ function kbdlayout.update()
+ helpers.async("setxkbmap -query", function(status)
+ kbd_run_settings(string.match(status, "layout:%s*([^\n]*)"),
+ string.match(status, "variant:%s*([^\n]*)"))
+ end)
+ end
+
+ function kbdlayout.set(i)
+ if #layouts == 0 then return end
+ idx = ((i - 1) % #layouts) + 1 -- Make sure to wrap around as needed.
+ local to_execute = "setxkbmap " .. layouts[idx].layout
+
+ if add_us_secondary and not string.match(layouts[idx].layout, ",?us,?") then
+ to_execute = to_execute .. ",us"
+ end
+
+ if layouts[idx].variant then
+ to_execute = to_execute .. " " .. layouts[idx].variant
+ end
+
+ if execute(to_execute) then
+ kbd_run_settings(layouts[idx].layout, layouts[idx].variant)
+ end
+ end
+
+ function kbdlayout.next() kbdlayout.set(idx + 1) end
+ function kbdlayout.prev() kbdlayout.set(idx - 1) end
+
+ -- Mouse bindings
+ kbdlayout.widget:buttons(awful.util.table.join(
+ awful.button({ }, 1, function () kbdlayout.next() end),
+ awful.button({ }, 3, function () kbdlayout.prev() end)))
+
+ helpers.newtimer("kbdlayout", timeout, kbdlayout.update)
+
+ return kbdlayout
+end
+
+return factory
diff --git a/.config/awesome/lain/widget/contrib/moc.lua b/.config/awesome/lain/widget/contrib/moc.lua
old mode 100755
new mode 100644
index f429c77..027cec3
--- a/.config/awesome/lain/widget/contrib/moc.lua
+++ b/.config/awesome/lain/widget/contrib/moc.lua
@@ -11,8 +11,9 @@ local focused = require("awful.screen").focused
local escape_f = require("awful.util").escape
local naughty = require("naughty")
local wibox = require("wibox")
-local os = os
-local string = string
+local os = { getenv = os.getenv }
+local string = { format = string.format,
+ gmatch = string.gmatch }
-- MOC audio player
-- lain.widget.contrib.moc
diff --git a/.config/awesome/lain/widget/contrib/redshift.lua b/.config/awesome/lain/widget/contrib/redshift.lua
old mode 100755
new mode 100644
index d0e5eed..7b54611
--- a/.config/awesome/lain/widget/contrib/redshift.lua
+++ b/.config/awesome/lain/widget/contrib/redshift.lua
@@ -1,7 +1,6 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2017, Luca CPZ
* (c) 2014, blueluke
--]]
diff --git a/.config/awesome/lain/widget/contrib/task.lua b/.config/awesome/lain/widget/contrib/task.lua
old mode 100755
new mode 100644
index 536e006..7de1967
--- a/.config/awesome/lain/widget/contrib/task.lua
+++ b/.config/awesome/lain/widget/contrib/task.lua
@@ -10,7 +10,7 @@ local markup = require("lain.util").markup
local awful = require("awful")
local naughty = require("naughty")
local mouse = mouse
-local string = string
+local string = { format = string.format, gsub = string.gsub }
-- Taskwarrior notification
-- lain.widget.contrib.task
@@ -23,7 +23,12 @@ function task.hide()
end
function task.show(scr)
- task.notification_preset.screen = task.followtag and awful.screen.focused() or scr or 1
+
+ if task.followtag then
+ task.notification_preset.screen = awful.screen.focused()
+ elseif scr then
+ task.notification_preset.screen = scr
+ end
helpers.async({ awful.util.shell, "-c", task.show_cmd }, function(f)
local widget_focused = true
@@ -40,12 +45,12 @@ function task.show(scr)
if widget_focused then
task.hide()
- task.notification = naughty.notify {
- preset = task.notification_preset,
- title = "task next",
- text = markup.font(task.notification_preset.font,
- awful.util.escape(f:gsub("\n*$", "")))
- }
+ task.notification = naughty.notify({
+ preset = task.notification_preset,
+ title = "task next",
+ text = markup.font(task.notification_preset.font,
+ awful.util.escape(f:gsub("\n*$", "")))
+ })
end
end)
end
diff --git a/.config/awesome/lain/widget/contrib/tp_smapi.lua b/.config/awesome/lain/widget/contrib/tp_smapi.lua
deleted file mode 100755
index 4f43e44..0000000
--- a/.config/awesome/lain/widget/contrib/tp_smapi.lua
+++ /dev/null
@@ -1,146 +0,0 @@
---[[
-
- Licensed under GNU General Public License v2
- * (c) 2018, Luca CPZ
- * (c) 2013, Conor Heine
-
---]]
-
-local helpers = require("lain.helpers")
-local focused = require("awful.screen").focused
-local gears = require("gears")
-local naughty = require("naughty")
-local wibox = require("wibox")
-local string = string
-
--- ThinkPad battery infos and widget creator
--- http://www.thinkwiki.org/wiki/Tp_smapi
--- lain.widget.contrib.tp_smapi
-
-local function factory(apipath)
- local tp_smapi = {
- path = apipath or "/sys/devices/platform/smapi"
- }
-
- function tp_smapi.get(batid, feature)
- return helpers.first_line(string.format("%s/%s/%s", tp_smapi.path, batid or "BAT0", feature or ""))
- end
-
- function tp_smapi.installed(batid)
- return tp_smapi.get(batid, "installed") == "1"
- end
-
- function tp_smapi.status(batid)
- return tp_smapi.get(batid, "state")
- end
-
- function tp_smapi.percentage(batid)
- return tp_smapi.get(batid, "remaining_percent")
- end
-
- -- either running or charging time
- function tp_smapi.time(batid)
- local status = tp_smapi.status(batid)
- local mins_left = tp_smapi.get(batid, string.match(string.lower(status), "discharging") and "remaining_running_time" or "remaining_charging_time")
- if not string.find(mins_left, "^%d+") then return "N/A" end
- return string.format("%02d:%02d", math.floor(mins_left / 60), mins_left % 60) -- HH:mm
- end
-
- function tp_smapi.hide()
- if not tp_smapi.notification then return end
- naughty.destroy(tp_smapi.notification)
- tp_smapi.notification = nil
- end
-
- function tp_smapi.show(batid, seconds, scr)
- if not tp_smapi.installed(batid) then return end
-
- local mfgr = tp_smapi.get(batid, "manufacturer") or "no_mfgr"
- local model = tp_smapi.get(batid, "model") or "no_model"
- local chem = tp_smapi.get(batid, "chemistry") or "no_chem"
- local status = tp_smapi.get(batid, "state")
- local time = tp_smapi.time(batid)
- local msg = ""
-
- if status and status ~= "idle" then
- msg = string.format("[%s] %s %s", status, time ~= "N/A" and time or "unknown remaining time",
- string.lower(status):gsub(" ", ""):gsub("\n", "") == "charging" and " until charged" or " remaining")
- else
- msg = "On AC power"
- end
-
- tp_smapi.hide()
- tp_smapi.notification = naughty.notify {
- title = string.format("%s: %s %s (%s)", batid, mfgr, model, chem),
- text = msg,
- timeout = seconds or 0,
- screen = scr or focused()
- }
- end
-
- function tp_smapi.create_widget(args)
- local args = args or {}
- local pspath = args.pspath or "/sys/class/power_supply/"
- local batteries = args.batteries or (args.battery and {args.battery}) or {}
- local timeout = args.timeout or 30
- local settings = args.settings or function() end
-
- if #batteries == 0 then
- helpers.line_callback("ls -1 " .. pspath, function(line)
- local bstr = string.match(line, "BAT%w+")
- if bstr then batteries[#batteries + 1] = bstr end
- end)
- end
-
- local all_batteries_installed = true
-
- for i, battery in ipairs(batteries) do
- if not tp_smapi.installed(battery) then
- naughty.notify {
- preset = naughty.config.critical,
- title = "tp_smapi: error while creating widget",
- text = string.format("battery %s is not installed", battery)
- }
- all_batteries_installed = false
- break
- end
- end
-
- if not all_batteries_installed then return end
-
- tpbat = {
- batteries = batteries,
- widget = args.widget or wibox.widget.textbox()
- }
-
- function tpbat.update()
- tpbat_now = {
- n_status = {},
- n_perc = {},
- n_time = {},
- status = "N/A"
- }
-
- for i = 1, #batteries do
- tpbat_now.n_status[i] = tp_smapi.status(batteries[i]) or "N/A"
- tpbat_now.n_perc[i] = tp_smapi.percentage(batteries[i])
- tpbat_now.n_time[i] = tp_smapi.time(batteries[i]) or "N/A"
-
- if not tpbat_now.n_status[i]:lower():match("full") then
- tpbat_now.status = tpbat_now.n_status[i]
- end
- end
-
- widget = tpbat.widget -- backwards compatibility
- settings()
- end
-
- helpers.newtimer("thinkpad-batteries", timeout, tpbat.update)
-
- return tpbat
- end
-
- return tp_smapi
-end
-
-return factory
diff --git a/.config/awesome/lain/widget/contrib/tpbat/init.lua b/.config/awesome/lain/widget/contrib/tpbat/init.lua
new file mode 100644
index 0000000..d926e8e
--- /dev/null
+++ b/.config/awesome/lain/widget/contrib/tpbat/init.lua
@@ -0,0 +1,161 @@
+--[[
+
+ tpbat.lua
+ Battery status widget for ThinkPad laptops that use SMAPI
+ lain.widget.contrib.tpbat
+
+ More on tp_smapi: http://www.thinkwiki.org/wiki/Tp_smapi
+
+ Licensed under GNU General Public License v2
+ * (c) 2013, Conor Heine
+ * (c) 2013, Luke Bonham
+ * (c) 2010-2012, Peter Hofmann
+
+--]]
+
+local debug = { getinfo = debug.getinfo }
+local newtimer = require("lain.helpers").newtimer
+local first_line = require("lain.helpers").first_line
+local naughty = require("naughty")
+local wibox = require("wibox")
+local string = { format = string.format }
+local math = { floor = math.floor }
+local tostring = tostring
+local setmetatable = setmetatable
+package.path = debug.getinfo(1,"S").source:match[[^@?(.*[\/])[^\/]-$]] .. "?.lua;" .. package.path
+local smapi = require("smapi")
+
+-- ThinkPad SMAPI-enabled battery info widget
+-- lain.widget.contrib.tpbat
+local tpbat = {}
+
+function tpbat.hide()
+ if not tpbat.notification then return end
+ naughty.destroy(tpbat.notification)
+ tpbat.notification = nil
+end
+
+function tpbat.show(t_out)
+ tpbat.hide()
+
+ local bat = tpbat.bat
+
+ if bat == nil or not bat:installed() then return end
+
+ local t_out = t_out or 0
+ local mfgr = bat:get('manufacturer') or "no_mfgr"
+ local model = bat:get('model') or "no_model"
+ local chem = bat:get('chemistry') or "no_chem"
+ local status = bat:get('state') or "nil"
+ local time = bat:remaining_time()
+ local msg = "\t"
+
+ if status ~= "idle" and status ~= "nil" then
+ if time == "N/A" then
+ msg = "...Calculating time remaining..."
+ else
+ msg = time .. (status == "charging" and " until charged" or " remaining")
+ end
+ else
+ msg = "On AC Power"
+ end
+
+ local str = string.format("%s : %s %s (%s)\n", bat.name, mfgr, model, chem)
+ .. string.format("\n%s \t\t\t %s", status:upper(), msg)
+
+ tpbat.notification = naughty.notify({
+ text = str,
+ timeout = t_out,
+ screen = client.focus and client.focus.screen or 1
+ })
+end
+
+function tpbat.register(args)
+ local args = args or {}
+ local timeout = args.timeout or 30
+ local battery = args.battery or "BAT0"
+ local settings = args.settings or function() end
+
+ tpbat.bat = smapi:battery(battery) -- Create a new battery
+ local bat = tpbat.bat
+
+ tpbat.widget = wibox.widget.textbox()
+
+ bat_notification_low_preset = {
+ title = "Battery low",
+ text = "Plug the cable!",
+ timeout = 15,
+ fg = "#202020",
+ bg = "#CDCDCD"
+ }
+
+ bat_notification_critical_preset = {
+ title = "Battery exhausted",
+ text = "Shutdown imminent",
+ timeout = 15,
+ fg = "#000000",
+ bg = "#FFFFFF"
+ }
+
+ if bat:get('state') == nil
+ then
+ local n = naughty.notify({
+ preset = bat_notification_low_preset,
+ title = "SMAPI Battery Warning: Unable to read battery state!",
+ text = "This widget is intended for ThinkPads. Is tp_smapi installed? Check your configs & paths.",
+ screen = client.focus and client.focus.screen or 1
+ })
+ end
+
+ function tpbat.update()
+ bat_now = {
+ status = "Not present",
+ perc = "N/A",
+ time = "N/A",
+ watt = "N/A"
+ }
+
+ if bat:installed()
+ then
+ bat_now.status = bat:status() or "N/A"
+ bat_now.perc = bat:percent()
+ bat_now.time = bat:remaining_time()
+ -- bat_now.watt = string.format("%.2fW", (VOLTS * AMPS) / 1e12)
+
+ -- notifications for low and critical states (when discharging)
+ if bat_now.status == "discharging"
+ then
+ if bat_now.perc <= 5
+ then
+ tpbat.id = naughty.notify({
+ preset = bat_notification_critical_preset,
+ replaces_id = tpbat.id,
+ screen = client.focus and client.focus.screen or 1
+ }).id
+ elseif bat_now.perc <= 15
+ then
+ tpbat.id = naughty.notify({
+ preset = bat_notification_low_preset,
+ replaces_id = tpbat.id,
+ screen = client.focus and client.focus.screen or 1
+ }).id
+ end
+ end
+
+ bat_now.perc = tostring(bat_now.perc)
+ end
+
+ widget = tpbat.widget
+
+ settings()
+ end
+
+ newtimer("tpbat-" .. bat.name, timeout, tpbat.update)
+
+ widget:connect_signal('mouse::enter', function () tpbat.show() end)
+ widget:connect_signal('mouse::leave', function () tpbat.hide() end)
+
+ return tpbat
+end
+
+return setmetatable(tpbat, { __call = function(_, ...) return tpbat.register(...) end })
diff --git a/.config/awesome/lain/widget/contrib/tpbat/smapi.lua b/.config/awesome/lain/widget/contrib/tpbat/smapi.lua
new file mode 100644
index 0000000..a8867e4
--- /dev/null
+++ b/.config/awesome/lain/widget/contrib/tpbat/smapi.lua
@@ -0,0 +1,98 @@
+--[[
+
+ smapi.lua
+ Interface with thinkpad battery information
+
+ Licensed under GNU General Public License v2
+ * (c) 2013, Conor Heine
+
+--]]
+
+local first_line = require("lain.helpers").first_line
+
+local string = { format = string.format }
+local tonumber = tonumber
+local setmetatable = setmetatable
+
+local smapi = {}
+local apipath = "/sys/devices/platform/smapi"
+
+-- Most are readable values, but some can be written to (not implemented, yet?)
+local readable = {
+ barcoding = true,
+ charging_max_current = true,
+ charging_max_voltage = true,
+ chemistry = true,
+ current_avg = true,
+ current_now = true,
+ cycle_count = true,
+ design_capacity = true,
+ design_voltage = true,
+ dump = true,
+ first_use_date = true,
+ force_discharge = false,
+ group0_voltage = true,
+ group1_voltage = true,
+ group2_voltage = true,
+ group3_voltage = true,
+ inhibit_charge_minutes = false,
+ installed = true,
+ last_full_capacity = true,
+ manufacture_date = true,
+ manufacturer = true,
+ model = true,
+ power_avg = true,
+ power_now = true,
+ remaining_capacity = true,
+ remaining_charging_time = true,
+ remaining_percent = true,
+ remaining_percent_error = true,
+ remaining_running_time = true,
+ remaining_running_time_now = true,
+ serial = true,
+ start_charge_thresh = false,
+ state = true,
+ stop_charge_thresh = false,
+ temperature = true,
+ voltage = true
+}
+
+function smapi:battery(name)
+ local bat = {}
+
+ bat.name = name
+ bat.path = apipath .. "/" .. name
+
+ function bat:get(item)
+ return self.path ~= nil and readable[item] and first_line(self.path .. "/" .. item) or nil
+ end
+
+ function bat:installed()
+ return self:get("installed") == "1"
+ end
+
+ function bat:status()
+ return self:get('state')
+ end
+
+ -- Remaining time can either be time until battery dies or time until charging completes
+ function bat:remaining_time()
+ local time_val = bat_now.status == 'discharging' and 'remaining_running_time' or 'remaining_charging_time'
+ local mins_left = self:get(time_val)
+
+ if not mins_left:find("^%d+") then return "N/A" end
+
+ local hrs = math.floor(mins_left / 60)
+ local min = mins_left % 60
+
+ return string.format("%02d:%02d", hrs, min)
+ end
+
+ function bat:percent()
+ return tonumber(self:get("remaining_percent"))
+ end
+
+ return setmetatable(bat, {__metatable = false, __newindex = false})
+end
+
+return smapi
diff --git a/.config/awesome/lain/widget/cpu.lua b/.config/awesome/lain/widget/cpu.lua
old mode 100755
new mode 100644
index 81638c2..b6ecb9c
--- a/.config/awesome/lain/widget/cpu.lua
+++ b/.config/awesome/lain/widget/cpu.lua
@@ -1,15 +1,16 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
local helpers = require("lain.helpers")
local wibox = require("wibox")
-local math = math
-local string = string
+local math = { ceil = math.ceil }
+local string = { format = string.format,
+ gmatch = string.gmatch }
local tostring = tostring
-- CPU usage
diff --git a/.config/awesome/lain/widget/fs.lua b/.config/awesome/lain/widget/fs.lua
old mode 100755
new mode 100644
index d1b7a97..09e2ef5
--- a/.config/awesome/lain/widget/fs.lua
+++ b/.config/awesome/lain/widget/fs.lua
@@ -1,38 +1,23 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2018, Uli Schlacter
- * (c) 2018, Otto Modinos
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
--]]
-local helpers = require("lain.helpers")
-local Gio = require("lgi").Gio
-local focused = require("awful.screen").focused
-local wibox = require("wibox")
-local naughty = require("naughty")
-local math = math
-local string = string
-local tconcat = table.concat
-local tonumber = tonumber
-local query_size = Gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE
-local query_free = Gio.FILE_ATTRIBUTE_FILESYSTEM_FREE
-local query_used = Gio.FILE_ATTRIBUTE_FILESYSTEM_USED
-local query = query_size .. "," .. query_free .. "," .. query_used
+local helpers = require("lain.helpers")
+local shell = require("awful.util").shell
+local focused = require("awful.screen").focused
+local wibox = require("wibox")
+local naughty = require("naughty")
+local string = string
+local tonumber = tonumber
--- File systems info
+-- File system disk space usage
-- lain.widget.fs
local function factory(args)
- local fs = {
- widget = wibox.widget.textbox(),
- units = {
- [1] = "Kb", [2] = "Mb", [3] = "Gb",
- [4] = "Tb", [5] = "Pb", [6] = "Eb",
- [7] = "Zb", [8] = "Yb"
- }
- }
+ local fs = { unit = { ["mb"] = 1024, ["gb"] = 1024^2 }, widget = wibox.widget.textbox() }
function fs.hide()
if not fs.notification then return end
@@ -41,21 +26,29 @@ local function factory(args)
end
function fs.show(seconds, scr)
- fs.hide(); fs.update()
- fs.notification_preset.screen = fs.followtag and focused() or scr or 1
- fs.notification = naughty.notify {
+ fs.update()
+ fs.hide()
+
+ if fs.followtag then
+ fs.notification_preset.screen = focused()
+ else
+ fs.notification_preset.screen = scr or 1
+ end
+
+ fs.notification = naughty.notify({
preset = fs.notification_preset,
timeout = seconds or 5
- }
+ })
end
- local args = args or {}
- local timeout = args.timeout or 600
- local partition = args.partition
- local threshold = args.threshold or 99
- local showpopup = args.showpopup or "on"
- local settings = args.settings or function() end
+ local args = args or {}
+ local timeout = args.timeout or 600
+ local partition = args.partition or "/"
+ local showpopup = args.showpopup or "on"
+ local notify = args.notify or "on"
+ local settings = args.settings or function() end
+ fs.options = args.options
fs.followtag = args.followtag or false
fs.notification_preset = args.notification_preset
@@ -67,67 +60,54 @@ local function factory(args)
}
end
+ helpers.set_map(partition, false)
+
function fs.update()
- local notifytable = { [1] = string.format("%-10s %-5s %s\t%s\t\n", "path", "used", "free", "size") }
- local pathlen = 10
- fs_now = {}
+ fs_info, fs_now = {}, {}
+ helpers.async({ shell, "-c", "/usr/bin/env LC_ALL=C df -k --output=target,size,used,avail,pcent" }, function(f)
+ for line in string.gmatch(f, "\n[^\n]+") do
+ local m,s,u,a,p = string.match(line, "(/.-%s).-(%d+).-(%d+).-(%d+).-([%d]+)%%")
+ m = m:gsub(" ", "") -- clean target from any whitespace
- for _, mount in ipairs(Gio.unix_mounts_get()) do
- local path = Gio.unix_mount_get_mount_path(mount)
- local root = Gio.File.new_for_path(path)
- local info = root:query_filesystem_info(query)
-
- if info then
- local size = info:get_attribute_uint64(query_size)
- local used = info:get_attribute_uint64(query_used)
- local free = info:get_attribute_uint64(query_free)
-
- if size > 0 then
- local units = math.floor(math.log(size)/math.log(1024))
-
- fs_now[path] = {
- units = fs.units[units],
- percentage = math.floor(100 * used / size), -- used percentage
- size = size / math.pow(1024, math.floor(units)),
- used = used / math.pow(1024, math.floor(units)),
- free = free / math.pow(1024, math.floor(units))
- }
-
- if fs_now[path].percentage > 0 then -- don't notify unused file systems
- notifytable[#notifytable+1] = string.format("\n%-10s %-5s %.2f\t%.2f\t%s", path,
- fs_now[path].percentage .. "%", fs_now[path].free, fs_now[path].size,
- fs_now[path].units)
-
- pathlen = math.max(pathlen, #path)
- end
- end
+ fs_info[m .. " size_mb"] = string.format("%.1f", tonumber(s) / fs.unit["mb"])
+ fs_info[m .. " size_gb"] = string.format("%.1f", tonumber(s) / fs.unit["gb"])
+ fs_info[m .. " used_mb"] = string.format("%.1f", tonumber(u) / fs.unit["mb"])
+ fs_info[m .. " used_gb"] = string.format("%.1f", tonumber(u) / fs.unit["gb"])
+ fs_info[m .. " used_p"] = p
+ fs_info[m .. " avail_mb"] = string.format("%.1f", tonumber(a) / fs.unit["mb"])
+ fs_info[m .. " avail_gb"] = string.format("%.1f", tonumber(a) / fs.unit["gb"])
+ fs_info[m .. " avail_p"] = string.format("%d", 100 - tonumber(p))
end
- end
- widget = fs.widget
- settings()
+ fs_now.size_mb = fs_info[partition .. " size_mb"] or "N/A"
+ fs_now.size_gb = fs_info[partition .. " size_gb"] or "N/A"
+ fs_now.used = fs_info[partition .. " used_p"] or "N/A"
+ fs_now.used_mb = fs_info[partition .. " used_mb"] or "N/A"
+ fs_now.used_gb = fs_info[partition .. " used_gb"] or "N/A"
+ fs_now.available = fs_info[partition .. " avail_p"] or "N/A"
+ fs_now.available_mb = fs_info[partition .. " avail_mb"] or "N/A"
+ fs_now.available_gb = fs_info[partition .. " avail_gb"] or "N/A"
- if partition and fs_now[partition] and fs_now[partition].percentage >= threshold then
- if not helpers.get_map(partition) then
- naughty.notify {
+ notification_preset = fs.notification_preset
+ widget = fs.widget
+ settings()
+
+ if notify == "on" and tonumber(fs_now.used) and tonumber(fs_now.used) >= 99 and not helpers.get_map(partition) then
+ naughty.notify({
preset = naughty.config.presets.critical,
title = "Warning",
- text = string.format("%s is above %d%% (%d%%)", partition, threshold, fs_now[partition].percentage)
- }
+ text = partition .. " is full",
+ })
helpers.set_map(partition, true)
else
helpers.set_map(partition, false)
end
- end
+ end)
- if pathlen > 10 then -- formatting aesthetics
- for i = 1, #notifytable do
- local pathspaces = notifytable[i]:match("/%w*[/%w*]*%s*") or notifytable[i]:match("path%s*")
- notifytable[i] = notifytable[i]:gsub(pathspaces, pathspaces .. string.rep(" ", pathlen - 10) .. "\t")
- end
- end
-
- fs.notification_preset.text = tconcat(notifytable)
+ local notifycmd = (fs.options and string.format("dfs %s", fs.options)) or "dfs"
+ helpers.async(helpers.scripts_dir .. notifycmd, function(ws)
+ fs.notification_preset.text = ws:gsub("\n*$", "")
+ end)
end
if showpopup == "on" then
@@ -135,7 +115,7 @@ local function factory(args)
fs.widget:connect_signal('mouse::leave', function () fs.hide() end)
end
- helpers.newtimer(partition or "fs", timeout, fs.update)
+ helpers.newtimer(partition, timeout, fs.update)
return fs
end
diff --git a/.config/awesome/lain/widget/imap.lua b/.config/awesome/lain/widget/imap.lua
old mode 100755
new mode 100644
index b3d9dc7..02561e6
--- a/.config/awesome/lain/widget/imap.lua
+++ b/.config/awesome/lain/widget/imap.lua
@@ -1,15 +1,15 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
--]]
local helpers = require("lain.helpers")
local naughty = require("naughty")
local wibox = require("wibox")
-local awful = require("awful")
-local string = string
+local string = { format = string.format,
+ gsub = string.gsub }
local type = type
local tonumber = tonumber
@@ -17,75 +17,66 @@ local tonumber = tonumber
-- lain.widget.imap
local function factory(args)
- local imap = { widget = wibox.widget.textbox() }
- local args = args or {}
- local server = args.server
- local mail = args.mail
- local password = args.password
- local port = args.port or 993
- local timeout = args.timeout or 60
- local pwdtimeout = args.pwdtimeout or 10
- local is_plain = args.is_plain or false
- local followtag = args.followtag or false
- local notify = args.notify or "on"
- local settings = args.settings or function() end
+ local imap = { widget = wibox.widget.textbox() }
+ local args = args or {}
+ local server = args.server
+ local mail = args.mail
+ local password = args.password
+ local port = args.port or 993
+ local timeout = args.timeout or 60
+ local is_plain = args.is_plain or false
+ local followtag = args.followtag or false
+ local notify = args.notify or "on"
+ local settings = args.settings or function() end
local head_command = "curl --connect-timeout 3 -fsm 3"
- local request = "-X 'STATUS INBOX (MESSAGES RECENT UNSEEN)'"
+ local request = "-X 'SEARCH (UNSEEN)'"
if not server or not mail or not password then return end
- mail_notification_preset = {
- icon = helpers.icons_dir .. "mail.png",
- position = "top_left"
- }
-
helpers.set_map(mail, 0)
if not is_plain then
if type(password) == "string" or type(password) == "table" then
helpers.async(password, function(f) password = f:gsub("\n", "") end)
elseif type(password) == "function" then
- imap.pwdtimer = helpers.newtimer(mail .. "-password", pwdtimeout, function()
- local retrieved_password, try_again = password()
- if not try_again then
- imap.pwdtimer:stop() -- stop trying to retrieve
- password = retrieved_password or "" -- failsafe
- end
- end, true, true)
+ local p = password()
end
end
- function imap.update()
- -- do not update if the password has not been retrieved yet
- if type(password) ~= "string" then return end
+ function update()
+ mail_notification_preset = {
+ icon = helpers.icons_dir .. "mail.png",
+ position = "top_left"
+ }
- local curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:'%s' %s -k",
- head_command, server, port, mail, password, request)
+ if followtag then
+ mail_notification_preset.screen = awful.screen.focused()
+ end
+
+ curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:%q %s -k",
+ head_command, server, port, mail, password, request)
helpers.async(curl, function(f)
- imap_now = { ["MESSAGES"] = 0, ["RECENT"] = 0, ["UNSEEN"] = 0 }
-
- for s,d in f:gmatch("(%w+)%s+(%d+)") do imap_now[s] = tonumber(d) end
- mailcount = imap_now["UNSEEN"] -- backwards compatibility
+ _, mailcount = string.gsub(f, "%d+", "")
widget = imap.widget
-
settings()
- if notify == "on" and mailcount and mailcount >= 1 and mailcount > helpers.get_map(mail) then
- if followtag then mail_notification_preset.screen = awful.screen.focused() end
- naughty.notify {
- preset = mail_notification_preset,
- text = string.format("%s has %d new message%s", mail, mailcount, mailcount == 1 and "" or "s")
- }
+ if notify == "on" and mailcount >= 1 and mailcount > helpers.get_map(mail) then
+ if mailcount == 1 then
+ nt = mail .. " has one new message"
+ else
+ nt = mail .. " has " .. mailcount .. " new messages"
+ end
+ naughty.notify { preset = mail_notification_preset, text = nt }
end
- helpers.set_map(mail, imap_now["UNSEEN"])
+ helpers.set_map(mail, mailcount)
end)
end
- imap.timer = helpers.newtimer(mail, timeout, imap.update, true, true)
+ imap.timer = helpers.newtimer(mail, timeout, update, true, true)
return imap
end
diff --git a/.config/awesome/lain/widget/init.lua b/.config/awesome/lain/widget/init.lua
old mode 100755
new mode 100644
index 57b86bb..e3315d4
--- a/.config/awesome/lain/widget/init.lua
+++ b/.config/awesome/lain/widget/init.lua
@@ -6,7 +6,7 @@
Widgets section
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
diff --git a/.config/awesome/lain/widget/mem.lua b/.config/awesome/lain/widget/mem.lua
old mode 100755
new mode 100644
index 3dcae2b..fa2c364
--- a/.config/awesome/lain/widget/mem.lua
+++ b/.config/awesome/lain/widget/mem.lua
@@ -1,7 +1,7 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
diff --git a/.config/awesome/lain/widget/mpd.lua b/.config/awesome/lain/widget/mpd.lua
old mode 100755
new mode 100644
index 01f28e6..38c49dd
--- a/.config/awesome/lain/widget/mpd.lua
+++ b/.config/awesome/lain/widget/mpd.lua
@@ -1,19 +1,21 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010, Adrian C.
--]]
-local helpers = require("lain.helpers")
-local shell = require("awful.util").shell
-local escape_f = require("awful.util").escape
-local focused = require("awful.screen").focused
-local naughty = require("naughty")
-local wibox = require("wibox")
-local os = os
-local string = string
+local helpers = require("lain.helpers")
+local shell = require("awful.util").shell
+local escape_f = require("awful.util").escape
+local focused = require("awful.screen").focused
+local naughty = require("naughty")
+local wibox = require("wibox")
+local os = { getenv = os.getenv }
+local string = { format = string.format,
+ gmatch = string.gmatch,
+ match = string.match }
-- MPD infos
-- lain.widget.mpd
diff --git a/.config/awesome/lain/widget/net.lua b/.config/awesome/lain/widget/net.lua
old mode 100755
new mode 100644
index 805b577..a72fc3d
--- a/.config/awesome/lain/widget/net.lua
+++ b/.config/awesome/lain/widget/net.lua
@@ -1,7 +1,7 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
@@ -9,29 +9,28 @@
local helpers = require("lain.helpers")
local naughty = require("naughty")
local wibox = require("wibox")
-local string = string
+local string = { format = string.format, match = string.match }
-- Network infos
-- lain.widget.net
local function factory(args)
- local net = { widget = wibox.widget.textbox(), devices = {} }
- local args = args or {}
- local timeout = args.timeout or 2
- local units = args.units or 1024 -- KB
- local notify = args.notify or "on"
- local wifi_state = args.wifi_state or "off"
- local eth_state = args.eth_state or "off"
- local screen = args.screen or 1
- local settings = args.settings or function() end
+ local net = { widget = wibox.widget.textbox(), devices = {} }
+ local args = args or {}
+ local timeout = args.timeout or 2
+ local units = args.units or 1024 -- KB
+ local notify = args.notify or "on"
+ local screen = args.screen or 1
+ local settings = args.settings or function() end
-- Compatibility with old API where iface was a string corresponding to 1 interface
net.iface = (args.iface and (type(args.iface) == "string" and {args.iface}) or
(type(args.iface) == "table" and args.iface)) or {}
function net.get_device()
- helpers.line_callback("ip link", function(line)
- net.iface[#net.iface + 1] = not string.match(line, "LOOPBACK") and string.match(line, "(%w+): <") or nil
+ helpers.async(string.format("ip link show", device_cmd), function(ws)
+ ws = ws:match("(%w+): ")
+ net.iface = ws and { ws } or {}
end)
end
@@ -46,7 +45,7 @@ local function factory(args)
received = 0
}
- for _, dev in ipairs(net.iface) do
+ for i, dev in ipairs(net.iface) do
local dev_now = {}
local dev_before = net.devices[dev] or { last_t = 0, last_r = 0 }
local now_t = tonumber(helpers.first_line(string.format("/sys/class/net/%s/statistics/tx_bytes", dev)) or 0)
@@ -67,18 +66,9 @@ local function factory(args)
dev_now.last_t = now_t
dev_now.last_r = now_r
- if wifi_state == "on" and helpers.first_line(string.format("/sys/class/net/%s/uevent", dev)) == "DEVTYPE=wlan" and string.match(dev_now.carrier, "1") then
- dev_now.wifi = true
- dev_now.signal = tonumber(string.match(helpers.lines_from("/proc/net/wireless")[3], "(%-%d+%.)")) or nil
- end
-
- if eth_state == "on" and helpers.first_line(string.format("/sys/class/net/%s/uevent", dev)) ~= "DEVTYPE=wlan" and string.match(dev_now.carrier, "1") then
- dev_now.ethernet = true
- end
-
net.devices[dev] = dev_now
- -- Notify only once when connection is lost
+ -- Notify only once when connection is loss
if string.match(dev_now.carrier, "0") and notify == "on" and helpers.get_map(dev) then
naughty.notify {
title = dev,
@@ -94,7 +84,7 @@ local function factory(args)
net_now.carrier = dev_now.carrier
net_now.state = dev_now.state
net_now.devices[dev] = dev_now
- -- net_now.sent and net_now.received will be
+ -- new_now.sent and net_now.received will be
-- the totals across all specified devices
end
diff --git a/.config/awesome/lain/widget/pulse.lua b/.config/awesome/lain/widget/pulse.lua
old mode 100755
new mode 100644
index f63fe55..aa9d58e
--- a/.config/awesome/lain/widget/pulse.lua
+++ b/.config/awesome/lain/widget/pulse.lua
@@ -1,15 +1,17 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2016, Luca CPZ
+ * (c) 2016, Luke Bonham
--]]
local helpers = require("lain.helpers")
local shell = require("awful.util").shell
local wibox = require("wibox")
-local string = string
-local type = type
+local string = { gmatch = string.gmatch,
+ match = string.match,
+ format = string.format }
+local type = type
-- PulseAudio volume
-- lain.widget.pulse
diff --git a/.config/awesome/lain/widget/pulsebar.lua b/.config/awesome/lain/widget/pulsebar.lua
old mode 100755
new mode 100644
index 317468f..7a0a3d4
--- a/.config/awesome/lain/widget/pulsebar.lua
+++ b/.config/awesome/lain/widget/pulsebar.lua
@@ -1,19 +1,21 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2013, Rman
--]]
-local helpers = require("lain.helpers")
-local awful = require("awful")
-local naughty = require("naughty")
-local wibox = require("wibox")
-local math = math
-local string = string
-local type = type
-local tonumber = tonumber
+local helpers = require("lain.helpers")
+local awful = require("awful")
+local naughty = require("naughty")
+local wibox = require("wibox")
+local math = { modf = math.modf }
+local string = { format = string.format,
+ match = string.match,
+ gmatch = string.gmatch,
+ rep = string.rep }
+local type, tonumber = type, tonumber
-- PulseAudio volume bar
-- lain.widget.pulsebar
@@ -35,9 +37,7 @@ local function factory(args)
local timeout = args.timeout or 5
local settings = args.settings or function() end
local width = args.width or 63
- local height = args.height or 1
- local margins = args.margins or 1
- local paddings = args.paddings or 1
+ local height = args.heigth or 1
local ticks = args.ticks or false
local ticks_size = args.ticks_size or 7
@@ -54,12 +54,12 @@ local function factory(args)
end
pulsebar.bar = wibox.widget {
- color = pulsebar.colors.unmute,
- background_color = pulsebar.colors.background,
forced_height = height,
forced_width = width,
- margins = margins,
- paddings = paddings,
+ color = pulsebar.colors.unmute,
+ background_color = pulsebar.colors.background,
+ margins = 1,
+ paddings = 1,
ticks = ticks,
ticks_size = ticks_size,
widget = wibox.widget.progressbar,
@@ -123,23 +123,9 @@ local function factory(args)
preset.title = preset.title .. " muted"
end
- -- tot is the maximum number of ticks to display in the notification
- -- fallback: default horizontal wibox height
- local wib, tot = awful.screen.focused().mywibox, 20
-
- -- if we can grab mywibox, tot is defined as its height if
- -- horizontal, or width otherwise
- if wib then
- if wib.position == "left" or wib.position == "right" then
- tot = wib.width
- else
- tot = wib.height
- end
- end
-
- int = math.modf((pulsebar._current_level / 100) * tot)
+ int = math.modf((pulsebar._current_level / 100) * awful.screen.focused().mywibox.height)
preset.text = string.format("[%s%s]", string.rep("|", int),
- string.rep(" ", tot - int))
+ string.rep(" ", awful.screen.focused().mywibox.height - int))
if pulsebar.followtag then preset.screen = awful.screen.focused() end
diff --git a/.config/awesome/lain/widget/sysload.lua b/.config/awesome/lain/widget/sysload.lua
old mode 100755
new mode 100644
index adf3e03..98c0ff7
--- a/.config/awesome/lain/widget/sysload.lua
+++ b/.config/awesome/lain/widget/sysload.lua
@@ -1,7 +1,7 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]
diff --git a/.config/awesome/lain/widget/temp.lua b/.config/awesome/lain/widget/temp.lua
old mode 100755
new mode 100644
index 3c93252..cc9f056
--- a/.config/awesome/lain/widget/temp.lua
+++ b/.config/awesome/lain/widget/temp.lua
@@ -1,7 +1,7 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2013, Luca CPZ
+ * (c) 2013, Luke Bonham
--]]
diff --git a/.config/awesome/lain/widget/weather.lua b/.config/awesome/lain/widget/weather.lua
old mode 100755
new mode 100644
index f35ca68..7bf1d76
--- a/.config/awesome/lain/widget/weather.lua
+++ b/.config/awesome/lain/widget/weather.lua
@@ -1,7 +1,7 @@
--[[
Licensed under GNU General Public License v2
- * (c) 2015, Luca CPZ
+ * (c) 2015, Luke Bonham
--]]
@@ -10,10 +10,8 @@ local json = require("lain.util").dkjson
local focused = require("awful.screen").focused
local naughty = require("naughty")
local wibox = require("wibox")
-local math = math
-local os = os
-local string = string
-local tonumber = tonumber
+
+local math, os, string, tonumber = math, os, string, tonumber
-- OpenWeatherMap
-- current weather and X-days forecast
@@ -22,13 +20,14 @@ local tonumber = tonumber
local function factory(args)
local weather = { widget = wibox.widget.textbox() }
local args = args or {}
- local APPID = args.APPID or "3e321f9414eaedbfab34983bda77a66e" -- lain's default
+ local APPID = args.APPID or "3e321f9414eaedbfab34983bda77a66e" -- lain default
local timeout = args.timeout or 60 * 15 -- 15 min
local timeout_forecast = args.timeout or 60 * 60 * 24 -- 24 hrs
local current_call = args.current_call or "curl -s 'http://api.openweathermap.org/data/2.5/weather?id=%s&units=%s&lang=%s&APPID=%s'"
local forecast_call = args.forecast_call or "curl -s 'http://api.openweathermap.org/data/2.5/forecast/daily?id=%s&units=%s&lang=%s&cnt=%s&APPID=%s'"
local city_id = args.city_id or 0 -- placeholder
- local units = args.units or "metric"
+-- local units = args.units or "metric"
+ local units = args.units or "imperial"
local lang = args.lang or "en"
local cnt = args.cnt or 5
local date_cmd = args.date_cmd or "date -u -d @%d +'%%a %%d'"
@@ -116,18 +115,22 @@ local function factory(args)
local sunrise = tonumber(weather_now["sys"]["sunrise"])
local sunset = tonumber(weather_now["sys"]["sunset"])
local icon = weather_now["weather"][1]["icon"]
- local loc_now = os.time() -- local time
- local loc_m = os.time { year = os.date("%Y"), month = os.date("%m"), day = os.date("%d"), hour = 0 } -- local time from midnight
- local loc_d = os.date("*t", loc_now) -- table YMDHMS for current local time (for TZ calculation)
- local utc_d = os.date("!*t", loc_now) -- table YMDHMS for current UTC time
- local utc_now = os.time(utc_d) -- UTC time now
- local offdt = (loc_d.isdst and 1 or 0) * 3600 + 100 * (loc_d.min - utc_d.min) / 60 -- DST offset
- local offset = os.difftime(loc_now, utc_now) + (loc_d.isdst and 1 or 0) * 3600 + 100 * (loc_d.min - utc_d.min) / 60 -- TZ offset (including DST)
- local offday = (offset < 0 and -86400) or 86400 -- 24 hour correction value (+86400 or -86400)
+ local loc_now = os.time()
+ local loc_m = os.time { year = os.date("%Y"), month = os.date("%m"), day = os.date("%d"), hour = 0 }
+ local loc_t = os.difftime(loc_now, loc_m)
+ local loc_d = os.date("*t", loc_now)
+ local utc_d = os.date("!*t", loc_now)
+ local utc_now = os.time(utc_d)
+ local offdt = (loc_d.isdst and 1 or 0) * 3600 + 100 * (loc_d.min - utc_d.min) / 60
+ local offset = os.difftime(loc_now, utc_now) + offdt
+ local offday = (offset < 0 and -86400) or 86400
- -- if current UTC time is earlier then local midnight -> positive offset (negative otherwise)
- if offset * (loc_m - utc_now + offdt) > 0 then
- sunrise = sunrise + offday -- Shift sunset and sunrise times by 24 hours
+ if math.abs(loc_now - utc_now - offdt + loc_t) >= 86400 then
+ utc_now = utc_now + offday
+ end
+
+ if offday * (loc_now - utc_now - offdt) > 0 then
+ sunrise = sunrise + offday
sunset = sunset + offday
end
diff --git a/.config/awesome/lain/wiki/Home.md b/.config/awesome/lain/wiki/Home.md
old mode 100755
new mode 100644
index d098efe..6967e69
--- a/.config/awesome/lain/wiki/Home.md
+++ b/.config/awesome/lain/wiki/Home.md
@@ -1,16 +1,13 @@
Welcome to the Lain wiki!
-If you spot a typo or have a suggestion to improve these pages, please notify me opening an [issue](https://github.com/lcpz/lain/issues) format. Thank you.
+If you spot a typo or have a suggestion, please notify me opening an [issue](https://github.com/copycat-killer/lain/issues) format. Thank you.
-Dependencies
+Dependency
------------
Package | Requested by | Reasons of choice
--- | --- | ---
[curl](https://curl.haxx.se) | `imap`, `mpd`, and `weather` widgets | 1. faster and simpler to use than [LuaSocket](https://github.com/diegonehab/luasocket); 2. it's in the core of almost every distro; 3. can be called [asynchronously](https://awesomewm.org/doc/api/libraries/awful.spawn.html#easy_async)
-GLib >= 2.54 | `fs` widget | Pure Awesome/Lua implementation.
-
-The second dependency will be removed once all major distros update their Gio/Glib versions.
Installation
------------
@@ -22,7 +19,7 @@ Installation
### Other distributions
```shell
-git clone https://github.com/lcpz/lain.git ~/.config/awesome/lain
+git clone https://github.com/copycat-killer/lain.git ~/.config/awesome/lain
```
Also available via [LuaRocks](https://luarocks.org/modules/aajjbb/lain).
@@ -38,6 +35,6 @@ local lain = require("lain")
Then check out the submodules you want:
-- [Layouts](https://github.com/lcpz/lain/wiki/Layouts)
-- [Widgets](https://github.com/lcpz/lain/wiki/Widgets)
-- [Utilities](https://github.com/lcpz/lain/wiki/Utilities)
+- [Layouts](https://github.com/copycat-killer/lain/wiki/Layouts)
+- [Widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
+- [Utilities](https://github.com/copycat-killer/lain/wiki/Utilities)
diff --git a/.config/awesome/lain/wiki/Layouts.md b/.config/awesome/lain/wiki/Layouts.md
old mode 100755
new mode 100644
index 0286d4b..6350cb7
--- a/.config/awesome/lain/wiki/Layouts.md
+++ b/.config/awesome/lain/wiki/Layouts.md
@@ -222,12 +222,12 @@ Following are a couple of `uselesstile` variants that were not part of lain. The
Xmonad-like
-----------
-If you want to have `awful.layout.suit.tile` behave like xmonad, with internal gaps two times wider than external ones, download [this](https://gist.github.com/lcpz/9e56dcfbe66bfe14967c) as `lain/layout/uselesstile`.
+If you want to have `awful.layout.suit.tile` behave like xmonad, with internal gaps two times wider than external ones, download [this](https://gist.github.com/copycat-killer/9e56dcfbe66bfe14967c) as `lain/layout/uselesstile`.
Inverted master
---------------
-Want to invert master window position? Use [this](https://gist.github.com/lcpz/c59dc59c9f99d98218eb) version. You can set `single_gap` with `width` and `height` in your `theme.lua`, in order to define the window geometry when there's only one client, otherwise it goes maximized. An example:
+Want to invert master window position? Use [this](https://gist.github.com/copycat-killer/c59dc59c9f99d98218eb) version. You can set `single_gap` with `width` and `height` in your `theme.lua`, in order to define the window geometry when there's only one client, otherwise it goes maximized. An example:
theme.single_gap = { width = 600, height = 100 }
@@ -246,10 +246,10 @@ theme.layout_centerfair = theme.lain_icons .. "centerfair.png" -- termfair.cen
theme.layout_cascade = theme.lain_icons .. "cascade.png"
theme.layout_cascadetile = theme.lain_icons .. "cascadetile.png" -- cascade.tile
theme.layout_centerwork = theme.lain_icons .. "centerwork.png"
-theme.layout_centerworkh = theme.lain_icons .. "centerworkh.png" -- centerwork.horizontal
+theme.layout_centerhwork = theme.lain_icons .. "centerworkh.png" -- centerwork.horizontal
```
-Credit goes to [Nicolas Estibals](https://github.com/nestibal) for creating
+Credits go to [Nicolas Estibals](https://github.com/nestibal) for creating
layout icons for default theme.
You can use them as a template for your custom versions.
\ No newline at end of file
diff --git a/.config/awesome/lain/wiki/Utilities.md b/.config/awesome/lain/wiki/Utilities.md
old mode 100755
new mode 100644
index dd54056..5c8cb4e
--- a/.config/awesome/lain/wiki/Utilities.md
+++ b/.config/awesome/lain/wiki/Utilities.md
@@ -40,12 +40,12 @@ Variable | Meaning | Type | Default
`name` | client name | string | "QuakeDD"
`argname` | how to specify client name | string | "-name %s"
`extra` | extra `app` arguments | string | empty string
-`border` | border width | integer | 1
+`border` | border width | number | 1
`visible` | initially visible | boolean | false
`followtag` | always spawn on currently focused screen | boolean | false
`overlap` | Overlap the wibox or not | boolean | false
-`settings` | Additional settings to make on the client | function | `nil`
-`screen` | screen where to spawn the client | integer | `awful.screen.focused()`
+`settings` | Additional settings to make on the client | function | nil
+`screen` | screen where to spawn the client | number | `awful.screen.focused()`
`height` | dropdown client height | float in [0,1] or exact pixels number | 0.25
`width` | dropdown client width | float in [0,1] or exact pixels number | 1
`vert` | vertical position | string, possible values: "top", "bottom", "center" | "top"
@@ -64,10 +64,10 @@ Read [here](https://awesomewm.org/doc/api/classes/client.html#Object_properties)
**Notes**
-* [Does not work](https://github.com/lcpz/lain/issues/358) with `gnome-terminal`, `konsole`, or any other terminal which is strictly designed for a Desktop Environment. Just pick a better terminal, [there's plenty](https://wiki.archlinux.org/index.php/List_of_applications#Terminal_emulators).
-* Set `followtag = true` if [experiencing issues with multiple screens](https://github.com/lcpz/lain/issues/346).
+* [Does not work](https://github.com/copycat-killer/lain/issues/358) with `gnome-terminal`, `konsole`, or any other terminal which is strictly designed for a Desktop Environment. Just pick a better terminal, [there's plenty](https://wiki.archlinux.org/index.php/List_of_applications#Terminal_emulators).
+* Set `followtag = true` if [experiencing issues with multiscreen setups](https://github.com/copycat-killer/lain/issues/346).
* If you have a `awful.client.setslave` rule for your application, ensure you use an exception for `QuakeDD` (or your defined `name`). Otherwise, you may run into problems with focus.
-* If you are using a VTE-based terminal like `termite`, be sure to set [`argname = "--name %s"`](https://github.com/lcpz/lain/issues/211).
+* If you are using a VTE-based terminal like `termite`, be sure to set [`argname = "--name %s"`](https://github.com/copycat-killer/lain/issues/211).
Separators
----------
@@ -170,17 +170,9 @@ Useless gaps resize
Changes `beautiful.useless_gaps` on the fly.
-```lua
-lain.util.useless_gap_resize(thatmuch, s, t)
-```
+The function takes an integer argument, being the amount of pixel to add/remove to gaps.
-The argument `thatmuch` is the number of pixel to add to/substract from gaps (integer).
-
-The arguments `s` and `t` are the `awful.screen` and `awful.tag` in which you want to change the gap. They are optional.
-
-Following are example keybindings for changing client gaps on current screen and tag.
-
-Example 1:
+You could use it with these keybindings:
```lua
-- On the fly useless gaps change
@@ -188,7 +180,7 @@ awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(
awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
```
-where `altkey = Mod1`. Example 2:
+where `altkey = Mod1`, or you could use it like this:
```lua
mywidget:buttons(awful.util.table.join (
@@ -238,7 +230,7 @@ clientkeys = awful.util.table.join(
If you want to "de-magnify" it, just retype the keybinding.
-If you want magnified client to respond to `incmwfact`, read [here](https://github.com/lcpz/lain/issues/195).
+If you want magnified client to respond to `incmwfact`, read [here](https://github.com/copycat-killer/lain/issues/195).
menu\_clients\_current\_tags
----------------------------
@@ -251,88 +243,3 @@ awful.key({ "Mod1" }, "Tab", function()
lain.util.menu_clients_current_tags({ width = 350 }, { keygrabber = true })
end),
```
-
-menu\_iterator
---------------
-
-A generic menu utility which enables iteration over lists of possible
-actions to execute. The perfect example is a menu for choosing what
-configuration to apply to X with `xrandr`, as suggested on the [Awesome wiki page](https://awesomewm.org/recipes/xrandr).
-
-
+
+
+ You can’t perform that action at this time.
+
+
+
+
+
+
+
+
+
+
+
+
+ You signed in with another tab or window. Reload to refresh your session.
+ You signed out in another tab or window. Reload to refresh your session.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Press h to open a hovercard with more details.
+
+
+
+
+
+
diff --git a/.config/awesome/themes/msjche/icons/centerfair.png b/.config/awesome/themes/msjche/icons/centerfair.png
new file mode 100644
index 0000000..185d5e1
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/centerfair.png differ
diff --git a/.config/awesome/themes/msjche/icons/centerwork.png b/.config/awesome/themes/msjche/icons/centerwork.png
new file mode 100644
index 0000000..49d5a11
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/centerwork.png differ
diff --git a/.config/awesome/themes/msjche/icons/disk.png b/.config/awesome/themes/msjche/icons/disk.png
new file mode 100644
index 0000000..3ccd728
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/disk.png differ
diff --git a/.config/awesome/themes/msjche/icons/dwindle.png b/.config/awesome/themes/msjche/icons/dwindle.png
new file mode 100644
index 0000000..55b61b0
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/dwindle.png differ
diff --git a/.config/awesome/themes/msjche/icons/fairh.png b/.config/awesome/themes/msjche/icons/fairh.png
new file mode 100644
index 0000000..848f5a8
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/fairh.png differ
diff --git a/.config/awesome/themes/msjche/icons/fairv.png b/.config/awesome/themes/msjche/icons/fairv.png
new file mode 100644
index 0000000..610eb7b
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/fairv.png differ
diff --git a/.config/awesome/themes/msjche/icons/floating.png b/.config/awesome/themes/msjche/icons/floating.png
new file mode 100644
index 0000000..d8ce00a
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/floating.png differ
diff --git a/.config/awesome/themes/msjche/icons/fullscreen.png b/.config/awesome/themes/msjche/icons/fullscreen.png
new file mode 100644
index 0000000..feb44d1
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/fullscreen.png differ
diff --git a/.config/awesome/themes/msjche/icons/magnifier.png b/.config/awesome/themes/msjche/icons/magnifier.png
new file mode 100644
index 0000000..49616bc
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/magnifier.png differ
diff --git a/.config/awesome/themes/msjche/icons/max.png b/.config/awesome/themes/msjche/icons/max.png
new file mode 100644
index 0000000..3f4bdec
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/max.png differ
diff --git a/.config/awesome/themes/msjche/icons/pause.png b/.config/awesome/themes/msjche/icons/pause.png
new file mode 100644
index 0000000..381e532
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/pause.png differ
diff --git a/.config/awesome/themes/msjche/icons/play.png b/.config/awesome/themes/msjche/icons/play.png
new file mode 100644
index 0000000..05ad253
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/play.png differ
diff --git a/.config/awesome/themes/msjche/icons/spiral.png b/.config/awesome/themes/msjche/icons/spiral.png
new file mode 100644
index 0000000..664afb4
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/spiral.png differ
diff --git a/.config/awesome/themes/msjche/icons/square_sel.png b/.config/awesome/themes/msjche/icons/square_sel.png
new file mode 100644
index 0000000..58b58f2
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/square_sel.png differ
diff --git a/.config/awesome/themes/msjche/icons/square_unsel.png b/.config/awesome/themes/msjche/icons/square_unsel.png
new file mode 100644
index 0000000..40411f4
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/square_unsel.png differ
diff --git a/.config/awesome/themes/msjche/icons/stop.png b/.config/awesome/themes/msjche/icons/stop.png
new file mode 100644
index 0000000..b01b75e
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/stop.png differ
diff --git a/.config/awesome/themes/msjche/icons/submenu.png b/.config/awesome/themes/msjche/icons/submenu.png
new file mode 100644
index 0000000..10ed739
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/submenu.png differ
diff --git a/.config/awesome/themes/msjche/icons/termfair.png b/.config/awesome/themes/msjche/icons/termfair.png
new file mode 100644
index 0000000..9cfb636
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/termfair.png differ
diff --git a/.config/awesome/themes/msjche/icons/tile.png b/.config/awesome/themes/msjche/icons/tile.png
new file mode 100644
index 0000000..890e354
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/tile.png differ
diff --git a/.config/awesome/themes/msjche/icons/tilebottom.png b/.config/awesome/themes/msjche/icons/tilebottom.png
new file mode 100644
index 0000000..aac4302
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/tilebottom.png differ
diff --git a/.config/awesome/themes/msjche/icons/tileleft.png b/.config/awesome/themes/msjche/icons/tileleft.png
new file mode 100644
index 0000000..c87a32f
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/tileleft.png differ
diff --git a/.config/awesome/themes/msjche/icons/tiletop.png b/.config/awesome/themes/msjche/icons/tiletop.png
new file mode 100644
index 0000000..89f7f8d
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/tiletop.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/close_focus.png b/.config/awesome/themes/msjche/icons/titlebar/close_focus.png
new file mode 100644
index 0000000..c1fa3ad
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/close_focus.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/close_normal.png b/.config/awesome/themes/msjche/icons/titlebar/close_normal.png
new file mode 100644
index 0000000..77cd8eb
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/close_normal.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/msjche/icons/titlebar/floating_focus_active.png
new file mode 100644
index 0000000..8fcf336
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/floating_focus_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/floating_focus_inactive.png
new file mode 100644
index 0000000..47f19f6
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/floating_focus_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/msjche/icons/titlebar/floating_normal_active.png
new file mode 100644
index 0000000..df17970
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/floating_normal_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/floating_normal_inactive.png
new file mode 100644
index 0000000..98f7f1d
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/floating_normal_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/msjche/icons/titlebar/maximized_focus_active.png
new file mode 100644
index 0000000..96e8937
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/maximized_focus_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/maximized_focus_inactive.png
new file mode 100644
index 0000000..bce1d00
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/maximized_focus_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/msjche/icons/titlebar/maximized_normal_active.png
new file mode 100644
index 0000000..6ce0b10
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/maximized_normal_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/maximized_normal_inactive.png
new file mode 100644
index 0000000..2e56d32
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/maximized_normal_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/msjche/icons/titlebar/ontop_focus_active.png
new file mode 100644
index 0000000..d206ea4
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/ontop_focus_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/ontop_focus_inactive.png
new file mode 100644
index 0000000..2f3a2be
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/ontop_focus_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/msjche/icons/titlebar/ontop_normal_active.png
new file mode 100644
index 0000000..9a26d34
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/ontop_normal_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/ontop_normal_inactive.png
new file mode 100644
index 0000000..a9a3206
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/ontop_normal_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/msjche/icons/titlebar/sticky_focus_active.png
new file mode 100644
index 0000000..7e360db
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/sticky_focus_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/sticky_focus_inactive.png
new file mode 100644
index 0000000..5493d8e
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/sticky_focus_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/msjche/icons/titlebar/sticky_normal_active.png
new file mode 100644
index 0000000..a06138d
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/sticky_normal_active.png differ
diff --git a/.config/awesome/themes/msjche/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/msjche/icons/titlebar/sticky_normal_inactive.png
new file mode 100644
index 0000000..7e6c99b
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/titlebar/sticky_normal_inactive.png differ
diff --git a/.config/awesome/themes/msjche/icons/vol.png b/.config/awesome/themes/msjche/icons/vol.png
new file mode 100644
index 0000000..847d575
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/vol.png differ
diff --git a/.config/awesome/themes/msjche/icons/vol_low.png b/.config/awesome/themes/msjche/icons/vol_low.png
new file mode 100644
index 0000000..54d653e
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/vol_low.png differ
diff --git a/.config/awesome/themes/msjche/icons/vol_mute.png b/.config/awesome/themes/msjche/icons/vol_mute.png
new file mode 100644
index 0000000..361412d
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/vol_mute.png differ
diff --git a/.config/awesome/themes/msjche/icons/vol_no.png b/.config/awesome/themes/msjche/icons/vol_no.png
new file mode 100644
index 0000000..06d1a97
Binary files /dev/null and b/.config/awesome/themes/msjche/icons/vol_no.png differ
diff --git a/.config/awesome/themes/msjche/theme.lua b/.config/awesome/themes/msjche/theme.lua
new file mode 100644
index 0000000..f5256f6
--- /dev/null
+++ b/.config/awesome/themes/msjche/theme.lua
@@ -0,0 +1,397 @@
+--[[
+
+ Copland Awesome WM theme 2.0
+ github.com/copycat-killer
+
+--]]
+
+local gears = require("gears")
+local lain = require("lain")
+local awful = require("awful")
+local wibox = require("wibox")
+local os = { getenv = os.getenv, setlocale = os.setlocale }
+local awesome, client = awesome, client
+local gpmdp = require("widgets.gpmdp")
+
+local theme = {}
+theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/msjche"
+theme.wallpaper = theme.dir .. "/wall.png"
+theme.font = "Droid Sans 14"
+theme.taglist_font = "Xirod 17"
+theme.fg_normal = "#757575"
+theme.fg_focus = "#7A5ADA"
+theme.bg_normal = "#111111"
+theme.bg_normal = "#11111199"
+theme.bg_focus = "#11111110"
+theme.fg_urgent = "#000000"
+theme.bg_urgent = "#FFFFFF"
+theme.border_width = 1
+theme.border_normal = "#141414"
+--theme.border_focus = "#93B6FF"
+theme.border_focus = "#7A5ADA"
+theme.taglist_fg_focus = "#FFFFFF"
+theme.taglist_bg_focus = "#111111"
+theme.taglist_bg_normal = "#111111"
+theme.titlebar_bg_normal = "#191919"
+theme.titlebar_bg_focus = "#262626"
+theme.menu_height = 25
+theme.menu_width = 250
+theme.tasklist_disable_icon = true
+theme.awesome_icon = theme.dir .."/icons/awesome.png"
+theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
+theme.taglist_squares_sel = theme.dir .. "/icons/square_unsel.png"
+theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
+theme.vol = theme.dir .. "/icons/vol.png"
+theme.vol_low = theme.dir .. "/icons/vol_low.png"
+theme.vol_no = theme.dir .. "/icons/vol_no.png"
+theme.vol_mute = theme.dir .. "/icons/vol_mute.png"
+theme.disk = theme.dir .. "/icons/disk.png"
+theme.ac = theme.dir .. "/icons/ac.png"
+theme.bat = theme.dir .. "/icons/bat.png"
+theme.bat_low = theme.dir .. "/icons/bat_low.png"
+theme.bat_no = theme.dir .. "/icons/bat_no.png"
+theme.play = theme.dir .. "/icons/play.png"
+theme.pause = theme.dir .. "/icons/pause.png"
+theme.stop = theme.dir .. "/icons/stop.png"
+theme.layout_tile = theme.dir .. "/icons/tile.png"
+theme.layout_tileleft = theme.dir .. "/icons/tileleft.png"
+theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png"
+theme.layout_tiletop = theme.dir .. "/icons/tiletop.png"
+theme.layout_fairv = theme.dir .. "/icons/fairv.png"
+theme.layout_fairh = theme.dir .. "/icons/fairh.png"
+theme.layout_spiral = theme.dir .. "/icons/spiral.png"
+theme.layout_dwindle = theme.dir .. "/icons/dwindle.png"
+theme.layout_max = theme.dir .. "/icons/max.png"
+theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png"
+theme.layout_magnifier = theme.dir .. "/icons/magnifier.png"
+theme.layout_floating = theme.dir .. "/icons/floating.png"
+theme.useless_gap = 0
+theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png"
+theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png"
+theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png"
+theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png"
+theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png"
+theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png"
+theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png"
+theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png"
+theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png"
+theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png"
+
+-- lain related
+theme.layout_centerfair = theme.dir .. "/icons/centerfair.png"
+theme.layout_termfair = theme.dir .. "/icons/termfair.png"
+theme.layout_centerwork = theme.dir .. "/icons/centerwork.png"
+
+local markup = lain.util.markup
+local blue = theme.fg_focus
+local red = "#EB8F8F"
+local green = "#8FEB8F"
+local white = theme.fg_normal
+
+local mytextclock = wibox.widget.textclock(markup(blue, " %a") .. markup(white, " %d ") .. markup(blue, "%b ") .. markup(white, "%H:%M "))
+mytextclock.font = theme.font
+
+--uptimewidget = wibox.widget.textbox()
+--vicious.register(uptimewidget, vicious.widgeet.uptime, (markup(blue, "$1") .. markup(white, " D") .. markup(blue, " $2") .. markup(white, " h"))
+
+-- Calendar
+lain.widget.calendar({
+ attach_to = { mytextclock },
+ notification_preset = {
+ font = "Droid Sans Mono 13",
+ fg = white,
+ bg = theme.bg_normal
+}})
+
+-- Launcher
+local mylauncher = awful.widget.button({image = theme.awesome_icon})
+mylauncher:connect_signal("button::press", function() awful.util.mymainmenu:toggle() end)
+-- local mylauncher2 = awful.widget.button({image = theme.awesome_icon})
+-- mylauncher2:connect_signal("button::press", function() awful.util.mymainmenu:toggle() end)
+
+--[[ Mail IMAP check
+-- commented because it needs to be set before use
+local mail = lain.widget.imap({
+ timeout = 180,
+ server = "server",
+ mail = "mail",
+ password = "keyring get mail",
+ settings = function()
+ mail = ""
+ count = ""
+
+ if mailcount > 0 then
+ mail = "Mail "
+ count = mailcount .. " "
+ end
+
+ widget:set_markup(markup(blue, mail) .. count)
+ end
+})
+--]]
+
+-- MPD
+local mpdicon = wibox.widget.imagebox()
+theme.mpd = lain.widget.mpd({
+ settings = function()
+ if mpd_now.state == "play" then
+ title = mpd_now.title
+ artist = " " .. mpd_now.artist .. markup("#333333", " |")
+ mpdicon:set_image(theme.play)
+ elseif mpd_now.state == "pause" then
+ title = "mpd "
+ artist = "paused" .. markup("#333333", " |")
+ mpdicon:set_image(theme.pause)
+ else
+ title = ""
+ artist = ""
+ mpdicon._private.image = nil
+ mpdicon:emit_signal("widget::redraw_needed")
+ mpdicon:emit_signal("widget::layout_changed")
+ end
+
+ widget:set_markup(markup.font(theme.font, markup(blue, title) .. artist))
+ end
+})
+
+-- Battery
+local baticon = wibox.widget.imagebox(theme.bat)
+local batbar = wibox.widget {
+ forced_height = 1,
+ forced_width = 143,
+ color = theme.fg_normal,
+ background_color = theme.bg_normal,
+ margins = 1,
+ paddings = 1,
+ ticks = true,
+ ticks_size = 13,
+ widget = wibox.widget.progressbar,
+}
+local batupd = lain.widget.bat({
+ settings = function()
+ if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end
+
+ if bat_now.status == "Charging" then
+ baticon:set_image(theme.ac)
+ if bat_now.perc >= 98 then
+ batbar:set_color(green)
+ elseif bat_now.perc > 50 then
+ batbar:set_color(theme.fg_normal)
+ elseif bat_now.perc > 15 then
+ batbar:set_color(theme.fg_normal)
+ else
+ batbar:set_color(red)
+ end
+ else
+ if bat_now.perc >= 98 then
+ batbar:set_color(green)
+ elseif bat_now.perc > 50 then
+ batbar:set_color(theme.fg_normal)
+ baticon:set_image(theme.bat)
+ elseif bat_now.perc > 15 then
+ batbar:set_color(theme.fg_normal)
+ baticon:set_image(theme.bat_low)
+ else
+ batbar:set_color(red)
+ baticon:set_image(theme.bat_no)
+ end
+ end
+ batbar:set_value(bat_now.perc / 100)
+ end
+})
+local batbg = wibox.container.background(batbar, "#474747", gears.shape.rectangle)
+local batwidget = wibox.container.margin(batbg, 2, 7, 4, 4)
+
+---- / fs
+--local fsicon = wibox.widget.imagebox(theme.disk)
+--local fsbar = wibox.widget {
+-- forced_height = 1,
+-- forced_width = 143,
+-- color = theme.fg_normal,
+-- background_color = theme.bg_normal,
+-- margins = 1,
+-- paddings = 1,
+-- ticks = true,
+-- ticks_size = 13,
+-- widget = wibox.widget.progressbar,
+--}
+--theme.fs = lain.widget.fs({
+-- partition = "/home",
+---- partition = "/",
+-- options = "--exclude-type=tmpfs",
+-- notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Tamzen 10.5" },
+-- settings = function()
+-- if tonumber(fs_now.used) < 90 then
+-- fsbar:set_color(theme.fg_normal)
+-- else
+-- fsbar:set_color("#EB8F8F")
+-- end
+-- fsbar:set_value(fs_now.used / 100)
+-- end
+--})
+--local fsbg = wibox.container.background(fsbar, "#474747", gears.shape.rectangle)
+--local fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4)
+
+-- ALSA volume bar
+local volicon = wibox.widget.imagebox(theme.vol)
+theme.volume = lain.widget.alsabar({
+ width = 143, border_width = 0, ticks = true, ticks_size = 13,
+ notification_preset = { font = theme.font },
+ --togglechannel = "IEC958,3",
+ settings = function()
+ if volume_now.status == "off" then
+ volicon:set_image(theme.vol_mute)
+ elseif volume_now.level == 0 then
+ volicon:set_image(theme.vol_no)
+ elseif volume_now.level <= 50 then
+ volicon:set_image(theme.vol_low)
+ else
+ volicon:set_image(theme.vol)
+ end
+ end,
+ colors = {
+ background = theme.bg_normal,
+ mute = red,
+ unmute = theme.fg_normal
+ }
+})
+theme.volume.tooltip.wibox.fg = theme.fg_focus
+theme.volume.bar:buttons(awful.util.table.join (
+ awful.button({}, 1, function()
+ awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal))
+ end),
+ awful.button({}, 2, function()
+ awful.spawn(string.format("%s set %s 100%%", theme.volume.cmd, theme.volume.channel))
+ theme.volume.update()
+ end),
+ awful.button({}, 3, function()
+ awful.spawn(string.format("%s set %s toggle", theme.volume.cmd, theme.volume.togglechannel or theme.volume.channel))
+ theme.volume.update()
+ end),
+ awful.button({}, 4, function()
+ awful.spawn(string.format("%s set %s 2%%+", theme.volume.cmd, theme.volume.channel))
+ theme.volume.update()
+ end),
+ awful.button({}, 5, function()
+ awful.spawn(string.format("%s set %s 2%%-", theme.volume.cmd, theme.volume.channel))
+ theme.volume.update()
+ end)
+))
+local volumebg = wibox.container.background(theme.volume.bar, "#474747", gears.shape.rectangle)
+local volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4)
+
+-- Weather
+theme.weather = lain.widget.weather({
+ --city_id = 2643743, -- placeholder (London)
+ city_id = 5570160, -- placeholder (not London)
+})
+
+-- Separators
+local first = wibox.widget.textbox(markup.font("Tamzen 3", " "))
+local spr = wibox.widget.textbox(' ')
+local small_spr = wibox.widget.textbox(markup.font("Tamzen 4", " "))
+local bar_spr = wibox.widget.textbox(markup.font("Tamzen 3", " ") .. markup.fontfg(theme.font, "#333333", "|") .. markup.font("Tamzen 5", " "))
+
+-- Eminent-like task filtering
+local orig_filter = awful.widget.taglist.filter.all
+
+-- Taglist label functions
+awful.widget.taglist.filter.all = function (t, args)
+ if t.selected or #t:clients() > 0 then
+ return orig_filter(t, args)
+ end
+end
+
+function theme.at_screen_connect(s)
+ -- Quake application
+ s.quake = lain.util.quake({ app = awful.util.terminal })
+
+ -- If wallpaper is a function, call it with the screen
+ local wallpaper = theme.wallpaper
+ if type(wallpaper) == "function" then
+ wallpaper = wallpaper(s)
+ end
+ gears.wallpaper.maximized(wallpaper, s, true)
+
+ -- Tag names and layouts
+ --awful.tag(awful.util.tagnames, s, awful.layout.layouts)
+ local names = { "1-WEB", "2-POR", "3-NEW", "4-IRC", "5-MUS", "6-PIR", "7-MOV", "8-GAM", "9-MIS" }
+ local l = awful.layout.suit
+ local layouts = { l.max, l.fair.horizontal, l.spiral, l.corner.se, l.tile.bottom, l.corner.se, l.magnifier, l.floating, l.floating, }
+ awful.tag(names, s, layouts)
+
+ -- Create a promptbox for each screen
+ s.mypromptbox = awful.widget.prompt()
+ -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ s.mylayoutbox = awful.widget.layoutbox(s)
+ s.mylayoutbox:buttons(awful.util.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
+ s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
+
+ -- Create a tasklist widget
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
+
+ -- Create the horizontal wibox
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 28, bg = theme.bg_normal, fg = theme.fg_normal })
+
+ -- Add widgets to the wibox
+ s.mywibox:setup {
+ { -- Top widgets
+ layout = wibox.layout.fixed.vertical,
+ mylauncher,
+ },
+
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ small_spr,
+ s.mylayoutbox,
+ first,
+ bar_spr,
+ s.mytaglist,
+ bar_spr,
+ first,
+ s.mypromptbox,
+ },
+ s.mytasklist, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ bar_spr,
+ wibox.widget.systray(),
+ bar_spr,
+ --mail.widget,
+-- brightness.widget,
+ gpmdp.widget,
+ mpdicon,
+ theme.mpd.widget,
+ baticon,
+ batwidget,
+ --bar_spr,
+ --fsicon,
+ --fswidget,
+ bar_spr,
+ volicon,
+ volumewidget,
+ bar_spr,
+ mytextclock,
+ },
+ }
+
+
+end
+
+return theme
diff --git a/.config/awesome/themes/msjche/wall.png b/.config/awesome/themes/msjche/wall.png
new file mode 100644
index 0000000..76ebf10
Binary files /dev/null and b/.config/awesome/themes/msjche/wall.png differ
diff --git a/.config/awesome/themes/msjche/wall_default.png b/.config/awesome/themes/msjche/wall_default.png
new file mode 100644
index 0000000..aa3ce51
Binary files /dev/null and b/.config/awesome/themes/msjche/wall_default.png differ
diff --git a/.config/awesome/themes/multicolor/icons/ac.png b/.config/awesome/themes/multicolor/icons/ac.png
new file mode 100644
index 0000000..272b832
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/ac.png differ
diff --git a/.config/awesome/themes/multicolor/icons/bat.png b/.config/awesome/themes/multicolor/icons/bat.png
new file mode 100644
index 0000000..bd63927
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/bat.png differ
diff --git a/.config/awesome/themes/multicolor/icons/clock.png b/.config/awesome/themes/multicolor/icons/clock.png
new file mode 100644
index 0000000..22aef71
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/clock.png differ
diff --git a/.config/awesome/themes/multicolor/icons/cpu.png b/.config/awesome/themes/multicolor/icons/cpu.png
new file mode 100644
index 0000000..e3794ca
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/cpu.png differ
diff --git a/.config/awesome/themes/multicolor/icons/dish.png b/.config/awesome/themes/multicolor/icons/dish.png
new file mode 100644
index 0000000..c71499b
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/dish.png differ
diff --git a/.config/awesome/themes/multicolor/icons/dwindle.png b/.config/awesome/themes/multicolor/icons/dwindle.png
new file mode 100644
index 0000000..94d8382
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/dwindle.png differ
diff --git a/.config/awesome/themes/multicolor/icons/fairh.png b/.config/awesome/themes/multicolor/icons/fairh.png
new file mode 100644
index 0000000..4468efc
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fairh.png differ
diff --git a/.config/awesome/themes/multicolor/icons/fairv.png b/.config/awesome/themes/multicolor/icons/fairv.png
new file mode 100644
index 0000000..7c8728e
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fairv.png differ
diff --git a/.config/awesome/themes/multicolor/icons/floating.png b/.config/awesome/themes/multicolor/icons/floating.png
new file mode 100644
index 0000000..7593a2a
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/floating.png differ
diff --git a/.config/awesome/themes/multicolor/icons/fs.png b/.config/awesome/themes/multicolor/icons/fs.png
new file mode 100644
index 0000000..1c1b13e
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fs.png differ
diff --git a/.config/awesome/themes/multicolor/icons/fullscreen.png b/.config/awesome/themes/multicolor/icons/fullscreen.png
new file mode 100644
index 0000000..f63a69c
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fullscreen.png differ
diff --git a/.config/awesome/themes/multicolor/icons/magnifier.png b/.config/awesome/themes/multicolor/icons/magnifier.png
new file mode 100644
index 0000000..8819554
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/magnifier.png differ
diff --git a/.config/awesome/themes/multicolor/icons/mail.png b/.config/awesome/themes/multicolor/icons/mail.png
new file mode 100644
index 0000000..25021f5
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/mail.png differ
diff --git a/.config/awesome/themes/multicolor/icons/max.png b/.config/awesome/themes/multicolor/icons/max.png
new file mode 100644
index 0000000..4b6a8c3
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/max.png differ
diff --git a/.config/awesome/themes/multicolor/icons/mem.png b/.config/awesome/themes/multicolor/icons/mem.png
new file mode 100644
index 0000000..d04ee11
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/mem.png differ
diff --git a/.config/awesome/themes/multicolor/icons/net_down.png b/.config/awesome/themes/multicolor/icons/net_down.png
new file mode 100644
index 0000000..09433b1
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/net_down.png differ
diff --git a/.config/awesome/themes/multicolor/icons/net_up.png b/.config/awesome/themes/multicolor/icons/net_up.png
new file mode 100644
index 0000000..395d014
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/net_up.png differ
diff --git a/.config/awesome/themes/multicolor/icons/note.png b/.config/awesome/themes/multicolor/icons/note.png
new file mode 100644
index 0000000..2f41eb3
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/note.png differ
diff --git a/.config/awesome/themes/multicolor/icons/note_on.png b/.config/awesome/themes/multicolor/icons/note_on.png
new file mode 100755
index 0000000..264d2c8
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/note_on.png differ
diff --git a/.config/awesome/themes/multicolor/icons/spiral.png b/.config/awesome/themes/multicolor/icons/spiral.png
new file mode 100644
index 0000000..6a1ebf1
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/spiral.png differ
diff --git a/.config/awesome/themes/multicolor/icons/spkr.png b/.config/awesome/themes/multicolor/icons/spkr.png
new file mode 100644
index 0000000..80c20b0
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/spkr.png differ
diff --git a/.config/awesome/themes/multicolor/icons/square_a.png b/.config/awesome/themes/multicolor/icons/square_a.png
new file mode 100755
index 0000000..1774d95
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/square_a.png differ
diff --git a/.config/awesome/themes/multicolor/icons/square_b.png b/.config/awesome/themes/multicolor/icons/square_b.png
new file mode 100755
index 0000000..b47e9f3
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/square_b.png differ
diff --git a/.config/awesome/themes/multicolor/icons/submenu.png b/.config/awesome/themes/multicolor/icons/submenu.png
new file mode 100644
index 0000000..7c81cab
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/submenu.png differ
diff --git a/.config/awesome/themes/multicolor/icons/temp.png b/.config/awesome/themes/multicolor/icons/temp.png
new file mode 100755
index 0000000..6c8f8bd
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/temp.png differ
diff --git a/.config/awesome/themes/multicolor/icons/tile.png b/.config/awesome/themes/multicolor/icons/tile.png
new file mode 100644
index 0000000..64103d9
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tile.png differ
diff --git a/.config/awesome/themes/multicolor/icons/tilebottom.png b/.config/awesome/themes/multicolor/icons/tilebottom.png
new file mode 100644
index 0000000..9363636
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tilebottom.png differ
diff --git a/.config/awesome/themes/multicolor/icons/tileleft.png b/.config/awesome/themes/multicolor/icons/tileleft.png
new file mode 100644
index 0000000..9331898
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tileleft.png differ
diff --git a/.config/awesome/themes/multicolor/icons/tiletop.png b/.config/awesome/themes/multicolor/icons/tiletop.png
new file mode 100644
index 0000000..1cef886
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tiletop.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/close_focus.png b/.config/awesome/themes/multicolor/icons/titlebar/close_focus.png
new file mode 100644
index 0000000..cd297db
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/close_focus.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/close_normal.png b/.config/awesome/themes/multicolor/icons/titlebar/close_normal.png
new file mode 100644
index 0000000..5448ed8
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/close_normal.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_active.png
new file mode 100644
index 0000000..ae5a8e2
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_inactive.png
new file mode 100644
index 0000000..c54eb0c
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_active.png
new file mode 100644
index 0000000..62342d1
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_inactive.png
new file mode 100644
index 0000000..e2bbdfa
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_active.png
new file mode 100644
index 0000000..957298b
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_inactive.png
new file mode 100644
index 0000000..1187229
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_active.png
new file mode 100644
index 0000000..a705f81
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_inactive.png
new file mode 100644
index 0000000..4c1ab1f
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/minimize_focus.png b/.config/awesome/themes/multicolor/icons/titlebar/minimize_focus.png
new file mode 100644
index 0000000..bbe8cff
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/minimize_focus.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/minimize_normal.png b/.config/awesome/themes/multicolor/icons/titlebar/minimize_normal.png
new file mode 100644
index 0000000..36621d0
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/minimize_normal.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_active.png
new file mode 100644
index 0000000..25a3080
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_inactive.png
new file mode 100644
index 0000000..d3c077a
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_active.png
new file mode 100644
index 0000000..117a203
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_inactive.png
new file mode 100644
index 0000000..d3a10c8
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_active.png
new file mode 100644
index 0000000..147ce6a
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_inactive.png
new file mode 100644
index 0000000..396628a
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_active.png
new file mode 100644
index 0000000..bdb5595
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_active.png differ
diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_inactive.png
new file mode 100644
index 0000000..a96b9b1
Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_inactive.png differ
diff --git a/.config/awesome/themes/multicolor/theme.lua b/.config/awesome/themes/multicolor/theme.lua
new file mode 100644
index 0000000..b4b050e
--- /dev/null
+++ b/.config/awesome/themes/multicolor/theme.lua
@@ -0,0 +1,343 @@
+--[[
+
+ Multicolor Awesome WM theme 2.0
+ github.com/copycat-killer
+
+--]]
+
+
+local gears = require("gears")
+local lain = require("lain")
+local awful = require("awful")
+local wibox = require("wibox")
+local os = { getenv = os.getenv, setlocale = os.setlocale }
+
+local theme = {}
+theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/multicolor"
+theme.wallpaper = theme.confdir .. "/wall.png"
+theme.font = "xos4 Terminus 8"
+theme.menu_bg_normal = "#000000"
+theme.menu_bg_focus = "#000000"
+theme.bg_normal = "#000000"
+theme.bg_focus = "#000000"
+theme.bg_urgent = "#000000"
+theme.fg_normal = "#aaaaaa"
+theme.fg_focus = "#ff8c00"
+theme.fg_urgent = "#af1d18"
+theme.fg_minimize = "#ffffff"
+theme.border_width = 1
+theme.border_normal = "#1c2022"
+theme.border_focus = "#606060"
+theme.border_marked = "#3ca4d8"
+theme.menu_border_width = 0
+theme.menu_width = 130
+theme.menu_submenu_icon = theme.confdir .. "/icons/submenu.png"
+theme.menu_fg_normal = "#aaaaaa"
+theme.menu_fg_focus = "#ff8c00"
+theme.menu_bg_normal = "#050505dd"
+theme.menu_bg_focus = "#050505dd"
+theme.widget_temp = theme.confdir .. "/icons/temp.png"
+theme.widget_uptime = theme.confdir .. "/icons/ac.png"
+theme.widget_cpu = theme.confdir .. "/icons/cpu.png"
+theme.widget_weather = theme.confdir .. "/icons/dish.png"
+theme.widget_fs = theme.confdir .. "/icons/fs.png"
+theme.widget_mem = theme.confdir .. "/icons/mem.png"
+theme.widget_fs = theme.confdir .. "/icons/fs.png"
+theme.widget_note = theme.confdir .. "/icons/note.png"
+theme.widget_note_on = theme.confdir .. "/icons/note_on.png"
+theme.widget_netdown = theme.confdir .. "/icons/net_down.png"
+theme.widget_netup = theme.confdir .. "/icons/net_up.png"
+theme.widget_mail = theme.confdir .. "/icons/mail.png"
+theme.widget_batt = theme.confdir .. "/icons/bat.png"
+theme.widget_clock = theme.confdir .. "/icons/clock.png"
+theme.widget_vol = theme.confdir .. "/icons/spkr.png"
+theme.taglist_squares_sel = theme.confdir .. "/icons/square_a.png"
+theme.taglist_squares_unsel = theme.confdir .. "/icons/square_b.png"
+theme.tasklist_plain_task_name = true
+theme.tasklist_disable_icon = true
+theme.useless_gap = 0
+theme.layout_tile = theme.confdir .. "/icons/tile.png"
+theme.layout_tilegaps = theme.confdir .. "/icons/tilegaps.png"
+theme.layout_tileleft = theme.confdir .. "/icons/tileleft.png"
+theme.layout_tilebottom = theme.confdir .. "/icons/tilebottom.png"
+theme.layout_tiletop = theme.confdir .. "/icons/tiletop.png"
+theme.layout_fairv = theme.confdir .. "/icons/fairv.png"
+theme.layout_fairh = theme.confdir .. "/icons/fairh.png"
+theme.layout_spiral = theme.confdir .. "/icons/spiral.png"
+theme.layout_dwindle = theme.confdir .. "/icons/dwindle.png"
+theme.layout_max = theme.confdir .. "/icons/max.png"
+theme.layout_fullscreen = theme.confdir .. "/icons/fullscreen.png"
+theme.layout_magnifier = theme.confdir .. "/icons/magnifier.png"
+theme.layout_floating = theme.confdir .. "/icons/floating.png"
+theme.titlebar_close_button_normal = theme.confdir .. "/icons/titlebar/close_normal.png"
+theme.titlebar_close_button_focus = theme.confdir .. "/icons/titlebar/close_focus.png"
+theme.titlebar_minimize_button_normal = theme.confdir .. "/icons/titlebar/minimize_normal.png"
+theme.titlebar_minimize_button_focus = theme.confdir .. "/icons/titlebar/minimize_focus.png"
+theme.titlebar_ontop_button_normal_inactive = theme.confdir .. "/icons/titlebar/ontop_normal_inactive.png"
+theme.titlebar_ontop_button_focus_inactive = theme.confdir .. "/icons/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_active = theme.confdir .. "/icons/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_active = theme.confdir .. "/icons/titlebar/ontop_focus_active.png"
+theme.titlebar_sticky_button_normal_inactive = theme.confdir .. "/icons/titlebar/sticky_normal_inactive.png"
+theme.titlebar_sticky_button_focus_inactive = theme.confdir .. "/icons/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_active = theme.confdir .. "/icons/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_active = theme.confdir .. "/icons/titlebar/sticky_focus_active.png"
+theme.titlebar_floating_button_normal_inactive = theme.confdir .. "/icons/titlebar/floating_normal_inactive.png"
+theme.titlebar_floating_button_focus_inactive = theme.confdir .. "/icons/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_active = theme.confdir .. "/icons/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_active = theme.confdir .. "/icons/titlebar/floating_focus_active.png"
+theme.titlebar_maximized_button_normal_inactive = theme.confdir .. "/icons/titlebar/maximized_normal_inactive.png"
+theme.titlebar_maximized_button_focus_inactive = theme.confdir .. "/icons/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_active = theme.confdir .. "/icons/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_active = theme.confdir .. "/icons/titlebar/maximized_focus_active.png"
+
+local markup = lain.util.markup
+
+-- Textclock
+os.setlocale(os.getenv("LANG")) -- to localize the clock
+local clockicon = wibox.widget.imagebox(theme.widget_clock)
+local mytextclock = wibox.widget.textclock(markup("#7788af", "%A %d %B ") .. markup("#535f7a", ">") .. markup("#de5e1e", " %H:%M "))
+mytextclock.font = theme.font
+
+-- Calendar
+theme.cal = lain.widget.calendar({
+ attach_to = { mytextclock },
+ notification_preset = {
+ font = "xos4 Terminus 10",
+ fg = theme.fg_normal,
+ bg = theme.bg_normal
+ }
+})
+
+-- Weather
+local weathericon = wibox.widget.imagebox(theme.widget_weather)
+theme.weather = lain.widget.weather({
+ city_id = 2643743, -- placeholder (London)
+ notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal },
+ weather_na_markup = markup.fontfg(theme.font, "#eca4c4", "N/A "),
+ settings = function()
+ descr = weather_now["weather"][1]["description"]:lower()
+ units = math.floor(weather_now["main"]["temp"])
+ widget:set_markup(markup.fontfg(theme.font, "#eca4c4", descr .. " @ " .. units .. "°C "))
+ end
+})
+
+-- / fs
+local fsicon = wibox.widget.imagebox(theme.widget_fs)
+theme.fs = lain.widget.fs({
+ options = "--exclude-type=tmpfs",
+ notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal },
+ settings = function()
+ widget:set_markup(markup.fontfg(theme.font, "#80d9d8", fs_now.used .. "% "))
+ end
+})
+
+--[[ Mail IMAP check
+-- commented because it needs to be set before use
+local mailicon = wibox.widget.imagebox()
+local mail = lain.widget.imap({
+ timeout = 180,
+ server = "server",
+ mail = "mail",
+ password = "keyring get mail",
+ settings = function()
+ if mailcount > 0 then
+ mailicon:set_image(theme.widget_mail)
+ widget:set_markup(markup.fontfg(theme.font, "#cccccc", mailcount .. " "))
+ else
+ widget:set_text("")
+ --mailicon:set_image() -- not working in 4.0
+ mailicon._private.image = nil
+ mailicon:emit_signal("widget::redraw_needed")
+ mailicon:emit_signal("widget::layout_changed")
+ end
+ end
+})
+--]]
+
+-- CPU
+local cpuicon = wibox.widget.imagebox(theme.widget_cpu)
+local cpu = lain.widget.cpu({
+ settings = function()
+ widget:set_markup(markup.fontfg(theme.font, "#e33a6e", cpu_now.usage .. "% "))
+ end
+})
+
+-- Coretemp
+local tempicon = wibox.widget.imagebox(theme.widget_temp)
+local temp = lain.widget.temp({
+ settings = function()
+ widget:set_markup(markup.fontfg(theme.font, "#f1af5f", coretemp_now .. "°C "))
+ end
+})
+
+-- Battery
+local baticon = wibox.widget.imagebox(theme.widget_batt)
+local bat = lain.widget.bat({
+ settings = function()
+ local perc = bat_now.perc ~= "N/A" and bat_now.perc .. "%" or bat_now.perc
+
+ if bat_now.ac_status == 1 then
+ perc = perc .. " plug"
+ end
+
+ widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, perc .. " "))
+ end
+})
+
+-- ALSA volume
+local volicon = wibox.widget.imagebox(theme.widget_vol)
+theme.volume = lain.widget.alsa({
+ settings = function()
+ if volume_now.status == "off" then
+ volume_now.level = volume_now.level .. "M"
+ end
+
+ widget:set_markup(markup.fontfg(theme.font, "#7493d2", volume_now.level .. "% "))
+ end
+})
+
+-- Net
+local netdownicon = wibox.widget.imagebox(theme.widget_netdown)
+local netdowninfo = wibox.widget.textbox()
+local netupicon = wibox.widget.imagebox(theme.widget_netup)
+local netupinfo = lain.widget.net({
+ settings = function()
+ if iface ~= "network off" and
+ string.match(theme.weather.widget.text, "N/A")
+ then
+ theme.weather.update()
+ end
+
+ widget:set_markup(markup.fontfg(theme.font, "#e54c62", net_now.sent .. " "))
+ netdowninfo:set_markup(markup.fontfg(theme.font, "#87af5f", net_now.received .. " "))
+ end
+})
+
+-- MEM
+local memicon = wibox.widget.imagebox(theme.widget_mem)
+local memory = lain.widget.mem({
+ settings = function()
+ widget:set_markup(markup.fontfg(theme.font, "#e0da37", mem_now.used .. "M "))
+ end
+})
+
+-- MPD
+local mpdicon = wibox.widget.imagebox()
+theme.mpd = lain.widget.mpd({
+ settings = function()
+ mpd_notification_preset = {
+ text = string.format("%s [%s] - %s\n%s", mpd_now.artist,
+ mpd_now.album, mpd_now.date, mpd_now.title)
+ }
+
+ if mpd_now.state == "play" then
+ artist = mpd_now.artist .. " > "
+ title = mpd_now.title .. " "
+ mpdicon:set_image(theme.widget_note_on)
+ elseif mpd_now.state == "pause" then
+ artist = "mpd "
+ title = "paused "
+ else
+ artist = ""
+ title = ""
+ --mpdicon:set_image() -- not working in 4.0
+ mpdicon._private.image = nil
+ mpdicon:emit_signal("widget::redraw_needed")
+ mpdicon:emit_signal("widget::layout_changed")
+ end
+ widget:set_markup(markup.fontfg(theme.font, "#e54c62", artist) .. markup.fontfg(theme.font, "#b2b2b2", title))
+ end
+})
+
+function theme.at_screen_connect(s)
+ -- Quake application
+ s.quake = lain.util.quake({ app = awful.util.terminal })
+
+ -- If wallpaper is a function, call it with the screen
+ local wallpaper = theme.wallpaper
+ if type(wallpaper) == "function" then
+ wallpaper = wallpaper(s)
+ end
+ gears.wallpaper.maximized(wallpaper, s, true)
+
+ -- Tags
+ awful.tag(awful.util.tagnames, s, awful.layout.layouts)
+
+ -- Create a promptbox for each screen
+ s.mypromptbox = awful.widget.prompt()
+ -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ s.mylayoutbox = awful.widget.layoutbox(s)
+ s.mylayoutbox:buttons(awful.util.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
+ s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
+
+ -- Create a tasklist widget
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
+
+ -- Create the wibox
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 20, bg = theme.bg_normal, fg = theme.fg_normal })
+
+ -- Add widgets to the wibox
+ s.mywibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ --s.mylayoutbox,
+ s.mytaglist,
+ s.mypromptbox,
+ mpdicon,
+ theme.mpd.widget,
+ },
+ --s.mytasklist, -- Middle widget
+ nil,
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ wibox.widget.systray(),
+ --mailicon,
+ --mail.widget,
+ netdownicon,
+ netdowninfo,
+ netupicon,
+ netupinfo.widget,
+ volicon,
+ theme.volume.widget,
+ memicon,
+ memory.widget,
+ cpuicon,
+ cpu.widget,
+ fsicon,
+ theme.fs.widget,
+ weathericon,
+ theme.weather.widget,
+ tempicon,
+ temp.widget,
+ baticon,
+ bat.widget,
+ clockicon,
+ mytextclock,
+ },
+ }
+
+ -- Create the bottom wibox
+ s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = 20, bg = theme.bg_normal, fg = theme.fg_normal })
+
+ -- Add widgets to the bottom wibox
+ s.mybottomwibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ },
+ s.mytasklist, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ s.mylayoutbox,
+ },
+ }
+end
+
+return theme
diff --git a/.config/awesome/themes/multicolor/wall.png b/.config/awesome/themes/multicolor/wall.png
new file mode 100644
index 0000000..a3188d0
Binary files /dev/null and b/.config/awesome/themes/multicolor/wall.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/ac.png b/.config/awesome/themes/powerarrow-dark/icons/ac.png
new file mode 100644
index 0000000..96efcb4
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/ac.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/battery.png b/.config/awesome/themes/powerarrow-dark/icons/battery.png
new file mode 100644
index 0000000..8c85596
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/battery.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/battery_empty.png b/.config/awesome/themes/powerarrow-dark/icons/battery_empty.png
new file mode 100644
index 0000000..00821c9
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/battery_empty.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/battery_low.png b/.config/awesome/themes/powerarrow-dark/icons/battery_low.png
new file mode 100644
index 0000000..29f3fc5
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/battery_low.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/centerfair.png b/.config/awesome/themes/powerarrow-dark/icons/centerfair.png
new file mode 100644
index 0000000..c4f64b0
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/centerfair.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/centerwork.png b/.config/awesome/themes/powerarrow-dark/icons/centerwork.png
new file mode 100644
index 0000000..9071516
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/centerwork.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/centerworkh.png b/.config/awesome/themes/powerarrow-dark/icons/centerworkh.png
new file mode 100644
index 0000000..b1d1379
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/centerworkh.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/cpu.png b/.config/awesome/themes/powerarrow-dark/icons/cpu.png
new file mode 100644
index 0000000..35af1c3
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/cpu.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/dwindle.png b/.config/awesome/themes/powerarrow-dark/icons/dwindle.png
new file mode 100644
index 0000000..649ea99
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/dwindle.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/fairh.png b/.config/awesome/themes/powerarrow-dark/icons/fairh.png
new file mode 100644
index 0000000..62d3d99
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/fairh.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/fairv.png b/.config/awesome/themes/powerarrow-dark/icons/fairv.png
new file mode 100644
index 0000000..131dd0f
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/fairv.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/floating.png b/.config/awesome/themes/powerarrow-dark/icons/floating.png
new file mode 100644
index 0000000..d25c47b
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/floating.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/hdd.png b/.config/awesome/themes/powerarrow-dark/icons/hdd.png
new file mode 100644
index 0000000..0fb6833
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/hdd.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/magnifier.png b/.config/awesome/themes/powerarrow-dark/icons/magnifier.png
new file mode 100644
index 0000000..60d3e0d
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/magnifier.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/mail.png b/.config/awesome/themes/powerarrow-dark/icons/mail.png
new file mode 100644
index 0000000..474e602
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/mail.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/mail_on.png b/.config/awesome/themes/powerarrow-dark/icons/mail_on.png
new file mode 100644
index 0000000..19106d7
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/mail_on.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/max.png b/.config/awesome/themes/powerarrow-dark/icons/max.png
new file mode 100644
index 0000000..5b0a5b7
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/max.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/mem.png b/.config/awesome/themes/powerarrow-dark/icons/mem.png
new file mode 100644
index 0000000..7860a1a
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/mem.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/net.png b/.config/awesome/themes/powerarrow-dark/icons/net.png
new file mode 100644
index 0000000..bc42fdc
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/net.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/net_wired.png b/.config/awesome/themes/powerarrow-dark/icons/net_wired.png
new file mode 100644
index 0000000..e8cc2bd
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/net_wired.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/note.png b/.config/awesome/themes/powerarrow-dark/icons/note.png
new file mode 100644
index 0000000..baa29c3
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/note.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/note_on.png b/.config/awesome/themes/powerarrow-dark/icons/note_on.png
new file mode 100644
index 0000000..1a7ab94
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/note_on.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/scissors.png b/.config/awesome/themes/powerarrow-dark/icons/scissors.png
new file mode 100644
index 0000000..f8c700d
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/scissors.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/spiral.png b/.config/awesome/themes/powerarrow-dark/icons/spiral.png
new file mode 100644
index 0000000..d9ee0f6
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/spiral.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/square_sel.png b/.config/awesome/themes/powerarrow-dark/icons/square_sel.png
new file mode 100644
index 0000000..1102a9f
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/square_sel.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/square_unsel.png b/.config/awesome/themes/powerarrow-dark/icons/square_unsel.png
new file mode 100644
index 0000000..7386b85
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/square_unsel.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/submenu.png b/.config/awesome/themes/powerarrow-dark/icons/submenu.png
new file mode 100644
index 0000000..b55ebce
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/submenu.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/task.png b/.config/awesome/themes/powerarrow-dark/icons/task.png
new file mode 100644
index 0000000..9701b68
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/task.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/temp.png b/.config/awesome/themes/powerarrow-dark/icons/temp.png
new file mode 100644
index 0000000..6793a9f
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/temp.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/termfair.png b/.config/awesome/themes/powerarrow-dark/icons/termfair.png
new file mode 100644
index 0000000..3e06023
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/termfair.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/tile.png b/.config/awesome/themes/powerarrow-dark/icons/tile.png
new file mode 100644
index 0000000..922c05c
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tile.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/tilebottom.png b/.config/awesome/themes/powerarrow-dark/icons/tilebottom.png
new file mode 100644
index 0000000..6ec9cb8
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tilebottom.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/tileleft.png b/.config/awesome/themes/powerarrow-dark/icons/tileleft.png
new file mode 100644
index 0000000..8e3d2d6
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tileleft.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/tiletop.png b/.config/awesome/themes/powerarrow-dark/icons/tiletop.png
new file mode 100644
index 0000000..3da75a1
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tiletop.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_focus.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_focus.png
new file mode 100644
index 0000000..b2051b0
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_focus.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_normal.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_normal.png
new file mode 100644
index 0000000..da6028c
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_normal.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_active.png
new file mode 100644
index 0000000..5fe84c0
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_inactive.png
new file mode 100644
index 0000000..47f19f6
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_active.png
new file mode 100644
index 0000000..576fa36
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_inactive.png
new file mode 100644
index 0000000..4adc5e9
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_active.png
new file mode 100644
index 0000000..7d9a11a
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_inactive.png
new file mode 100644
index 0000000..bce1d00
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_active.png
new file mode 100644
index 0000000..9f24945
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_inactive.png
new file mode 100644
index 0000000..2e56d32
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_active.png
new file mode 100644
index 0000000..41a69e2
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_inactive.png
new file mode 100644
index 0000000..2f3a2be
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_active.png
new file mode 100644
index 0000000..0f937b7
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_inactive.png
new file mode 100644
index 0000000..a9a3206
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_active.png
new file mode 100644
index 0000000..a9bc8a2
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_inactive.png
new file mode 100644
index 0000000..5493d8e
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_active.png
new file mode 100644
index 0000000..1e150f5
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_active.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_inactive.png
new file mode 100644
index 0000000..7e6c99b
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_inactive.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol.png b/.config/awesome/themes/powerarrow-dark/icons/vol.png
new file mode 100644
index 0000000..bbf33d4
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol_low.png b/.config/awesome/themes/powerarrow-dark/icons/vol_low.png
new file mode 100644
index 0000000..aa3ce4d
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol_low.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol_mute.png b/.config/awesome/themes/powerarrow-dark/icons/vol_mute.png
new file mode 100644
index 0000000..e855fd2
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol_mute.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol_no.png b/.config/awesome/themes/powerarrow-dark/icons/vol_no.png
new file mode 100644
index 0000000..bbe917b
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol_no.png differ
diff --git a/.config/awesome/themes/powerarrow-dark/theme.lua b/.config/awesome/themes/powerarrow-dark/theme.lua
new file mode 100644
index 0000000..c1688e1
--- /dev/null
+++ b/.config/awesome/themes/powerarrow-dark/theme.lua
@@ -0,0 +1,343 @@
+--[[
+
+ Powerarrow Dark Awesome WM theme
+ github.com/copycat-killer
+
+--]]
+
+local gears = require("gears")
+local lain = require("lain")
+local awful = require("awful")
+local wibox = require("wibox")
+local os = { getenv = os.getenv }
+
+local theme = {}
+theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-dark"
+theme.wallpaper = theme.dir .. "/wall.png"
+theme.font = "xos4 Terminus 9"
+theme.fg_normal = "#DDDDFF"
+theme.fg_focus = "#EA6F81"
+theme.fg_urgent = "#CC9393"
+theme.bg_normal = "#1A1A1A"
+theme.bg_focus = "#313131"
+theme.bg_urgent = "#1A1A1A"
+theme.border_width = 1
+theme.border_normal = "#3F3F3F"
+theme.border_focus = "#7F7F7F"
+theme.border_marked = "#CC9393"
+theme.tasklist_bg_focus = "#1A1A1A"
+theme.titlebar_bg_focus = theme.bg_focus
+theme.titlebar_bg_normal = theme.bg_normal
+theme.titlebar_fg_focus = theme.fg_focus
+theme.menu_height = 16
+theme.menu_width = 140
+theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
+theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
+theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
+theme.layout_tile = theme.dir .. "/icons/tile.png"
+theme.layout_tileleft = theme.dir .. "/icons/tileleft.png"
+theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png"
+theme.layout_tiletop = theme.dir .. "/icons/tiletop.png"
+theme.layout_fairv = theme.dir .. "/icons/fairv.png"
+theme.layout_fairh = theme.dir .. "/icons/fairh.png"
+theme.layout_spiral = theme.dir .. "/icons/spiral.png"
+theme.layout_dwindle = theme.dir .. "/icons/dwindle.png"
+theme.layout_max = theme.dir .. "/icons/max.png"
+theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png"
+theme.layout_magnifier = theme.dir .. "/icons/magnifier.png"
+theme.layout_floating = theme.dir .. "/icons/floating.png"
+theme.widget_ac = theme.dir .. "/icons/ac.png"
+theme.widget_battery = theme.dir .. "/icons/battery.png"
+theme.widget_battery_low = theme.dir .. "/icons/battery_low.png"
+theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.png"
+theme.widget_mem = theme.dir .. "/icons/mem.png"
+theme.widget_cpu = theme.dir .. "/icons/cpu.png"
+theme.widget_temp = theme.dir .. "/icons/temp.png"
+theme.widget_net = theme.dir .. "/icons/net.png"
+theme.widget_hdd = theme.dir .. "/icons/hdd.png"
+theme.widget_music = theme.dir .. "/icons/note.png"
+theme.widget_music_on = theme.dir .. "/icons/note_on.png"
+theme.widget_vol = theme.dir .. "/icons/vol.png"
+theme.widget_vol_low = theme.dir .. "/icons/vol_low.png"
+theme.widget_vol_no = theme.dir .. "/icons/vol_no.png"
+theme.widget_vol_mute = theme.dir .. "/icons/vol_mute.png"
+theme.widget_mail = theme.dir .. "/icons/mail.png"
+theme.widget_mail_on = theme.dir .. "/icons/mail_on.png"
+theme.tasklist_plain_task_name = true
+theme.tasklist_disable_icon = true
+theme.useless_gap = 0
+theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png"
+theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png"
+theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png"
+theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png"
+theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png"
+theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png"
+theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png"
+theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png"
+theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png"
+theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png"
+
+local markup = lain.util.markup
+local separators = lain.util.separators
+
+-- Textclock
+local clockicon = wibox.widget.imagebox(theme.widget_clock)
+local clock = awful.widget.watch(
+ "date +'%a %d %b %R'", 60,
+ function(widget, stdout)
+ widget:set_markup(" " .. markup.font(theme.font, stdout))
+ end
+)
+
+-- Calendar
+theme.cal = lain.widget.calendar({
+ attach_to = { clock.widget },
+ notification_preset = {
+ font = "xos4 Terminus 10",
+ fg = theme.fg_normal,
+ bg = theme.bg_normal
+ }
+})
+
+-- Mail IMAP check
+local mailicon = wibox.widget.imagebox(theme.widget_mail)
+--[[ commented because it needs to be set before use
+mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.spawn(mail) end)))
+local mail = lain.widget.imap({
+ timeout = 180,
+ server = "server",
+ mail = "mail",
+ password = "keyring get mail",
+ settings = function()
+ if mailcount > 0 then
+ widget:set_text(" " .. mailcount .. " ")
+ mailicon:set_image(theme.widget_mail_on)
+ else
+ widget:set_text("")
+ mailicon:set_image(theme.widget_mail)
+ end
+ end
+})
+--]]
+
+-- MPD
+local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp"
+local mpdicon = wibox.widget.imagebox(theme.widget_music)
+mpdicon:buttons(awful.util.table.join(
+ awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end),
+ awful.button({ }, 1, function ()
+ awful.spawn.with_shell("mpc prev")
+ theme.mpd.update()
+ end),
+ awful.button({ }, 2, function ()
+ awful.spawn.with_shell("mpc toggle")
+ theme.mpd.update()
+ end),
+ awful.button({ }, 3, function ()
+ awful.spawn.with_shell("mpc next")
+ theme.mpd.update()
+ end)))
+theme.mpd = lain.widget.mpd({
+ settings = function()
+ if mpd_now.state == "play" then
+ artist = " " .. mpd_now.artist .. " "
+ title = mpd_now.title .. " "
+ mpdicon:set_image(theme.widget_music_on)
+ elseif mpd_now.state == "pause" then
+ artist = " mpd "
+ title = "paused "
+ else
+ artist = ""
+ title = ""
+ mpdicon:set_image(theme.widget_music)
+ end
+
+ widget:set_markup(markup.font(theme.font, markup("#EA6F81", artist) .. title))
+ end
+})
+
+-- MEM
+local memicon = wibox.widget.imagebox(theme.widget_mem)
+local mem = lain.widget.mem({
+ settings = function()
+ widget:set_markup(markup.font(theme.font, " " .. mem_now.used .. "MB "))
+ end
+})
+
+-- CPU
+local cpuicon = wibox.widget.imagebox(theme.widget_cpu)
+local cpu = lain.widget.cpu({
+ settings = function()
+ widget:set_markup(markup.font(theme.font, " " .. cpu_now.usage .. "% "))
+ end
+})
+
+-- Coretemp
+local tempicon = wibox.widget.imagebox(theme.widget_temp)
+local temp = lain.widget.temp({
+ settings = function()
+ widget:set_markup(markup.font(theme.font, " " .. coretemp_now .. "°C "))
+ end
+})
+
+-- / fs
+local fsicon = wibox.widget.imagebox(theme.widget_hdd)
+theme.fs = lain.widget.fs({
+ options = "--exclude-type=tmpfs",
+ notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "xos4 Terminus 10" },
+ settings = function()
+ widget:set_markup(markup.font(theme.font, " " .. fs_now.used .. "% "))
+ end
+})
+
+-- Battery
+local baticon = wibox.widget.imagebox(theme.widget_battery)
+local bat = lain.widget.bat({
+ settings = function()
+ if bat_now.status ~= "N/A" then
+ if bat_now.ac_status == 1 then
+ widget:set_markup(markup.font(theme.font, " AC "))
+ baticon:set_image(theme.widget_ac)
+ return
+ elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then
+ baticon:set_image(theme.widget_battery_empty)
+ elseif not bat_now.perc and tonumber(bat_now.perc) <= 15 then
+ baticon:set_image(theme.widget_battery_low)
+ else
+ baticon:set_image(theme.widget_battery)
+ end
+ widget:set_markup(markup.font(theme.font, " " .. bat_now.perc .. "% "))
+ else
+ widget:set_markup(markup.font(theme.font, " AC "))
+ baticon:set_image(theme.widget_ac)
+ end
+ end
+})
+
+-- ALSA volume
+local volicon = wibox.widget.imagebox(theme.widget_vol)
+theme.volume = lain.widget.alsa({
+ settings = function()
+ if volume_now.status == "off" then
+ volicon:set_image(theme.widget_vol_mute)
+ elseif tonumber(volume_now.level) == 0 then
+ volicon:set_image(theme.widget_vol_no)
+ elseif tonumber(volume_now.level) <= 50 then
+ volicon:set_image(theme.widget_vol_low)
+ else
+ volicon:set_image(theme.widget_vol)
+ end
+
+ widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% "))
+ end
+})
+
+-- Net
+local neticon = wibox.widget.imagebox(theme.widget_net)
+local net = lain.widget.net({
+ settings = function()
+ widget:set_markup(markup.font(theme.font,
+ markup("#7AC82E", " " .. net_now.received)
+ .. " " ..
+ markup("#46A8C3", " " .. net_now.sent .. " ")))
+ end
+})
+
+-- Separators
+local spr = wibox.widget.textbox(' ')
+local arrl_dl = separators.arrow_left(theme.bg_focus, "alpha")
+local arrl_ld = separators.arrow_left("alpha", theme.bg_focus)
+
+function theme.at_screen_connect(s)
+ -- Quake application
+ s.quake = lain.util.quake({ app = awful.util.terminal })
+
+ -- If wallpaper is a function, call it with the screen
+ local wallpaper = theme.wallpaper
+ if type(wallpaper) == "function" then
+ wallpaper = wallpaper(s)
+ end
+ gears.wallpaper.maximized(wallpaper, s, true)
+
+ -- Tags
+ awful.tag(awful.util.tagnames, s, awful.layout.layouts)
+
+ -- Create a promptbox for each screen
+ s.mypromptbox = awful.widget.prompt()
+ -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ s.mylayoutbox = awful.widget.layoutbox(s)
+ s.mylayoutbox:buttons(awful.util.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
+ s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
+
+ -- Create a tasklist widget
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
+
+ -- Create the wibox
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = theme.bg_normal, fg = theme.fg_normal })
+
+ -- Add widgets to the wibox
+ s.mywibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ --spr,
+ s.mytaglist,
+ s.mypromptbox,
+ spr,
+ },
+ s.mytasklist, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ wibox.widget.systray(),
+ spr,
+ arrl_ld,
+ wibox.container.background(mpdicon, theme.bg_focus),
+ wibox.container.background(theme.mpd.widget, theme.bg_focus),
+ arrl_dl,
+ volicon,
+ theme.volume.widget,
+ arrl_ld,
+ wibox.container.background(mailicon, theme.bg_focus),
+ --wibox.container.background(mail.widget, theme.bg_focus),
+ arrl_dl,
+ memicon,
+ mem.widget,
+ arrl_ld,
+ wibox.container.background(cpuicon, theme.bg_focus),
+ wibox.container.background(cpu.widget, theme.bg_focus),
+ arrl_dl,
+ tempicon,
+ temp.widget,
+ arrl_ld,
+ wibox.container.background(fsicon, theme.bg_focus),
+ wibox.container.background(theme.fs.widget, theme.bg_focus),
+ arrl_dl,
+ baticon,
+ bat.widget,
+ arrl_ld,
+ wibox.container.background(neticon, theme.bg_focus),
+ wibox.container.background(net.widget, theme.bg_focus),
+ arrl_dl,
+ clock,
+ spr,
+ arrl_ld,
+ wibox.container.background(s.mylayoutbox, theme.bg_focus),
+ },
+ }
+end
+
+return theme
diff --git a/.config/awesome/themes/powerarrow-dark/wall.png b/.config/awesome/themes/powerarrow-dark/wall.png
new file mode 100644
index 0000000..9d1118b
Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/wall.png differ
diff --git a/.config/awesome/themes/powerarrow/binclock.lua b/.config/awesome/themes/powerarrow/binclock.lua
new file mode 100644
index 0000000..3263b84
--- /dev/null
+++ b/.config/awesome/themes/powerarrow/binclock.lua
@@ -0,0 +1,95 @@
+--[[
+
+ Licensed under GNU General Public License v2
+ * (c) 2017, Luke Bonham
+ * (c) 2013, romockee
+
+--]]
+
+local gears = require("gears")
+local wibox = require("wibox")
+local date = os.date
+local ipairs = ipairs
+local math = math
+local select = select
+local string = string
+
+local binclock = {}
+
+function binclock.dec2bin(num, bits)
+ local bits, t = bits or select(2, math.frexp(num)), {}
+ for b = bits, 1, -1 do
+ t[b] = math.fmod(num, 2)
+ num = (num - t[b]) / 2
+ end
+ return t
+end
+
+function binclock.paintdot(cr, val, shift)
+ local height = 0
+ for _, bit in ipairs(binclock.dec2bin(val, 4)) do
+ if bit >= 1 then
+ cr:set_source(gears.color(binclock.color_active))
+ else
+ cr:set_source(gears.color(binclock.color_inactive))
+ end
+ cr:rectangle(shift, height, binclock.dotsize, binclock.dotsize)
+ cr:fill()
+ height = height + binclock.dotsize + binclock.step
+ end
+end
+
+local function factory(args)
+ local args = args or {}
+
+ binclock.width = args.width or 42
+ binclock.height = args.height or 18
+ binclock.show_seconds = args.show_seconds or false
+ binclock.color_active = args.color_active or "#CCCCCC"
+ binclock.color_inactive = args.color_inactive or "#444444"
+ binclock.dotsize = math.floor(binclock.height / 5)
+ binclock.step = math.floor(binclock.dotsize / 3)
+
+ binclock.widget = wibox.widget {
+ fit = function(self, context, width, height)
+ return binclock.width, binclock.height
+ end,
+ draw = function(self, context, cr, width, height)
+ local t = date("*t")
+
+ local hour = string.format("%02d", t.hour)
+ local min = string.format("%02d", t.min)
+ local sec = string.format("%02d", t.sec)
+
+ local col_count = 4
+ if binclock.show_seconds then
+ col_count = 6
+ end
+ local step = math.floor((binclock.width - col_count * binclock.dotsize) / 8)
+
+ binclock.paintdot(cr, string.sub(hour, 1, 1), step, 2)
+ binclock.paintdot(cr, string.sub(hour, 2, 2), binclock.dotsize + 2 * step)
+
+ binclock.paintdot(cr, string.sub(min, 1, 1), binclock.dotsize * 2 + 4 * step)
+ binclock.paintdot(cr, string.sub(min, 2, 2), binclock.dotsize * 3 + 5 * step)
+
+ if binclock.show_seconds then
+ binclock.paintdot(cr, string.sub(sec, 1, 1), binclock.dotsize * 4 + 7 * step)
+ binclock.paintdot(cr, string.sub(sec, 2, 2), binclock.dotsize * 5 + 8 * step)
+ end
+ end,
+ layout = wibox.widget.base.make_widget
+ }
+
+ binclock.timer = gears.timer {
+ autostart = true,
+ timeout = binclock.show_seconds and 1 or 60,
+ callback = function()
+ binclock.widget:emit_signal("widget::redraw_needed")
+ end
+ }
+
+ return binclock
+end
+
+return factory
diff --git a/.config/awesome/themes/powerarrow/icons/ac.png b/.config/awesome/themes/powerarrow/icons/ac.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/awesome.png b/.config/awesome/themes/powerarrow/icons/awesome.png
old mode 100755
new mode 100644
index 2db19ca..4cabb6c
Binary files a/.config/awesome/themes/powerarrow/icons/awesome.png and b/.config/awesome/themes/powerarrow/icons/awesome.png differ
diff --git a/.config/awesome/themes/powerarrow/icons/battery.png b/.config/awesome/themes/powerarrow/icons/battery.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/battery_empty.png b/.config/awesome/themes/powerarrow/icons/battery_empty.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/battery_low.png b/.config/awesome/themes/powerarrow/icons/battery_low.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/cpu.png b/.config/awesome/themes/powerarrow/icons/cpu.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/dish.png b/.config/awesome/themes/powerarrow/icons/dish.png
deleted file mode 100755
index 1fc4a6b..0000000
Binary files a/.config/awesome/themes/powerarrow/icons/dish.png and /dev/null differ
diff --git a/.config/awesome/themes/powerarrow/icons/floating.png b/.config/awesome/themes/powerarrow/icons/floating.png
old mode 100755
new mode 100644
index add7f2b..079fea4
Binary files a/.config/awesome/themes/powerarrow/icons/floating.png and b/.config/awesome/themes/powerarrow/icons/floating.png differ
diff --git a/.config/awesome/themes/powerarrow/icons/fwd.png b/.config/awesome/themes/powerarrow/icons/fwd.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/hdd.png b/.config/awesome/themes/powerarrow/icons/hdd.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/mail.png b/.config/awesome/themes/powerarrow/icons/mail.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/mail_on.png b/.config/awesome/themes/powerarrow/icons/mail_on.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/mem.png b/.config/awesome/themes/powerarrow/icons/mem.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/net.png b/.config/awesome/themes/powerarrow/icons/net.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/next.png b/.config/awesome/themes/powerarrow/icons/next.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/note.png b/.config/awesome/themes/powerarrow/icons/note.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/note_on.png b/.config/awesome/themes/powerarrow/icons/note_on.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/pacman.png b/.config/awesome/themes/powerarrow/icons/pacman.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/pause.png b/.config/awesome/themes/powerarrow/icons/pause.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/phones.png b/.config/awesome/themes/powerarrow/icons/phones.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/play.png b/.config/awesome/themes/powerarrow/icons/play.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/prev.png b/.config/awesome/themes/powerarrow/icons/prev.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/rwd.png b/.config/awesome/themes/powerarrow/icons/rwd.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/scissors.png b/.config/awesome/themes/powerarrow/icons/scissors.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/stop.png b/.config/awesome/themes/powerarrow/icons/stop.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/task.png b/.config/awesome/themes/powerarrow/icons/task.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/temp.png b/.config/awesome/themes/powerarrow/icons/temp.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/tile.png b/.config/awesome/themes/powerarrow/icons/tile.png
old mode 100755
new mode 100644
index 98fe539..01fd1b5
Binary files a/.config/awesome/themes/powerarrow/icons/tile.png and b/.config/awesome/themes/powerarrow/icons/tile.png differ
diff --git a/.config/awesome/themes/powerarrow/icons/tilebottom.png b/.config/awesome/themes/powerarrow/icons/tilebottom.png
old mode 100755
new mode 100644
index 80ce045..bff1f42
Binary files a/.config/awesome/themes/powerarrow/icons/tilebottom.png and b/.config/awesome/themes/powerarrow/icons/tilebottom.png differ
diff --git a/.config/awesome/themes/powerarrow/icons/tileleft.png b/.config/awesome/themes/powerarrow/icons/tileleft.png
old mode 100755
new mode 100644
index 216dec9..205140a
Binary files a/.config/awesome/themes/powerarrow/icons/tileleft.png and b/.config/awesome/themes/powerarrow/icons/tileleft.png differ
diff --git a/.config/awesome/themes/powerarrow/icons/tiletop.png b/.config/awesome/themes/powerarrow/icons/tiletop.png
old mode 100755
new mode 100644
index 8bf290e..148cb9b
Binary files a/.config/awesome/themes/powerarrow/icons/tiletop.png and b/.config/awesome/themes/powerarrow/icons/tiletop.png differ
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/close_focus.png b/.config/awesome/themes/powerarrow/icons/titlebar/close_focus.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/close_normal.png b/.config/awesome/themes/powerarrow/icons/titlebar/close_normal.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_active.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_inactive.png
old mode 100755
new mode 100644
diff --git a/.config/awesome/themes/powerarrow/icons/vol.png b/.config/awesome/themes/powerarrow/icons/vol.png
deleted file mode 100755
index 8fb9622..0000000
Binary files a/.config/awesome/themes/powerarrow/icons/vol.png and /dev/null differ
diff --git a/.config/awesome/themes/powerarrow/icons/vol_low.png b/.config/awesome/themes/powerarrow/icons/vol_low.png
deleted file mode 100755
index 32ad78f..0000000
Binary files a/.config/awesome/themes/powerarrow/icons/vol_low.png and /dev/null differ
diff --git a/.config/awesome/themes/powerarrow/icons/vol_mute.png b/.config/awesome/themes/powerarrow/icons/vol_mute.png
deleted file mode 100755
index 77148fb..0000000
Binary files a/.config/awesome/themes/powerarrow/icons/vol_mute.png and /dev/null differ
diff --git a/.config/awesome/themes/powerarrow/icons/vol_no.png b/.config/awesome/themes/powerarrow/icons/vol_no.png
deleted file mode 100755
index f22ed63..0000000
Binary files a/.config/awesome/themes/powerarrow/icons/vol_no.png and /dev/null differ
diff --git a/.config/awesome/themes/powerarrow/theme.lua b/.config/awesome/themes/powerarrow/theme.lua
old mode 100755
new mode 100644
index 78c49c2..972452d
--- a/.config/awesome/themes/powerarrow/theme.lua
+++ b/.config/awesome/themes/powerarrow/theme.lua
@@ -1,7 +1,7 @@
--[[
Powerarrow Awesome WM theme
- github.com/lcpz
+ github.com/copycat-killer
--]]
@@ -9,34 +9,31 @@ local gears = require("gears")
local lain = require("lain")
local awful = require("awful")
local wibox = require("wibox")
-
-local math, string, os = math, string, os
-local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
+local os, math, string = os, math, string
local theme = {}
theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow"
---theme.wallpaper = theme.dir .. "/starwars.jpg"
-theme.font = "JetBrains Mono 9"
-theme.taglist_font = "Ubuntu Bold 7"
-theme.fg_normal = "#ffffff"
-theme.fg_focus = "#A77AC4"
-theme.fg_urgent = "#b74822"
-theme.bg_normal = "#282a36"
-theme.bg_focus = "#FF79C6"
+theme.wallpaper = theme.dir .. "/wall.png"
+theme.font = "xos4 Terminus 9"
+theme.fg_normal = "#FEFEFE"
+theme.fg_focus = "#32D6FF"
+theme.fg_urgent = "#C83F11"
+theme.bg_normal = "#222222"
+theme.bg_focus = "#1E2320"
theme.bg_urgent = "#3F3F3F"
-theme.taglist_fg_focus = "#282a36"
-theme.tasklist_bg_focus = "#000000"
-theme.tasklist_fg_focus = "#A77AC4"
-theme.border_width = 2
-theme.border_normal = "#282a36"
-theme.border_focus = "#F07178"
+theme.taglist_fg_focus = "#00CCFF"
+theme.tasklist_bg_focus = "#222222"
+theme.tasklist_fg_focus = "#00CCFF"
+theme.border_width = 1
+theme.border_normal = "#3F3F3F"
+theme.border_focus = "#6F6F6F"
theme.border_marked = "#CC9393"
theme.titlebar_bg_focus = "#3F3F3F"
theme.titlebar_bg_normal = "#3F3F3F"
theme.titlebar_bg_focus = theme.bg_focus
theme.titlebar_bg_normal = theme.bg_normal
theme.titlebar_fg_focus = theme.fg_focus
-theme.menu_height = 20
+theme.menu_height = 16
theme.menu_width = 140
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
theme.awesome_icon = theme.dir .. "/icons/awesome.png"
@@ -64,7 +61,7 @@ theme.widget_temp = theme.dir .. "/icons/temp.png"
theme.widget_net = theme.dir .. "/icons/net.png"
theme.widget_hdd = theme.dir .. "/icons/hdd.png"
theme.widget_music = theme.dir .. "/icons/note.png"
-theme.widget_music_on = theme.dir .. "/icons/note.png"
+theme.widget_music_on = theme.dir .. "/icons/note_on.png"
theme.widget_music_pause = theme.dir .. "/icons/pause.png"
theme.widget_music_stop = theme.dir .. "/icons/stop.png"
theme.widget_vol = theme.dir .. "/icons/vol.png"
@@ -75,10 +72,9 @@ theme.widget_mail = theme.dir .. "/icons/mail.png"
theme.widget_mail_on = theme.dir .. "/icons/mail_on.png"
theme.widget_task = theme.dir .. "/icons/task.png"
theme.widget_scissors = theme.dir .. "/icons/scissors.png"
-theme.widget_weather = theme.dir .. "/icons/dish.png"
theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true
-theme.useless_gap = 4
+theme.useless_gap = 0
theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png"
theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png"
theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png"
@@ -101,43 +97,42 @@ theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/
local markup = lain.util.markup
local separators = lain.util.separators
-
--- Textclock
-local clockicon = wibox.widget.imagebox(theme.widget_clock)
-local clock = awful.widget.watch(
- "date +'%a %d %b %R'", 60,
- function(widget, stdout)
- widget:set_markup(" " .. markup.font(theme.font, stdout))
- end
-)
+-- Binary clock
+local binclock = require("themes.powerarrow.binclock"){
+ height = 16,
+ show_seconds = true,
+ color_active = theme.fg_normal,
+ color_inactive = theme.bg_focus
+}
-- Calendar
-theme.cal = lain.widget.cal({
- attach_to = { clock },
+theme.cal = lain.widget.calendar({
+ --cal = "cal --color=always",
+ attach_to = { binclock.widget },
notification_preset = {
- font = "JetBrains Mono 11",
+ font = "xos4 Terminus 10",
fg = theme.fg_normal,
bg = theme.bg_normal
}
})
-
-
-- Taskwarrior
---local task = wibox.widget.imagebox(theme.widget_task)
---lain.widget.contrib.task.attach(task, {
+local task = wibox.widget.imagebox(theme.widget_task)
+lain.widget.contrib.task.attach(task, {
-- do not colorize output
--- show_cmd = "task | sed -r 's/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g'"
---})
---task:buttons(gears.table.join(awful.button({}, 1, lain.widget.contrib.task.prompt)))
-
+ show_cmd = "task | sed -r 's/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g'"
+})
+task:buttons(awful.util.table.join(awful.button({}, 1, lain.widget.contrib.task.prompt)))
+-- Scissors (xsel copy and paste)
+local scissors = wibox.widget.imagebox(theme.widget_scissors)
+scissors:buttons(awful.util.table.join(awful.button({}, 1, function() awful.spawn("xsel | xsel -i -b") end)))
-- Mail IMAP check
local mailicon = wibox.widget.imagebox(theme.widget_mail)
--[[ commented because it needs to be set before use
-mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end)))
-theme.mail = lain.widget.imap({
+mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.spawn(mail) end)))
+local mail = lain.widget.imap({
timeout = 180,
server = "server",
mail = "mail",
@@ -157,26 +152,24 @@ theme.mail = lain.widget.imap({
-- ALSA volume
theme.volume = lain.widget.alsabar({
--togglechannel = "IEC958,3",
- notification_preset = { font = theme.font, fg = theme.fg_normal },
+ notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal },
})
-- MPD
-local musicplr = "urxvt -title Music -g 130x34-320+16 -e ncmpcpp"
+local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp"
local mpdicon = wibox.widget.imagebox(theme.widget_music)
-mpdicon:buttons(my_table.join(
+mpdicon:buttons(awful.util.table.join(
awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end),
- --[[awful.button({ }, 1, function ()
+ awful.button({ }, 1, function ()
awful.spawn.with_shell("mpc prev")
theme.mpd.update()
end),
- --]]
awful.button({ }, 2, function ()
awful.spawn.with_shell("mpc toggle")
theme.mpd.update()
end),
- awful.button({ modkey }, 3, function () awful.spawn.with_shell("pkill ncmpcpp") end),
awful.button({ }, 3, function ()
- awful.spawn.with_shell("mpc stop")
+ awful.spawn.with_shell("mpc next")
theme.mpd.update()
end)))
theme.mpd = lain.widget.mpd({
@@ -185,7 +178,7 @@ theme.mpd = lain.widget.mpd({
artist = " " .. mpd_now.artist .. " "
title = mpd_now.title .. " "
mpdicon:set_image(theme.widget_music_on)
- widget:set_markup(markup.font(theme.font, markup("#FFFFFF", artist) .. " " .. title))
+ widget:set_markup(markup.font(theme.font, markup("#FF8466", artist) .. " " .. title))
elseif mpd_now.state == "pause" then
widget:set_markup(markup.font(theme.font, " mpd paused "))
mpdicon:set_image(theme.widget_music_pause)
@@ -231,39 +224,21 @@ local temp = lain.widget.temp({
--]]
local tempicon = wibox.widget.imagebox(theme.widget_temp)
---[[ Weather
-https://openweathermap.org/
-Type in the name of your city
-Copy/paste the city code in the URL to this file in city_id
---]]
-local weathericon = wibox.widget.imagebox(theme.widget_weather)
-theme.weather = lain.widget.weather({
- city_id = 2803138, -- placeholder (Belgium)
- notification_preset = { font = "Mononoki Nerd Font 11", fg = theme.fg_normal },
- weather_na_markup = markup.fontfg(theme.font, "#ffffff", "N/A "),
- settings = function()
- descr = weather_now["weather"][1]["description"]:lower()
- units = math.floor(weather_now["main"]["temp"])
- widget:set_markup(markup.fontfg(theme.font, "#ffffff", descr .. " @ " .. units .. "°C "))
- end
-})
-
---[[ / fs
+-- / fs
local fsicon = wibox.widget.imagebox(theme.widget_hdd)
theme.fs = lain.widget.fs({
- notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Noto Sans Mono Medium 10" },
+ options = "--exclude-type=tmpfs",
+ notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "xos4 Terminus 10" },
settings = function()
- local fsp = string.format(" %3.2f %s ", fs_now["/"].free, fs_now["/"].units)
- widget:set_markup(markup.font(theme.font, fsp))
+ widget:set_markup(markup.font(theme.font, " " .. fs_now.available_gb .. "GB "))
end
})
---]]
-- Battery
local baticon = wibox.widget.imagebox(theme.widget_battery)
local bat = lain.widget.bat({
settings = function()
- if bat_now.status and bat_now.status ~= "N/A" then
+ if bat_now.status ~= "N/A" then
if bat_now.ac_status == 1 then
widget:set_markup(markup.font(theme.font, " AC "))
baticon:set_image(theme.widget_ac)
@@ -283,24 +258,6 @@ local bat = lain.widget.bat({
end
})
--- ALSA volume
-local volicon = wibox.widget.imagebox(theme.widget_vol)
-theme.volume = lain.widget.alsa({
- settings = function()
- if volume_now.status == "off" then
- volicon:set_image(theme.widget_vol_mute)
- elseif tonumber(volume_now.level) == 0 then
- volicon:set_image(theme.widget_vol_no)
- elseif tonumber(volume_now.level) <= 50 then
- volicon:set_image(theme.widget_vol_low)
- else
- volicon:set_image(theme.widget_vol)
- end
-
- widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% "))
- end
-})
-
-- Net
local neticon = wibox.widget.imagebox(theme.widget_net)
local net = lain.widget.net({
@@ -337,10 +294,7 @@ end
function theme.at_screen_connect(s)
-- Quake application
- -- s.quake = lain.util.quake({ app = awful.util.terminal })
- s.quake = lain.util.quake({ app = "termite", height = 0.50, argname = "--name %s" })
-
-
+ s.quake = lain.util.quake({ app = awful.util.terminal })
-- If wallpaper is a function, call it with the screen
local wallpaper = theme.wallpaper
@@ -349,15 +303,15 @@ function theme.at_screen_connect(s)
end
gears.wallpaper.maximized(wallpaper, s, true)
- -- All tags open with layout 1
- awful.tag(awful.util.tagnames, s, awful.layout.layouts[1])
+ -- Tags
+ awful.tag(awful.util.tagnames, s, awful.layout.layouts)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s)
- s.mylayoutbox:buttons(my_table.join(
+ s.mylayoutbox:buttons(awful.util.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),
@@ -366,10 +320,10 @@ function theme.at_screen_connect(s)
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
-- Create a tasklist widget
- --s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox
- s.mywibox = awful.wibar({ position = "top", screen = s, height = 20, bg = theme.bg_normal, fg = theme.fg_normal })
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 16, bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the wibox
s.mywibox:setup {
@@ -385,6 +339,7 @@ function theme.at_screen_connect(s)
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
wibox.widget.systray(),
+ wibox.container.margin(scissors, 4, 8),
--[[ using shapes
pl(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "#343434"),
pl(task, "#343434"),
@@ -398,27 +353,27 @@ function theme.at_screen_connect(s)
pl(binclock.widget, "#777E76"),
--]]
-- using separators
- --arrow(theme.bg_normal, "#343434"),
- -- wibox.container.background(wibox.container.margin(wibox.widget { mailicon, mail and mail.widget, layout = wibox.layout.align.horizontal }, 4, 7), "#343434"),
- arrow("alpha", "#7197E7"),
- wibox.container.background(wibox.container.margin(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, 3, 6), "#7197E7"),
- arrow("#7197E7", "#A77AC4"),
- wibox.container.background(wibox.container.margin(wibox.widget { volicon, theme.volume.widget, layout = wibox.layout.align.horizontal }, 2, 3), "#A77AC4"),
- arrow("#A77AC4", "#7197E7"),
- wibox.container.background(wibox.container.margin(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, 2, 3), "#7197E7"),
- arrow("#7197E7", "#A77AC4"),
- wibox.container.background(wibox.container.margin(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, 3, 4), "#A77AC4"),
- arrow("#A77AC4", "#7197E7"),
- wibox.container.background(wibox.container.margin(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, 4, 4), "#7197E7"),
- arrow("#7197E7", "#A77AC4"),
- wibox.container.background(wibox.container.margin(wibox.widget { weathericon, theme.weather.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#A77AC4"),
- arrow("#A77AC4", "#7197E7"),
- wibox.container.background(wibox.container.margin(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#7197E7"),
- arrow("#7197E7", "#A77AC4"),
- wibox.container.background(wibox.container.margin(wibox.widget { nil, neticon, net.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#A77AC4"),
- arrow("#A77AC4", "#7197E7"),
- wibox.container.background(wibox.container.margin(clock, 4, 8), "#7197E7"),
- arrow("#7197E7", "alpha"),
+ arrow(theme.bg_normal, "#343434"),
+ wibox.container.background(wibox.container.margin(wibox.widget { mailicon, mail and mail.widget, layout = wibox.layout.align.horizontal }, 4, 7), "#343434"),
+ arrow("#343434", theme.bg_normal),
+ wibox.container.background(wibox.container.margin(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, 3, 6), theme.bg_focus),
+ arrow(theme.bg_normal, "#343434"),
+ wibox.container.background(wibox.container.margin(task, 3, 7), "#343434"),
+ arrow("#343434", "#777E76"),
+ wibox.container.background(wibox.container.margin(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, 2, 3), "#777E76"),
+ arrow("#777E76", "#4B696D"),
+ wibox.container.background(wibox.container.margin(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, 3, 4), "#4B696D"),
+ arrow("#4B696D", "#4B3B51"),
+ wibox.container.background(wibox.container.margin(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, 4, 4), "#4B3B51"),
+ arrow("#4B3B51", "#CB755B"),
+ wibox.container.background(wibox.container.margin(wibox.widget { fsicon, theme.fs.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#CB755B"),
+ arrow("#CB755B", "#8DAA9A"),
+ wibox.container.background(wibox.container.margin(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#8DAA9A"),
+ arrow("#8DAA9A", "#C0C0A2"),
+ wibox.container.background(wibox.container.margin(wibox.widget { nil, neticon, net.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#C0C0A2"),
+ arrow("#C0C0A2", "#777E76"),
+ wibox.container.background(wibox.container.margin(binclock.widget, 4, 8), "#777E76"),
+ arrow("#777E76", "alpha"),
--]]
s.mylayoutbox,
},
diff --git a/.config/awesome/themes/powerarrow/wall.png b/.config/awesome/themes/powerarrow/wall.png
new file mode 100644
index 0000000..0989db9
Binary files /dev/null and b/.config/awesome/themes/powerarrow/wall.png differ
diff --git a/.config/awesome/themes/rainbow/icons/awesome.png b/.config/awesome/themes/rainbow/icons/awesome.png
new file mode 100644
index 0000000..d99fd37
Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/awesome.png differ
diff --git a/.config/awesome/themes/rainbow/icons/square_sel.png b/.config/awesome/themes/rainbow/icons/square_sel.png
new file mode 100644
index 0000000..532719f
Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/square_sel.png differ
diff --git a/.config/awesome/themes/rainbow/icons/square_unsel.png b/.config/awesome/themes/rainbow/icons/square_unsel.png
new file mode 100644
index 0000000..72dea5b
Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/square_unsel.png differ
diff --git a/.config/awesome/themes/rainbow/icons/submenu.png b/.config/awesome/themes/rainbow/icons/submenu.png
new file mode 100644
index 0000000..26ab82a
Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/submenu.png differ
diff --git a/.config/awesome/themes/rainbow/theme.lua b/.config/awesome/themes/rainbow/theme.lua
new file mode 100644
index 0000000..065ff00
--- /dev/null
+++ b/.config/awesome/themes/rainbow/theme.lua
@@ -0,0 +1,273 @@
+--[[
+
+ Rainbow Awesome WM theme 2.0
+ github.com/copycat-killer
+
+--]]
+
+local gears = require("gears")
+local lain = require("lain")
+local awful = require("awful")
+local wibox = require("wibox")
+local os = { getenv = os.getenv }
+
+local theme = {}
+theme.default_dir = require("awful.util").get_themes_dir() .. "default"
+theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/rainbow"
+theme.wallpaper = theme.dir .. "/wall.png"
+theme.font = "Misc Tamsyn 10.5"
+theme.fg_normal = "#9E9E9E"
+theme.fg_focus = "#EBEBFF"
+theme.bg_normal = "#242424"
+theme.bg_focus = "#242424"
+theme.fg_urgent = "#000000"
+theme.bg_urgent = "#FFFFFF"
+theme.border_width = 1
+theme.border_normal = "#242424"
+theme.border_focus = "#EBEBFF"
+theme.taglist_fg_focus = "#EDEFFF"
+theme.taglist_bg_focus = "#242424"
+theme.menu_height = 16
+theme.menu_width = 140
+theme.ocol = ""
+theme.tasklist_sticky = theme.ocol .. "[S]"
+theme.tasklist_ontop = theme.ocol .. "[T]"
+theme.tasklist_floating = theme.ocol .. "[F]"
+theme.tasklist_maximized_horizontal = theme.ocol .. "[M] "
+theme.tasklist_maximized_vertical = ""
+theme.tasklist_disable_icon = true
+theme.awesome_icon = theme.dir .."/icons/awesome.png"
+theme.menu_submenu_icon = theme.dir .."/icons/submenu.png"
+theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
+theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
+theme.useless_gap = 8
+theme.layout_txt_tile = "[t]"
+theme.layout_txt_tileleft = "[l]"
+theme.layout_txt_tilebottom = "[b]"
+theme.layout_txt_tiletop = "[tt]"
+theme.layout_txt_fairv = "[fv]"
+theme.layout_txt_fairh = "[fh]"
+theme.layout_txt_spiral = "[s]"
+theme.layout_txt_dwindle = "[d]"
+theme.layout_txt_max = "[m]"
+theme.layout_txt_fullscreen = "[F]"
+theme.layout_txt_magnifier = "[M]"
+theme.layout_txt_floating = "[*]"
+theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png"
+theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png"
+theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png"
+theme.titlebar_minimize_button_focus = theme.default_dir.."/titlebar/minimize_focus.png"
+theme.titlebar_ontop_button_normal_inactive = theme.default_dir.."/titlebar/ontop_normal_inactive.png"
+theme.titlebar_ontop_button_focus_inactive = theme.default_dir.."/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_active = theme.default_dir.."/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_active = theme.default_dir.."/titlebar/ontop_focus_active.png"
+theme.titlebar_sticky_button_normal_inactive = theme.default_dir.."/titlebar/sticky_normal_inactive.png"
+theme.titlebar_sticky_button_focus_inactive = theme.default_dir.."/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_active = theme.default_dir.."/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_active = theme.default_dir.."/titlebar/sticky_focus_active.png"
+theme.titlebar_floating_button_normal_inactive = theme.default_dir.."/titlebar/floating_normal_inactive.png"
+theme.titlebar_floating_button_focus_inactive = theme.default_dir.."/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_active = theme.default_dir.."/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_active = theme.default_dir.."/titlebar/floating_focus_active.png"
+theme.titlebar_maximized_button_normal_inactive = theme.default_dir.."/titlebar/maximized_normal_inactive.png"
+theme.titlebar_maximized_button_focus_inactive = theme.default_dir.."/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_active = theme.default_dir.."/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_active = theme.default_dir.."/titlebar/maximized_focus_active.png"
+
+-- lain related
+theme.layout_txt_cascade = "[cascade]"
+theme.layout_txt_cascadetile = "[cascadetile]"
+theme.layout_txt_centerwork = "[centerwork]"
+theme.layout_txt_termfair = "[termfair]"
+theme.layout_txt_centerfair = "[centerfair]"
+
+local markup = lain.util.markup
+local white = theme.fg_focus
+local gray = theme.fg_normal
+
+-- Textclock
+local mytextclock = wibox.widget.textclock(markup(white, " %H:%M "))
+mytextclock.font = theme.font
+
+-- Calendar
+lain.widget.calendar({
+ attach_to = { mytextclock },
+ notification_preset = {
+ font = "Misc Tamsyn 11",
+ fg = white,
+ bg = theme.bg_normal
+ }
+})
+
+--[[ Mail IMAP check
+-- commented because it needs to be set before use
+local mail = lain.widget.imap({
+ timeout = 180,
+ server = "server",
+ mail = "mail",
+ password = "keyring get mail",
+ settings = function()
+ mail_notification_preset.fg = white
+
+ mail = ""
+ count = ""
+
+ if mailcount > 0 then
+ mail = "Mail "
+ count = mailcount .. " "
+ end
+
+ widget:set_markup(markup.font(theme.font, markup(gray, mail) .. markup(white, count)))
+ end
+})
+]]
+
+-- MPD
+theme.mpd = lain.widget.mpd({
+ settings = function()
+ mpd_notification_preset.fg = white
+
+ artist = mpd_now.artist .. " "
+ title = mpd_now.title .. " "
+
+ if mpd_now.state == "pause" then
+ artist = "mpd "
+ title = "paused "
+ elseif mpd_now.state == "stop" then
+ artist = ""
+ title = ""
+ end
+
+ widget:set_markup(markup.font(theme.font, markup(gray, artist) .. markup(white, title)))
+ end
+})
+
+-- /home fs
+theme.fs = lain.widget.fs({
+ partition = "/home",
+ options = "--exclude-type=tmpfs",
+ notification_preset = { fg = white, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" },
+ settings = function()
+ hdd = ""
+ p = ""
+
+ if tonumber(fs_now.used) >= 90 then
+ hdd = " Hdd "
+ p = fs_now.used .. " "
+ end
+
+ widget:set_markup(markup.font(theme.font, markup(gray, hdd) .. markup(white, p)))
+ end
+})
+
+-- ALSA volume bar
+theme.volume = lain.widget.alsabar({
+ ticks = true, width = 67,
+ notification_preset = { font = theme.font }
+})
+theme.volume.tooltip.wibox.fg = theme.fg_focus
+theme.volume.tooltip.wibox.font = theme.font
+theme.volume.bar:buttons(awful.util.table.join (
+ awful.button({}, 1, function()
+ awful.spawn.with_shell(string.format("%s -e alsamixer", terminal))
+ end),
+ awful.button({}, 2, function()
+ awful.spawn(string.format("%s set %s 100%%", theme.volume.cmd, theme.volume.channel))
+ theme.volume.update()
+ end),
+ awful.button({}, 3, function()
+ awful.spawn(string.format("%s set %s toggle", theme.volume.cmd, theme.volume.togglechannel or theme.volume.channel))
+ theme.volume.update()
+ end),
+ awful.button({}, 4, function()
+ awful.spawn(string.format("%s set %s 1%%+", theme.volume.cmd, theme.volume.channel))
+ theme.volume.update()
+ end),
+ awful.button({}, 5, function()
+ awful.spawn(string.format("%s set %s 1%%-", theme.volume.cmd, theme.volume.channel))
+ theme.volume.update()
+ end)
+))
+local volumebg = wibox.container.background(theme.volume.bar, "#585858", gears.shape.rectangle)
+local volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5)
+
+-- Weather
+theme.weather = lain.widget.weather({
+ city_id = 2643743, -- placeholder (London)
+ notification_preset = { font = theme.font, fg = white }
+})
+
+-- Separators
+local first = wibox.widget.textbox(markup.font("Misc Tamsyn 4", " "))
+local spr = wibox.widget.textbox(' ')
+
+local function update_txt_layoutbox(s)
+ -- Writes a string representation of the current layout in a textbox widget
+ local txt_l = theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))] or ""
+ s.mytxtlayoutbox:set_text(txt_l)
+end
+
+function theme.at_screen_connect(s)
+ -- Quake application
+ s.quake = lain.util.quake({ app = awful.util.terminal })
+
+ -- If wallpaper is a function, call it with the screen
+ local wallpaper = theme.wallpaper
+ if type(wallpaper) == "function" then
+ wallpaper = wallpaper(s)
+ end
+ gears.wallpaper.maximized(wallpaper, s, true)
+
+ -- Tags
+ awful.tag(awful.util.tagnames, s, awful.layout.layouts)
+
+ -- Create a promptbox for each screen
+ s.mypromptbox = awful.widget.prompt()
+
+ -- Textual layoutbox
+ s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))])
+ awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end)
+ awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end)
+ s.mytxtlayoutbox:buttons(awful.util.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
+ s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
+
+ -- Create a tasklist widget
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
+
+ -- Create the wibox
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = theme.bg_normal, fg = theme.fg_normal })
+
+ -- Add widgets to the wibox
+ s.mywibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ first,
+ s.mytaglist,
+ spr,
+ s.mytxtlayoutbox,
+ --spr,
+ s.mypromptbox,
+ spr,
+ },
+ s.mytasklist, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ wibox.widget.systray(),
+ spr,
+ theme.mpd.widget,
+ --mail.widget,
+ theme.fs.widget,
+ volumewidget,
+ mytextclock,
+ },
+ }
+end
+
+return theme
diff --git a/.config/awesome/themes/rainbow/wall.png b/.config/awesome/themes/rainbow/wall.png
new file mode 100644
index 0000000..6bed238
Binary files /dev/null and b/.config/awesome/themes/rainbow/wall.png differ
diff --git a/.config/awesome/themes/steamburn/icons/awesome.png b/.config/awesome/themes/steamburn/icons/awesome.png
new file mode 100644
index 0000000..0306bdf
Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/awesome.png differ
diff --git a/.config/awesome/themes/steamburn/icons/square_sel.png b/.config/awesome/themes/steamburn/icons/square_sel.png
new file mode 100644
index 0000000..2bcabb8
Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/square_sel.png differ
diff --git a/.config/awesome/themes/steamburn/icons/square_unsel.png b/.config/awesome/themes/steamburn/icons/square_unsel.png
new file mode 100644
index 0000000..14c4fe4
Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/square_unsel.png differ
diff --git a/.config/awesome/themes/steamburn/icons/submenu.png b/.config/awesome/themes/steamburn/icons/submenu.png
new file mode 100644
index 0000000..12b97c6
Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/submenu.png differ
diff --git a/.config/awesome/themes/steamburn/theme.lua b/.config/awesome/themes/steamburn/theme.lua
new file mode 100644
index 0000000..b078eb9
--- /dev/null
+++ b/.config/awesome/themes/steamburn/theme.lua
@@ -0,0 +1,270 @@
+--[[
+
+ Steamburn Awesome WM theme 3.0
+ github.com/copycat-killer
+
+--]]
+
+local gears = require("gears")
+local lain = require("lain")
+local awful = require("awful")
+local wibox = require("wibox")
+local os = { getenv = os.getenv }
+
+local theme = {}
+theme.zenburn_dir = require("awful.util").get_themes_dir() .. "zenburn"
+theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/steamburn"
+theme.wallpaper = theme.dir .. "/wall.png"
+theme.font = "Misc Tamsyn 10.5"
+theme.fg_normal = "#e2ccb0"
+theme.fg_focus = "#d88166"
+theme.fg_urgent = "#CC9393"
+theme.bg_normal = "#140c0b"
+theme.bg_focus = "#140c0b"
+theme.bg_urgent = "#2a1f1e"
+theme.border_width = 1
+theme.border_normal = "#302627"
+theme.border_focus = "#c2745b"
+theme.border_marked = "#CC9393"
+theme.taglist_fg_focus = "#d88166"
+theme.tasklist_bg_focus = "#140c0b"
+theme.tasklist_fg_focus = "#d88166"
+theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
+theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
+theme.menu_height = 16
+theme.menu_width = 140
+theme.awesome_icon = theme.dir .."/icons/awesome.png"
+theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
+theme.layout_txt_tile = "[t]"
+theme.layout_txt_tileleft = "[l]"
+theme.layout_txt_tilebottom = "[b]"
+theme.layout_txt_tiletop = "[tt]"
+theme.layout_txt_fairv = "[fv]"
+theme.layout_txt_fairh = "[fh]"
+theme.layout_txt_spiral = "[s]"
+theme.layout_txt_dwindle = "[d]"
+theme.layout_txt_max = "[m]"
+theme.layout_txt_fullscreen = "[F]"
+theme.layout_txt_magnifier = "[M]"
+theme.layout_txt_floating = "[|]"
+theme.tasklist_plain_task_name = true
+theme.tasklist_disable_icon = true
+theme.useless_gap = 0
+theme.titlebar_close_button_normal = theme.zenburn_dir.."/titlebar/close_normal.png"
+theme.titlebar_close_button_focus = theme.zenburn_dir.."/titlebar/close_focus.png"
+theme.titlebar_minimize_button_normal = theme.zenburn_dir.."/titlebar/minimize_normal.png"
+theme.titlebar_minimize_button_focus = theme.zenburn_dir.."/titlebar/minimize_focus.png"
+theme.titlebar_ontop_button_normal_inactive = theme.zenburn_dir.."/titlebar/ontop_normal_inactive.png"
+theme.titlebar_ontop_button_focus_inactive = theme.zenburn_dir.."/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_active = theme.zenburn_dir.."/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_active = theme.zenburn_dir.."/titlebar/ontop_focus_active.png"
+theme.titlebar_sticky_button_normal_inactive = theme.zenburn_dir.."/titlebar/sticky_normal_inactive.png"
+theme.titlebar_sticky_button_focus_inactive = theme.zenburn_dir.."/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_active = theme.zenburn_dir.."/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_active = theme.zenburn_dir.."/titlebar/sticky_focus_active.png"
+theme.titlebar_floating_button_normal_inactive = theme.zenburn_dir.."/titlebar/floating_normal_inactive.png"
+theme.titlebar_floating_button_focus_inactive = theme.zenburn_dir.."/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_active = theme.zenburn_dir.."/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_active = theme.zenburn_dir.."/titlebar/floating_focus_active.png"
+theme.titlebar_maximized_button_normal_inactive = theme.zenburn_dir.."/titlebar/maximized_normal_inactive.png"
+theme.titlebar_maximized_button_focus_inactive = theme.zenburn_dir.."/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_active = theme.zenburn_dir.."/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_active = theme.zenburn_dir.."/titlebar/maximized_focus_active.png"
+
+-- lain related
+theme.layout_txt_termfair = "[termfair]"
+theme.layout_txt_centerfair = "[centerfair]"
+
+local markup = lain.util.markup
+local gray = "#94928F"
+
+-- Textclock
+local mytextclock = wibox.widget.textclock(" %H:%M ")
+mytextclock.font = theme.font
+
+-- Calendar
+lain.widget.calendar({
+ attach_to = { mytextclock },
+ notification_preset = {
+ font = "Misc Tamsyn 11",
+ fg = theme.fg_normal,
+ bg = theme.bg_normal
+ }
+})
+
+--[[ Mail IMAP check
+-- commented because it needs to be set before use
+local mail = lain.widget.imap({
+ timeout = 180,
+ server = "server",
+ mail = "mail",
+ password = "keyring get mail",
+ settings = function()
+ mail = ""
+ count = ""
+
+ if mailcount > 0 then
+ mail = "Mail "
+ count = mailcount .. " "
+ end
+
+ widget:set_markup(markup(gray, mail) .. count)
+ end
+})
+--]]
+
+-- MPD
+theme.mpd = lain.widget.mpd({
+ settings = function()
+ artist = mpd_now.artist .. " "
+ title = mpd_now.title .. " "
+
+ if mpd_now.state == "pause" then
+ artist = "mpd "
+ title = "paused "
+ elseif mpd_now.state == "stop" then
+ artist = ""
+ title = ""
+ end
+
+ widget:set_markup(markup.font(theme.font, markup(gray, artist) .. title))
+ end
+})
+
+-- CPU
+local cpu = lain.widget.sysload({
+ settings = function()
+ widget:set_markup(markup.font(theme.font, markup(gray, " Cpu ") .. load_1 .. " "))
+ end
+})
+
+-- MEM
+local mem = lain.widget.mem({
+ settings = function()
+ widget:set_markup(markup.font(theme.font, markup(gray, " Mem ") .. mem_now.used .. " "))
+ end
+})
+
+-- /home fs
+theme.fs = lain.widget.fs({
+ options = "--exclude-type=tmpfs",
+ partition = "/home",
+ notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Misc Tamsyn 10.5" },
+})
+
+-- Battery
+local bat = lain.widget.bat({
+ settings = function()
+ local perc = bat_now.perc
+ if bat_now.ac_status == 1 then perc = "Plug" end
+ widget:set_markup(markup.font(theme.font, markup(gray, " Bat ") .. perc .. " "))
+ end
+})
+
+-- Net checker
+local net = lain.widget.net({
+ settings = function()
+ if net_now.state == "up" then net_state = "On"
+ else net_state = "Off" end
+ widget:set_markup(markup.font(theme.font, markup(gray, " Net ") .. net_state .. " "))
+ end
+})
+
+-- ALSA volume
+theme.volume = lain.widget.alsa({
+ settings = function()
+ header = " Vol "
+ vlevel = volume_now.level
+
+ if volume_now.status == "off" then
+ vlevel = vlevel .. "M "
+ else
+ vlevel = vlevel .. " "
+ end
+
+ widget:set_markup(markup.font(theme.font, markup(gray, header) .. vlevel))
+ end
+})
+
+-- Weather
+theme.weather = lain.widget.weather({
+ city_id = 2643743, -- placeholder (London)
+})
+
+-- Separators
+local first = wibox.widget.textbox(markup.font("Misc Tamsyn 4", " "))
+local spr = wibox.widget.textbox(' ')
+
+local function update_txt_layoutbox(s)
+ -- Writes a string representation of the current layout in a textbox widget
+ local txt_l = theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))] or ""
+ s.mytxtlayoutbox:set_text(txt_l)
+end
+
+function theme.at_screen_connect(s)
+ -- Quake application
+ s.quake = lain.util.quake({ app = awful.util.terminal })
+
+ -- If wallpaper is a function, call it with the screen
+ local wallpaper = theme.wallpaper
+ if type(wallpaper) == "function" then
+ wallpaper = wallpaper(s)
+ end
+ gears.wallpaper.maximized(wallpaper, s, true)
+
+ -- Tags
+ awful.tag(awful.util.tagnames, s, awful.layout.layouts)
+
+ -- Create a promptbox for each screen
+ s.mypromptbox = awful.widget.prompt()
+
+ -- Textual layoutbox
+ s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))])
+ awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end)
+ awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end)
+ s.mytxtlayoutbox:buttons(awful.util.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
+ s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
+
+ -- Create a tasklist widget
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
+
+ -- Create the wibox
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 18 })
+
+ -- Add widgets to the wibox
+ s.mywibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ first,
+ s.mytaglist,
+ spr,
+ s.mytxtlayoutbox,
+ --spr,
+ s.mypromptbox,
+ spr,
+ },
+ s.mytasklist, -- Middle widget
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ wibox.widget.systray(),
+ spr,
+ theme.mpd.widget,
+ --mail.widget,
+ cpu.widget,
+ mem.widget,
+ bat.widget,
+ net.widget,
+ theme.volume.widget,
+ mytextclock
+ },
+ }
+end
+
+return theme
diff --git a/.config/awesome/themes/steamburn/wall.png b/.config/awesome/themes/steamburn/wall.png
new file mode 100644
index 0000000..57359d1
Binary files /dev/null and b/.config/awesome/themes/steamburn/wall.png differ
diff --git a/.config/awesome/themes/vertex/icons/awesome.png b/.config/awesome/themes/vertex/icons/awesome.png
new file mode 100644
index 0000000..b700a1a
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/awesome.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-000-charging.png b/.config/awesome/themes/vertex/icons/bat-000-charging.png
new file mode 100644
index 0000000..cc2abdd
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-000-charging.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-000.png b/.config/awesome/themes/vertex/icons/bat-000.png
new file mode 100644
index 0000000..550d8f0
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-000.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-020-charging.png b/.config/awesome/themes/vertex/icons/bat-020-charging.png
new file mode 100644
index 0000000..bd5e788
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-020-charging.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-020.png b/.config/awesome/themes/vertex/icons/bat-020.png
new file mode 100644
index 0000000..c8525eb
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-020.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-040-charging.png b/.config/awesome/themes/vertex/icons/bat-040-charging.png
new file mode 100644
index 0000000..5d20c11
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-040-charging.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-040.png b/.config/awesome/themes/vertex/icons/bat-040.png
new file mode 100644
index 0000000..ad378bf
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-040.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-060-charging.png b/.config/awesome/themes/vertex/icons/bat-060-charging.png
new file mode 100644
index 0000000..ea7c293
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-060-charging.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-060.png b/.config/awesome/themes/vertex/icons/bat-060.png
new file mode 100644
index 0000000..5883885
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-060.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-080-charging.png b/.config/awesome/themes/vertex/icons/bat-080-charging.png
new file mode 100644
index 0000000..b633044
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-080-charging.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-080.png b/.config/awesome/themes/vertex/icons/bat-080.png
new file mode 100644
index 0000000..d3fb971
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-080.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-100-charging.png b/.config/awesome/themes/vertex/icons/bat-100-charging.png
new file mode 100644
index 0000000..f2d7419
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-100-charging.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-100.png b/.config/awesome/themes/vertex/icons/bat-100.png
new file mode 100644
index 0000000..5852e69
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-100.png differ
diff --git a/.config/awesome/themes/vertex/icons/bat-charged.png b/.config/awesome/themes/vertex/icons/bat-charged.png
new file mode 100644
index 0000000..bb6b657
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-charged.png differ
diff --git a/.config/awesome/themes/vertex/icons/ethernet-connected.png b/.config/awesome/themes/vertex/icons/ethernet-connected.png
new file mode 100644
index 0000000..6894931
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/ethernet-connected.png differ
diff --git a/.config/awesome/themes/vertex/icons/ethernet-disconnected.png b/.config/awesome/themes/vertex/icons/ethernet-disconnected.png
new file mode 100644
index 0000000..cfd73bb
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/ethernet-disconnected.png differ
diff --git a/.config/awesome/themes/vertex/icons/panel.png b/.config/awesome/themes/vertex/icons/panel.png
new file mode 100644
index 0000000..2f429e5
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/panel.png differ
diff --git a/.config/awesome/themes/vertex/icons/square_sel.png b/.config/awesome/themes/vertex/icons/square_sel.png
new file mode 100644
index 0000000..b94c0c5
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/square_sel.png differ
diff --git a/.config/awesome/themes/vertex/icons/square_unsel.png b/.config/awesome/themes/vertex/icons/square_unsel.png
new file mode 100644
index 0000000..af19a20
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/square_unsel.png differ
diff --git a/.config/awesome/themes/vertex/icons/volume-high.png b/.config/awesome/themes/vertex/icons/volume-high.png
new file mode 100644
index 0000000..8fc8279
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-high.png differ
diff --git a/.config/awesome/themes/vertex/icons/volume-low.png b/.config/awesome/themes/vertex/icons/volume-low.png
new file mode 100644
index 0000000..7a0682f
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-low.png differ
diff --git a/.config/awesome/themes/vertex/icons/volume-medium.png b/.config/awesome/themes/vertex/icons/volume-medium.png
new file mode 100644
index 0000000..2b5c888
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-medium.png differ
diff --git a/.config/awesome/themes/vertex/icons/volume-muted-blocked.png b/.config/awesome/themes/vertex/icons/volume-muted-blocked.png
new file mode 100644
index 0000000..6dea15b
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-muted-blocked.png differ
diff --git a/.config/awesome/themes/vertex/icons/volume-muted.png b/.config/awesome/themes/vertex/icons/volume-muted.png
new file mode 100644
index 0000000..7d08ac9
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-muted.png differ
diff --git a/.config/awesome/themes/vertex/icons/volume-off.png b/.config/awesome/themes/vertex/icons/volume-off.png
new file mode 100644
index 0000000..8a6d8c5
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-off.png differ
diff --git a/.config/awesome/themes/vertex/icons/wireless-disconnected.png b/.config/awesome/themes/vertex/icons/wireless-disconnected.png
new file mode 100644
index 0000000..f98d8b4
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-disconnected.png differ
diff --git a/.config/awesome/themes/vertex/icons/wireless-full.png b/.config/awesome/themes/vertex/icons/wireless-full.png
new file mode 100644
index 0000000..3f83dec
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-full.png differ
diff --git a/.config/awesome/themes/vertex/icons/wireless-high.png b/.config/awesome/themes/vertex/icons/wireless-high.png
new file mode 100644
index 0000000..b3622ec
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-high.png differ
diff --git a/.config/awesome/themes/vertex/icons/wireless-low.png b/.config/awesome/themes/vertex/icons/wireless-low.png
new file mode 100644
index 0000000..3f1e740
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-low.png differ
diff --git a/.config/awesome/themes/vertex/icons/wireless-medium.png b/.config/awesome/themes/vertex/icons/wireless-medium.png
new file mode 100644
index 0000000..6bd0ec5
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-medium.png differ
diff --git a/.config/awesome/themes/vertex/icons/wireless-none.png b/.config/awesome/themes/vertex/icons/wireless-none.png
new file mode 100644
index 0000000..e47b478
Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-none.png differ
diff --git a/.config/awesome/themes/vertex/theme.lua b/.config/awesome/themes/vertex/theme.lua
new file mode 100644
index 0000000..93cf599
--- /dev/null
+++ b/.config/awesome/themes/vertex/theme.lua
@@ -0,0 +1,463 @@
+--[[
+
+ Vertex Awesome WM theme
+ github.com/copycat-killer
+
+--]]
+
+local gears = require("gears")
+local lain = require("lain")
+local awful = require("awful")
+local wibox = require("wibox")
+
+local math, string, tag, tonumber, type, os = math, string, tag, tonumber, type, os
+
+local theme = {}
+theme.default_dir = require("awful.util").get_themes_dir() .. "default"
+theme.icon_dir = os.getenv("HOME") .. "/.config/awesome/themes/vertex/icons"
+theme.wallpaper = os.getenv("HOME") .. "/.config/awesome/themes/vertex/wall.png"
+theme.font = "Roboto Bold 10"
+theme.taglist_font = "FontAwesome 17"
+theme.fg_normal = "#FFFFFF"
+theme.fg_focus = "#6A95EB"
+theme.bg_focus = "#303030"
+theme.bg_normal = "#242424"
+theme.fg_urgent = "#CC9393"
+theme.bg_urgent = "#006B8E"
+theme.border_width = 4
+theme.border_normal = "#252525"
+theme.border_focus = "#7CA2EE"
+theme.tooltip_border_color = theme.fg_focus
+theme.tooltip_border_width = theme.border_width
+theme.menu_height = 24
+theme.menu_width = 140
+theme.awesome_icon = theme.icon_dir .. "/awesome.png"
+theme.taglist_squares_sel = theme.icon_dir .. "/square_sel.png"
+theme.taglist_squares_unsel = theme.icon_dir .. "/square_unsel.png"
+theme.panelbg = theme.icon_dir .. "/panel.png"
+theme.bat000charging = theme.icon_dir .. "/bat-000-charging.png"
+theme.bat000 = theme.icon_dir .. "/bat-000.png"
+theme.bat020charging = theme.icon_dir .. "/bat-020-charging.png"
+theme.bat020 = theme.icon_dir .. "/bat-020.png"
+theme.bat040charging = theme.icon_dir .. "/bat-040-charging.png"
+theme.bat040 = theme.icon_dir .. "/bat-040.png"
+theme.bat060charging = theme.icon_dir .. "/bat-060-charging.png"
+theme.bat060 = theme.icon_dir .. "/bat-060.png"
+theme.bat080charging = theme.icon_dir .. "/bat-080-charging.png"
+theme.bat080 = theme.icon_dir .. "/bat-080.png"
+theme.bat100charging = theme.icon_dir .. "/bat-100-charging.png"
+theme.bat100 = theme.icon_dir .. "/bat-100.png"
+theme.batcharged = theme.icon_dir .. "/bat-charged.png"
+theme.ethon = theme.icon_dir .. "/ethernet-connected.png"
+theme.ethoff = theme.icon_dir .. "/ethernet-disconnected.png"
+theme.volhigh = theme.icon_dir .. "/volume-high.png"
+theme.vollow = theme.icon_dir .. "/volume-low.png"
+theme.volmed = theme.icon_dir .. "/volume-medium.png"
+theme.volmutedblocked = theme.icon_dir .. "/volume-muted-blocked.png"
+theme.volmuted = theme.icon_dir .. "/volume-muted.png"
+theme.voloff = theme.icon_dir .. "/volume-off.png"
+theme.wifidisc = theme.icon_dir .. "/wireless-disconnected.png"
+theme.wififull = theme.icon_dir .. "/wireless-full.png"
+theme.wifihigh = theme.icon_dir .. "/wireless-high.png"
+theme.wifilow = theme.icon_dir .. "/wireless-low.png"
+theme.wifimed = theme.icon_dir .. "/wireless-medium.png"
+theme.wifinone = theme.icon_dir .. "/wireless-none.png"
+theme.layout_fairh = theme.default_dir.."/layouts/fairhw.png"
+theme.layout_fairv = theme.default_dir.."/layouts/fairvw.png"
+theme.layout_floating = theme.default_dir.."/layouts/floatingw.png"
+theme.layout_magnifier = theme.default_dir.."/layouts/magnifierw.png"
+theme.layout_max = theme.default_dir.."/layouts/maxw.png"
+theme.layout_fullscreen = theme.default_dir.."/layouts/fullscreenw.png"
+theme.layout_tilebottom = theme.default_dir.."/layouts/tilebottomw.png"
+theme.layout_tileleft = theme.default_dir.."/layouts/tileleftw.png"
+theme.layout_tile = theme.default_dir.."/layouts/tilew.png"
+theme.layout_tiletop = theme.default_dir.."/layouts/tiletopw.png"
+theme.layout_spiral = theme.default_dir.."/layouts/spiralw.png"
+theme.layout_dwindle = theme.default_dir.."/layouts/dwindlew.png"
+theme.layout_cornernw = theme.default_dir.."/layouts/cornernww.png"
+theme.layout_cornerne = theme.default_dir.."/layouts/cornernew.png"
+theme.layout_cornersw = theme.default_dir.."/layouts/cornersww.png"
+theme.layout_cornerse = theme.default_dir.."/layouts/cornersew.png"
+theme.tasklist_plain_task_name = true
+theme.tasklist_disable_icon = true
+theme.useless_gap = 10
+theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png"
+theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png"
+theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png"
+theme.titlebar_minimize_button_focus = theme.default_dir.."/titlebar/minimize_focus.png"
+theme.titlebar_ontop_button_normal_inactive = theme.default_dir.."/titlebar/ontop_normal_inactive.png"
+theme.titlebar_ontop_button_focus_inactive = theme.default_dir.."/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_active = theme.default_dir.."/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_active = theme.default_dir.."/titlebar/ontop_focus_active.png"
+theme.titlebar_sticky_button_normal_inactive = theme.default_dir.."/titlebar/sticky_normal_inactive.png"
+theme.titlebar_sticky_button_focus_inactive = theme.default_dir.."/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_active = theme.default_dir.."/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_active = theme.default_dir.."/titlebar/sticky_focus_active.png"
+theme.titlebar_floating_button_normal_inactive = theme.default_dir.."/titlebar/floating_normal_inactive.png"
+theme.titlebar_floating_button_focus_inactive = theme.default_dir.."/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_active = theme.default_dir.."/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_active = theme.default_dir.."/titlebar/floating_focus_active.png"
+theme.titlebar_maximized_button_normal_inactive = theme.default_dir.."/titlebar/maximized_normal_inactive.png"
+theme.titlebar_maximized_button_focus_inactive = theme.default_dir.."/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_active = theme.default_dir.."/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_active = theme.default_dir.."/titlebar/maximized_focus_active.png"
+
+-- http://fontawesome.io/cheatsheet
+awful.util.tagnames = { " ", " ", " ", " ", " ", " ", " ", " ", " " }
+
+local markup = lain.util.markup
+
+-- Clock
+--os.setlocale(os.getenv("LANG")) -- to localize the clock
+local mytextclock = wibox.widget.textclock(markup("#FFFFFF", "%a %d %b, %H:%M"))
+mytextclock.font = theme.font
+lain.widget.calendar({
+ attach_to = { mytextclock },
+ notification_preset = {
+ fg = "#FFFFFF",
+ bg = theme.bg_normal,
+ position = "top_middle",
+ font = "Monospace 10"
+ }
+})
+
+-- Battery
+local baticon = wibox.widget.imagebox(theme.bat000)
+local battooltip = awful.tooltip({
+ objects = { baticon },
+ margin_leftright = 15,
+ margin_topbottom = 12
+})
+battooltip.wibox.fg = theme.fg_normal
+battooltip.textbox.font = theme.font
+battooltip.timeout = 0
+battooltip:set_shape(function(cr, width, height)
+ gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 35)
+end)
+local bat = lain.widget.bat({
+ settings = function()
+ local index, perc = "bat", tonumber(bat_now.perc) or 0
+
+ if perc <= 7 then
+ index = index .. "000"
+ elseif perc <= 20 then
+ index = index .. "020"
+ elseif perc <= 40 then
+ index = index .. "040"
+ elseif perc <= 60 then
+ index = index .. "060"
+ elseif perc <= 80 then
+ index = index .. "080"
+ elseif perc <= 100 then
+ index = index .. "100"
+ end
+
+ if bat_now.ac_status == 1 then
+ index = index .. "charging"
+ end
+
+ baticon:set_image(theme[index])
+ battooltip:set_markup(string.format("\n%s%%, %s", perc, bat_now.time))
+ end
+})
+
+-- MPD
+theme.mpd = lain.widget.mpd({
+ music_dir = "/mnt/storage/Downloads/Music",
+ settings = function()
+ if mpd_now.state == "play" then
+ title = mpd_now.title
+ artist = " " .. mpd_now.artist .. " "
+ elseif mpd_now.state == "pause" then
+ title = "mpd "
+ artist = "paused "
+ else
+ title = ""
+ artist = ""
+ end
+
+ widget:set_markup(markup.font(theme.font, title .. markup(theme.fg_focus, artist)))
+ end
+})
+
+-- ALSA volume
+local volicon = wibox.widget.imagebox()
+theme.volume = lain.widget.alsabar({
+ --togglechannel = "IEC958,3",
+ notification_preset = { font = "Monospace 12", fg = theme.fg_normal },
+ settings = function()
+ local index, perc = "", tonumber(volume_now.level) or 0
+
+ if volume_now.status == "off" then
+ index = "volmutedblocked"
+ else
+ if perc <= 5 then
+ index = "volmuted"
+ elseif perc <= 25 then
+ index = "vollow"
+ elseif perc <= 75 then
+ index = "volmed"
+ else
+ index = "volhigh"
+ end
+ end
+
+ volicon:set_image(theme[index])
+ end
+})
+volicon:buttons(awful.util.table.join (
+ awful.button({}, 1, function()
+ awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal))
+ end),
+ awful.button({}, 2, function()
+ awful.spawn(string.format("%s set %s 100%%", theme.volume.cmd, theme.volume.channel))
+ theme.volume.notify()
+ end),
+ awful.button({}, 3, function()
+ awful.spawn(string.format("%s set %s toggle", theme.volume.cmd, theme.volume.togglechannel or theme.volume.channel))
+ theme.volume.notify()
+ end),
+ awful.button({}, 4, function()
+ awful.spawn(string.format("%s set %s 1%%+", theme.volume.cmd, theme.volume.channel))
+ theme.volume.notify()
+ end),
+ awful.button({}, 5, function()
+ awful.spawn(string.format("%s set %s 1%%-", theme.volume.cmd, theme.volume.channel))
+ theme.volume.notify()
+ end)
+))
+
+-- Wifi carrier and signal strength
+local wificon = wibox.widget.imagebox()
+local wifitooltip = awful.tooltip({
+ objects = { wificon },
+ margin_leftright = 15,
+ margin_topbottom = 15
+})
+wifitooltip.wibox.fg = theme.fg_normal
+wifitooltip.textbox.font = theme.font
+wifitooltip.timeout = 0
+wifitooltip:set_shape(function(cr, width, height)
+ gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 120)
+end)
+local mywifisig = awful.widget.watch(
+ { awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" },
+ 2,
+ function(widget, stdout)
+ local carrier, perc = stdout:match("(%d)-(%d+)")
+ local tiptext = stdout:gsub("(%d)-(%d+)", ""):gsub("%s+$", "")
+
+ if carrier == "1" then
+ wificon:set_image(theme.wifidisc)
+ wifitooltip:set_markup("No carrier")
+ else
+ perc = tonumber(perc)
+ if perc <= 5 then
+ wificon:set_image(theme.wifinone)
+ elseif perc <= 25 then
+ wificon:set_image(theme.wifilow)
+ elseif perc <= 50 then
+ wificon:set_image(theme.wifimed)
+ elseif perc <= 75 then
+ wificon:set_image(theme.wifihigh)
+ else
+ wificon:set_image(theme.wififull)
+ end
+ wifitooltip:set_markup(tiptext)
+ end
+ end
+)
+wificon:connect_signal("button::press", function() awful.spawn(string.format("%s -e wavemon", awful.util.terminal)) end)
+
+-- Weather
+theme.weather = lain.widget.weather({
+ city_id = 2643743, -- placeholder (London)
+ notification_preset = { font = "Monospace 10" },
+ settings = function()
+ units = math.floor(weather_now["main"]["temp"])
+ widget:set_markup(" " .. markup.font(theme.font, units .. "°C") .. " ")
+ end
+})
+
+-- Launcher
+local mylauncher = awful.widget.button({image = theme.awesome_icon})
+mylauncher:connect_signal("button::press", function() awful.util.mymainmenu:toggle() end)
+
+-- Separators
+local space = wibox.widget.textbox(" ")
+local rspace1 = wibox.widget.textbox()
+local rspace0 = wibox.widget.textbox()
+local rspace2 = wibox.widget.textbox()
+local rspace3 = wibox.widget.textbox()
+local tspace1 = wibox.widget.textbox()
+tspace1.forced_width = 18
+rspace1.forced_width = 16
+rspace0.forced_width = 18
+rspace2.forced_width = 19
+rspace3.forced_width = 21
+
+local lspace1 = wibox.widget.textbox()
+local lspace2 = wibox.widget.textbox()
+local lspace3 = wibox.widget.textbox()
+lspace1.forced_height = 18
+lspace2.forced_height = 10
+lspace3.forced_height = 16
+
+local barcolor = gears.color({
+ type = "linear",
+ from = { 0, 46 },
+ to = { 46, 46 },
+ stops = { {0, theme.bg_focus}, {0.9, "#457be7"} }
+})
+
+local barcolor2 = gears.color({
+ type = "linear",
+ from = { 0, 46 },
+ to = { 46, 46 },
+ stops = { {0, "#323232"}, {1, theme.bg_normal} }
+})
+
+local dockshape = function(cr, width, height)
+ gears.shape.partially_rounded_rect(cr, width, height, false, true, true, false, 6)
+end
+
+function theme.vertical_wibox(s)
+ -- Create the vertical wibox
+ s.dockheight = (40 * s.workarea.height)/100
+
+ s.myleftwibox = wibox({ screen = s, x=0, y=s.workarea.height/2 - s.dockheight/2, width = 6, height = s.dockheight, fg = theme.fg_normal, bg = barcolor2, ontop = true, visible = true, type = "dock" })
+
+ if s.index > 1 and s.myleftwibox.y == 0 then
+ s.myleftwibox.y = screen[1].myleftwibox.y
+ end
+
+ -- Add widgets to the vertical wibox
+ s.myleftwibox:setup {
+ layout = wibox.layout.align.vertical,
+ {
+ layout = wibox.layout.fixed.vertical,
+ lspace1,
+ s.mytaglist,
+ lspace2,
+ s.layoutb,
+ wibox.container.margin(mylauncher, 5, 8, 13, 0),
+ },
+ }
+
+ -- Add toggling functionalities
+ s.docktimer = gears.timer{ timeout = 2 }
+ s.docktimer:connect_signal("timeout", function()
+ local s = awful.screen.focused()
+ s.myleftwibox.width = 6
+ s.layoutb.visible = false
+ mylauncher.visible = false
+ if s.docktimer.started then
+ s.docktimer:stop()
+ end
+ end)
+ tag.connect_signal("property::selected", function(t)
+ local s = t.screen or awful.screen.focused()
+ s.myleftwibox.width = 46
+ s.layoutb.visible = true
+ mylauncher.visible = true
+ gears.surface.apply_shape_bounding(s.myleftwibox, dockshape)
+ if not s.docktimer.started then
+ s.docktimer:start()
+ end
+ end)
+
+ s.myleftwibox:connect_signal("mouse::leave", function()
+ local s = awful.screen.focused()
+ s.myleftwibox.width = 6
+ s.layoutb.visible = false
+ mylauncher.visible = false
+ end)
+
+ s.myleftwibox:connect_signal("mouse::enter", function()
+ local s = awful.screen.focused()
+ s.myleftwibox.width = 46
+ s.layoutb.visible = true
+ mylauncher.visible = true
+ gears.surface.apply_shape_bounding(s.myleftwibox, dockshape)
+ end)
+end
+
+
+function theme.at_screen_connect(s)
+ -- Quake application
+ s.quake = lain.util.quake({ app = awful.util.terminal, border = theme.border_width })
+
+ -- If wallpaper is a function, call it with the screen
+ local wallpaper = theme.wallpaper
+ if type(wallpaper) == "function" then
+ wallpaper = wallpaper(s)
+ end
+ gears.wallpaper.maximized(wallpaper, s, true)
+
+ -- Tags
+ awful.tag(awful.util.tagnames, s, awful.layout.layouts)
+
+ -- Create a promptbox for each screen
+ s.mypromptbox = awful.widget.prompt()
+ s.mypromptbox.bg = "#00000000"
+
+ -- Create an imagebox widget which will contains an icon indicating which layout we're using.
+ -- We need one layoutbox per screen.
+ s.mylayoutbox = awful.widget.layoutbox(s)
+ s.mylayoutbox:buttons(awful.util.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)))
+ s.layoutb = wibox.container.margin(s.mylayoutbox, 8, 11, 3, 3)
+
+ -- Create a taglist widget
+ s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons, {
+ font = theme.taglist_font,
+ shape = gears.shape.rectangle,
+ spacing = 10,
+ square_unsel = theme.square_unsel,
+ bg_focus = barcolor
+ }, nil, wibox.layout.fixed.vertical())
+
+ -- Create a tasklist widget
+ s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.focused, awful.util.tasklist_buttons, { bg_focus = "#00000000" })
+
+ -- Create the wibox
+ s.mywibox = awful.wibar({ position = "top", screen = s, height = 25, bg = gears.color.create_png_pattern(theme.panelbg) })
+
+ -- Add widgets to the wibox
+ s.mywibox:setup {
+ layout = wibox.layout.align.horizontal,
+ { -- Left widgets
+ layout = wibox.layout.fixed.horizontal,
+ s.mypromptbox,
+ tspace1,
+ wibox.container.constraint(s.mytasklist, "exact", s.workarea.width/2.6),
+ },
+ { -- Middle widgets
+ layout = wibox.layout.flex.horizontal,
+ space,
+ mytextclock,
+ },
+ { -- Right widgets
+ layout = wibox.layout.fixed.horizontal,
+ wibox.container.constraint(wibox.widget { nil, nil, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "exact", s.workarea.width/3),
+ rspace0,
+ theme.weather.icon,
+ theme.weather.widget,
+ rspace1,
+ wificon,
+ rspace0,
+ volicon,
+ rspace2,
+ baticon,
+ rspace3,
+ wibox.widget.systray(),
+ },
+ }
+
+ gears.timer.delayed_call(theme.vertical_wibox, s)
+end
+
+return theme
diff --git a/.config/awesome/themes/vertex/wall.png b/.config/awesome/themes/vertex/wall.png
new file mode 100644
index 0000000..863b1bf
Binary files /dev/null and b/.config/awesome/themes/vertex/wall.png differ
diff --git a/.config/awesome/widgets/gpmdp.lua b/.config/awesome/widgets/gpmdp.lua
new file mode 100644
index 0000000..bbbca70
--- /dev/null
+++ b/.config/awesome/widgets/gpmdp.lua
@@ -0,0 +1,104 @@
+
+--[[
+
+ Licensed under GNU General Public License v2
+ * (c) 2017, Greg Flynn
+
+--]]
+local awful = require("awful")
+local naughty = require("naughty")
+local io, next, os, string, table = io, next, os, string, table
+
+-- Google Play Music Desktop Player widget
+-- requires: curl and dkjson or lain
+
+local gpmdp = {
+ notify = "on",
+ followtag = false,
+ file_location = os.getenv("HOME") .. "/.config/Google Play Music Desktop Player/json_store/playback.json",
+ notification_preset = {
+ title = "Now playing",
+-- icon_size = dpi(128),
+ timeout = 6
+ },
+ notification = nil,
+ current_track = nil,
+ album_cover = "/tmp/gpmcover"
+}
+
+function gpmdp.notification_on()
+ local gpm_now = gpmdp.latest
+ gpmdp.current_track = gpm_now.title
+
+ if gpmdp.followtag then gpmdp.notification_preset.screen = awful.screen.focused() end
+ awful.spawn.easy_async({"curl", gpm_now.cover_url, "-o", gpmdp.album_cover}, function(stdout)
+ local old_id = nil
+ if gpmdp.notification then old_id = gpmdp.notification.id end
+
+ gpmdp.notification = naughty.notify({
+ preset = gpmdp.notification_preset,
+ icon = gpmdp.album_cover,
+ replaces_id = old_id
+ })
+ end)
+end
+
+function gpmdp.notification_off()
+ if not gpmdp.notification then return end
+ naughty.destroy(gpmdp.notification)
+ gpmdp.notification = nil
+end
+
+function gpmdp.get_lines(file)
+ local f = io.open(file)
+ if not f then
+ return
+ else
+ f:close()
+ end
+
+ local lines = {}
+ for line in io.lines(file) do
+ lines[#lines + 1] = line
+ end
+ return lines
+end
+
+gpmdp.widget = awful.widget.watch({"pidof", "Google Play Music Desktop Player"}, 2, function(widget, stdout)
+ local filelines = gpmdp.get_lines(gpmdp.file_location)
+ if not filelines then return end -- GPMDP not running?
+
+ gpm_now = { running = stdout ~= '' }
+
+ if not next(filelines) then
+ gpm_now.running = false
+ gpm_now.playing = false
+ else
+ --dict, pos, err = require("dkjson").decode(table.concat(filelines), 1, nil) -- dkjson
+ dict, pos, err = require("lain.util").dkjson.decode(table.concat(filelines), 1, nil) -- lain
+ gpm_now.artist = dict.song.artist
+ gpm_now.album = dict.song.album
+ gpm_now.title = dict.song.title
+ gpm_now.cover_url = dict.song.albumArt
+ gpm_now.playing = dict.playing
+ end
+ gpmdp.latest = gpm_now
+
+ -- customize here
+ gpmdp_notification_preset.text = string.format("%s (%s) - %s", gpm_now.artist, gpm_now.album, gpm_now.title)
+ widget:set_text(gpm_now.artist .. " - " .. gpm_now.title)
+
+ if gpm_now.playing then
+ if gpmdp.notify == "on" and gpm_now.title ~= gpmdp.current_track then
+ gpmdp.notification_on()
+ end
+ elseif not gpm_now.running then
+ gpmdp.current_track = nil
+ end
+end)
+
+-- add mouse hover
+gpmdp.widget:connect_signal("mouse::enter", gpmdp.notification_on)
+gpmdp.widget:connect_signal("mouse::leave", gpmdp.notification_off)
+
+return gpmdp