Awesome configs for Ben.
95
.config/awesome/themes/powerarrow/binclock.lua
Normal file
@@ -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
|
||||
0
.config/awesome/themes/powerarrow/icons/ac.png
Executable file → Normal file
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
BIN
.config/awesome/themes/powerarrow/icons/awesome.png
Executable file → Normal file
|
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 129 B |
0
.config/awesome/themes/powerarrow/icons/battery.png
Executable file → Normal file
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
0
.config/awesome/themes/powerarrow/icons/battery_empty.png
Executable file → Normal file
|
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 327 B |
0
.config/awesome/themes/powerarrow/icons/battery_low.png
Executable file → Normal file
|
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
0
.config/awesome/themes/powerarrow/icons/cpu.png
Executable file → Normal file
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 206 B |
BIN
.config/awesome/themes/powerarrow/icons/floating.png
Executable file → Normal file
|
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 173 B |
0
.config/awesome/themes/powerarrow/icons/fwd.png
Executable file → Normal file
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |
0
.config/awesome/themes/powerarrow/icons/hdd.png
Executable file → Normal file
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
0
.config/awesome/themes/powerarrow/icons/mail.png
Executable file → Normal file
|
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 183 B |
0
.config/awesome/themes/powerarrow/icons/mail_on.png
Executable file → Normal file
|
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 183 B |
0
.config/awesome/themes/powerarrow/icons/mem.png
Executable file → Normal file
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
0
.config/awesome/themes/powerarrow/icons/net.png
Executable file → Normal file
|
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
0
.config/awesome/themes/powerarrow/icons/next.png
Executable file → Normal file
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
0
.config/awesome/themes/powerarrow/icons/note.png
Executable file → Normal file
|
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
0
.config/awesome/themes/powerarrow/icons/note_on.png
Executable file → Normal file
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
0
.config/awesome/themes/powerarrow/icons/pacman.png
Executable file → Normal file
|
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B |
0
.config/awesome/themes/powerarrow/icons/pause.png
Executable file → Normal file
|
Before Width: | Height: | Size: 316 B After Width: | Height: | Size: 316 B |
0
.config/awesome/themes/powerarrow/icons/phones.png
Executable file → Normal file
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 B |
0
.config/awesome/themes/powerarrow/icons/play.png
Executable file → Normal file
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
0
.config/awesome/themes/powerarrow/icons/prev.png
Executable file → Normal file
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
0
.config/awesome/themes/powerarrow/icons/rwd.png
Executable file → Normal file
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
0
.config/awesome/themes/powerarrow/icons/scissors.png
Executable file → Normal file
|
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 160 B |
0
.config/awesome/themes/powerarrow/icons/stop.png
Executable file → Normal file
|
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
0
.config/awesome/themes/powerarrow/icons/task.png
Executable file → Normal file
|
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 169 B |
0
.config/awesome/themes/powerarrow/icons/temp.png
Executable file → Normal file
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
BIN
.config/awesome/themes/powerarrow/icons/tile.png
Executable file → Normal file
|
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 163 B |
BIN
.config/awesome/themes/powerarrow/icons/tilebottom.png
Executable file → Normal file
|
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 166 B |
BIN
.config/awesome/themes/powerarrow/icons/tileleft.png
Executable file → Normal file
|
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 165 B |
BIN
.config/awesome/themes/powerarrow/icons/tiletop.png
Executable file → Normal file
|
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 166 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/close_focus.png
Executable file → Normal file
|
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/close_normal.png
Executable file → Normal file
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 196 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 255 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 256 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 252 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_active.png
Executable file → Normal file
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
0
.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_inactive.png
Executable file → Normal file
|
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 186 B |
201
.config/awesome/themes/powerarrow/theme.lua
Executable file → Normal file
@@ -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,
|
||||
},
|
||||
|
||||
BIN
.config/awesome/themes/powerarrow/wall.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |