Commit 92926d64 authored by epsi sayidina's avatar epsi sayidina

awesome: 4.3: statusbar

parent da440fd6
......@@ -21,7 +21,7 @@ local WB = {}
wibox_package = WB -- global object name
-- default statusbar
require("anybox.default.helper_default")
require("statusbar.default.helper_default")
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
......
......@@ -8,7 +8,7 @@ local wibox = require("wibox")
local lain = require("lain")
-- Custom Local Library
require("anybox.lain.lain")
require("statusbar.lain.lain")
local gmc = require("themes.gmc")
-- }}}
......
......@@ -31,7 +31,7 @@ multicolor_icon_set = I -- object name
markup = lain.util.markup
-- progress bar related widgets -- after global markup
local config_path = awful.util.getdir("config") .. "/anybox/lain/"
local config_path = awful.util.getdir("config") .. "statusbar/lain/"
dofile(config_path .. "lain-diskfree.lua")
dofile(config_path .. "lain-battery.lua")
dofile(config_path .. "lain-sound.lua")
......
......@@ -21,10 +21,10 @@ local WB = {}
wibox_package = WB -- global object name
-- default statusbar
require("anybox.lain.helper_default")
require("statusbar.lain.helper_default")
-- vicious statusbar
require("anybox.lain.helper_lain")
require("statusbar.lain.helper_lain")
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
......
......@@ -20,24 +20,30 @@ function WB.initdeco ()
WB.spacerline = wibox.widget.textbox(" | ")
-- Separators png
WB.ar_lr_pre = wibox.widget.imagebox()
WB.ar_lr_pre = wibox.widget.imagebox()
WB.ar_lr_pre:set_image(beautiful.arrow_lr_pre)
WB.ar_lr_post = wibox.widget.imagebox()
WB.ar_lr_post = wibox.widget.imagebox()
WB.ar_lr_post:set_image(beautiful.arrow_lr_post)
WB.ar_lr = wibox.widget.imagebox()
WB.ar_lr:set_image(beautiful.arrow_lr)
WB.ar_lr_thick = wibox.widget.imagebox()
WB.ar_lr_thick:set_image(beautiful.arrow_lr_thick)
WB.ar_lr_thin = wibox.widget.imagebox()
WB.ar_lr_thin:set_image(beautiful.arrow_lr_thin)
WB.ar_rl_pre = wibox.widget.imagebox()
WB.ar_rl_pre = wibox.widget.imagebox()
WB.ar_rl_pre:set_image(beautiful.arrow_rl_pre)
WB.ar_rl_post = wibox.widget.imagebox()
WB.ar_rl_post = wibox.widget.imagebox()
WB.ar_rl_post:set_image(beautiful.arrow_rl_post)
WB.ar_rl = wibox.widget.imagebox()
WB.ar_rl:set_image(beautiful.arrow_rl)
WB.ar_rl_thick = wibox.widget.imagebox()
WB.ar_rl_thick:set_image(beautiful.arrow_rl_thick)
WB.ar_rl_thin = wibox.widget.imagebox()
WB.ar_rl_thin:set_image(beautiful.arrow_rl_thin)
end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
function WB.add_widgets_monitor_left (line, s)
local ic = icon_set
return {
layout = wibox.layout.fixed.horizontal,
WB.ar_lr_post,
......@@ -46,13 +52,13 @@ function WB.add_widgets_monitor_left (line, s)
WB.spacer,
vw.graph_cpu,
WB.spacer,
vw.cpu,
ic.cpu, vw.cpu,
WB.spacerline,
vw.graph_mem,
WB.spacer,
vw.mem,
ic.mem, vw.mem,
WB.spacer,
WB.ar_lr,
WB.ar_lr_thin,
WB.spacer,
vw.battery,
WB.spacerline,
......@@ -63,12 +69,16 @@ end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
function WB.add_widgets_monitor_right (line, s)
local ic = icon_set
return {
layout = wibox.layout.fixed.horizontal,
vw.progress_example,
WB.spacer,
ic.mem,
vw.progress_mem,
WB.spacerline,
WB.spacer,
WB.ar_rl_thin,
vw.mpd,
WB.spacerline,
vw.date,
......
......@@ -7,10 +7,11 @@
-- {{{ Required libraries
local awful = require("awful")
local wibox = require("wibox")
local vicious = require("vicious")
local gmc = require("themes.gmc")
local awful = require("awful")
local beautiful = require("beautiful")
local wibox = require("wibox")
local vicious = require("vicious")
local gmc = require("themes.gmc")
-- }}}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
......@@ -19,6 +20,9 @@ local W = {}
local F = {} -- Format
local wlandev = RC.vars.wlandev
local I = {}
icon_set = I -- object name
local function hlspan(text)
return "<span color='" .. gmc.color['blue900'] .. "'>" .. text .. "</span>"
end
......@@ -51,6 +55,7 @@ vicious.register(W.battery, vicious.widgets.bat, F.battery, 67, "BAT0")
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
I.mem = wibox.widget.imagebox(beautiful.widget_mem)
W.mem = wibox.widget.textbox()
F.mem = "Mem: ".. hlspan("$1%") .." (".. altspan("$2MB/$3MB") ..")"
vicious.cache(vicious.widgets.mem)
......@@ -58,6 +63,9 @@ vicious.register(W.mem, vicious.widgets.mem, F.mem, 13)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
I.cpu = wibox.widget.imagebox()
I.cpu:set_image(beautiful.widget_cpu)
W.cpu = wibox.widget.textbox()
F.cpu = "CPU 1:".. hlspan("$1%") ..", "
.. "CPU 2:".. hlspan("$2%")
......
......@@ -9,9 +9,9 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="160"
width="220"
height="180"
viewBox="0 0 160 180"
viewBox="0 0 220 180"
id="svg2"
version="1.1"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
......@@ -30,9 +30,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.1458333"
inkscape:cx="-0.90066306"
inkscape:cy="107.28477"
inkscape:zoom="2.0972222"
inkscape:cx="80.476821"
inkscape:cy="90"
inkscape:document-units="px"
inkscape:current-layer="layer5"
showgrid="false"
......@@ -77,20 +77,20 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-872.3622)"
style="display:none"
style="display:inline"
sodipodi:insensitive="true">
<rect
transform="scale(-1,1)"
y="872.36212"
x="-160"
x="-220"
height="180"
width="160"
width="220"
id="rect1231"
style="opacity:1;fill:#fff9c4;fill-opacity:1;stroke:none;stroke-width:0.13661055;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
transform="translate(0,140)"
style="display:none"
style="display:inline"
inkscape:label="Coloring"
id="g3627"
inkscape:groupmode="layer"
......@@ -99,7 +99,7 @@
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Frame"
style="display:none"
style="display:inline"
transform="translate(0,140)"
sodipodi:insensitive="true">
<rect
......@@ -165,12 +165,33 @@
height="80"
x="80"
y="-140" />
<rect
y="20"
x="160"
height="20"
width="60"
id="rect65"
style="opacity:1;fill:#fff176;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1" />
<rect
style="opacity:1;fill:#ffeb3b;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
id="rect67"
width="60"
height="80"
x="160"
y="-60" />
<rect
y="-140"
x="160"
height="80"
width="60"
id="rect69"
style="opacity:1;fill:#fff176;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1" />
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Border"
style="display:none"
style="display:inline"
transform="translate(0,100)"
sodipodi:insensitive="true">
<path
......@@ -204,6 +225,16 @@
d="m 80,-100 v 4 h 80 v -4 z m 0,76 v 4 h 80 v -4 z"
style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path71"
d="m 160,-20 v 4 h 80 v -4 z m 0,76 v 4 h 80 v -4 z"
style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
d="m 160,-100 v 4 h 80 v -4 z m 0,76 v 4 h 80 v -4 z"
id="path73" />
</g>
<g
inkscape:groupmode="layer"
......@@ -233,7 +264,7 @@
style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
d="m 80,144 40,36 -40,36 h 40 l 40,-36 -40,-36 z"
transform="translate(0,-160)"
id="arrow_lr"
id="arrow_lr_thick"
inkscape:label="#path1050"
inkscape:connector-curvature="0"
inkscape:export-xdpi="24"
......@@ -256,13 +287,30 @@
inkscape:export-xdpi="24"
inkscape:export-ydpi="24" />
<path
id="arrow_rl"
id="arrow_rl_thick"
d="m 160,-96 -40,36 40,36 h -40 l -40,-36 40,-36 z"
style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
inkscape:connector-curvature="0"
inkscape:label="#path1059"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24" />
<path
style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
d="m 160,-16 40,36 -40,36 h 20 l 40,-36 -40,-36 z"
id="arrow_lr_thin"
inkscape:connector-curvature="0"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24"
inkscape:label="#path898" />
<path
style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-opacity:1"
d="m 200,4 -40,36 40,36 h 20 L 180,40 220,4 Z"
transform="translate(0,-100)"
id="arrow_rl_thin"
inkscape:connector-curvature="0"
inkscape:label="#path906"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24" />
</g>
<g
inkscape:groupmode="layer"
......@@ -300,7 +348,17 @@
sodipodi:role="line"
id="tspan1013"
x="99.982643"
y="31.90625">complete</tspan></text>
y="31.90625">thick</tspan></text>
<text
id="text81"
y="31.90625"
x="179.98264"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.33333349px;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="31.90625"
x="179.98264"
id="tspan79"
sodipodi:role="line">thin</tspan></text>
</g>
<g
inkscape:groupmode="layer"
......@@ -309,7 +367,7 @@
transform="translate(0,90)"
sodipodi:insensitive="true">
<g
transform="translate(0.5,-181)"
transform="translate(0.5,-121)"
id="g44">
<path
style="fill:#ffffff"
......
......@@ -21,10 +21,12 @@ theme.awesome_subicon = theme_path .. "launcher/logo20_kali_black.png"
theme.bar_bg_rainbow = theme_path .. "bar/copycat-rainbow/widget_bg.png"
theme.bar_bg_copland = theme_path .. "bar/copycat-copland/widget_bg.png"
theme.arrow_lr = theme_path .. "misc/clone/arrow_lr.png"
theme.arrow_lr_thick = theme_path .. "misc/clone/arrow_lr_thick.png"
theme.arrow_lr_thin = theme_path .. "misc/clone/arrow_lr_thin.png"
theme.arrow_lr_pre = theme_path .. "misc/clone/arrow_lr_pre.png"
theme.arrow_lr_post = theme_path .. "misc/clone/arrow_lr_post.png"
theme.arrow_rl = theme_path .. "misc/clone/arrow_rl.png"
theme.arrow_rl_thick = theme_path .. "misc/clone/arrow_rl_thick.png"
theme.arrow_rl_thin = theme_path .. "misc/clone/arrow_rl_thin.png"
theme.arrow_rl_pre = theme_path .. "misc/clone/arrow_rl_pre.png"
theme.arrow_rl_post = theme_path .. "misc/clone/arrow_rl_post.png"
......
local icondir = ""
-- copycat-multicolor
icondir = theme_path .. "icons/copycat-multicolor/"
theme.submenu_icon = icondir .. "submenu.png"
theme.widget_temp = icondir .. "temp.png"
theme.widget_uptime = icondir .. "ac.png"
theme.widget_cpu = icondir .. "cpu.png"
theme.widget_fs = icondir .. "fs.png"
theme.widget_mem = icondir .. "mem.png"
theme.widget_note = icondir .. "note.png"
theme.widget_note_on = icondir .. "note_on.png"
theme.widget_mail = icondir .. "mail.png"
theme.widget_batt = icondir .. "bat.png"
theme.widget_clock = icondir .. "clock.png"
theme.widget_vol = icondir .. "spkr.png"
-- clone
local icondir = theme_path .. "icons/clone/"
theme.widget_weather = icondir .. "dish.png"
theme.widget_netdown = icondir .. "net_down.png"
theme.widget_netup = icondir .. "net_up.png"
-- override for arrow statusbar
local icondir = theme_path .. "icons/clone/"
theme.widget_temp = icondir .. "temp.png"
theme.widget_uptime = icondir .. "ac.png"
theme.widget_cpu = icondir .. "cpu.png"
theme.widget_fs = icondir .. "fs.png"
theme.widget_mem = icondir .. "mem.png"
theme.widget_batt = icondir .. "bat.png"
theme.widget_clock = icondir .. "clock.png"
-- copycat-copland
local icondir = theme_path .. "icons/copycat-copland/"
theme.monitor_disk = icondir .. "disk.png"
theme.monitor_vol = icondir .. "vol.png"
theme.monitor_vol_low = icondir .. "vol_low.png"
theme.monitor_vol_no = icondir .. "vol_no.png"
theme.monitor_vol_mute = icondir .. "vol_mute.png"
theme.monitor_ac = icondir .. "ac.png"
theme.monitor_bat = icondir .. "bat.png"
theme.monitor_bat_low = icondir .. "bat_low.png"
theme.monitor_bat_no = icondir .. "bat_no.png"
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
--local layout_icons = "default-white"
--local layout_icons = "default-black"
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
layout_icons = "default-lain-white"
layout_path = theme_path .. "layouts/" .. layout_icons .. "/"
-- lain related
theme.layout_centerfair = layout_path .. "centerfair.png"
theme.layout_centerwork = layout_path .. "centerwork.png"
theme.layout_cascade = layout_path .. "cascade.png"
theme.layout_cascadetile = layout_path .. "cascadebrowse.png"
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- awful layout
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.layout_txt_floating = "[*]"
-- lain layout 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]"
theme.layout_txt_uselessfair = "[uf]"
theme.layout_txt_uselessfairh = "[ufh]"
theme.layout_txt_uselesspiral = "[us]"
theme.layout_txt_uselessdwindle = "[ud]"
theme.layout_txt_uselesstile = "[ut]"
theme.layout_txt_uselesstileleft = "[utl]"
theme.layout_txt_uselesstiletop = "[utt]"
theme.layout_txt_uselesstilebottom = "[utb]"
-- look inside /usr/share/icons/, default: nil (don't use icon theme)
-- https://bbs.archlinux.org/viewtopic.php?id=195663
--! theme.icon_theme = "Paper" -- "HighContrast" -- "Adwaita" -- "gnome" -- "Tango"
--! theme.icon_theme_size = "32x32"
-- https://awesomewm.org/wiki/Remove_icons
-- theme.tasklist_disable_icon = true
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- lain variables
-- not necessarily have to be in theme.lua when theme variable is not set local
--! theme.useless_gap_width = 40
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- user custom variables
--! dofile(theme_path .. "icons-copycat.lua")
--! theme.bar_bg_rainbow = theme_path .. "bar/copycat-rainbow/widget_bg.png"
--! theme.bar_bg_copland = theme_path .. "bar/copycat-copland/widget_bg.png"
--! theme.arrl_lr_pre = theme_path .. "misc/copycat-dremora/arrl_lr_pre.png"
--! theme.arrl_lr_post = theme_path .. "misc/copycat-dremora/arrl_lr_post.png"
--! theme.arrow_color = "#c9c925" -- "#ad3737" -- "#2980b9"
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment