Commit 1323c372 authored by epsi sayidina's avatar epsi sayidina

standalone dzen2 bash

parent 297bf8c0
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
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="100"
height="100"
viewBox="0 0 26.458333 26.458333"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r"
sodipodi:docname="diagonal.svg"
inkscape:export-filename="/media/Works/Sosial/2017 - Inkscape/2017 - Statusbar/diagonal.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.47"
inkscape:cx="4.9639873"
inkscape:cy="50"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1276"
inkscape:window-height="748"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-270.54167)">
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4483"
width="26.458334"
height="26.458334"
x="0"
y="270.54166" />
<path
style="fill:#000000;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="m 0,296.99997 26.458332,-26.45834 v 26.45834 z"
id="path4525"
inkscape:connector-curvature="0" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
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="100"
height="100"
viewBox="0 0 26.458333 26.458333"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r"
sodipodi:docname="double-arrow.svg"
inkscape:export-filename="/media/Works/Sosial/2017 - Inkscape/2017 - Statusbar/double-arrow.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.4931075"
inkscape:cx="51.574529"
inkscape:cy="50"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1276"
inkscape:window-height="748"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-270.54167)">
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4483"
width="26.458334"
height="26.458334"
x="0"
y="270.54166" />
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 32 0 L 82 50 L 32 100 L 50.710938 100 L 100.71094 50 L 50.710938 0 L 32 0 z "
transform="matrix(0.26458333,0,0,0.26458333,0,270.54167)"
id="path11" />
<path
inkscape:connector-curvature="0"
id="path9"
d="M 4.2426395e-6,297 0,270.54167 13.229166,283.77083 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path828"
d="M 5.8208333,270.54167 19.05,283.77084 5.8208333,297 H 10.771436 L 24.000603,283.77084 10.771436,270.54167 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
inkscape:connector-curvature="0" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
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="50"
height="100"
viewBox="0 0 13.229166 26.458333"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r"
sodipodi:docname="arrow.svg"
inkscape:export-filename="/media/Works/Sosial/2017 - Inkscape/2017 - Statusbar/arrow.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-20.624842"
inkscape:cy="50"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1276"
inkscape:window-height="748"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-270.54167)">
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4483"
width="13.229166"
height="26.458332"
x="0"
y="270.54163" />
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 4.24264e-6,297.00001 0,270.54168 13.229168,283.77084 Z"
id="path4525"
inkscape:connector-curvature="0" />
</g>
</svg>
#define da_024_l_width 24
#define da_024_l_height 24
static unsigned char da_024_l_bits[] = {
0x00, 0xf8, 0x03, 0x00, 0xfc, 0x81, 0x00, 0xfe, 0xc0, 0x00, 0x7f, 0xe0,
0x80, 0x3f, 0xf0, 0xc0, 0x1f, 0xf8, 0xe0, 0x0f, 0xfc, 0xf0, 0x07, 0xfe,
0xf8, 0x03, 0xff, 0xfc, 0x81, 0xff, 0xfe, 0xc0, 0xff, 0x7f, 0xe0, 0xff,
0x7f, 0xe0, 0xff, 0xfe, 0xc0, 0xff, 0xfc, 0x81, 0xff, 0xf8, 0x03, 0xff,
0xf0, 0x07, 0xfe, 0xe0, 0x0f, 0xfc, 0xc0, 0x1f, 0xf8, 0x80, 0x3f, 0xf0,
0x00, 0x7f, 0xe0, 0x00, 0xfe, 0xc0, 0x00, 0xfc, 0x81, 0x00, 0xf8, 0x03 };
#define da_024_r_width 24
#define da_024_r_height 24
static unsigned char da_024_r_bits[] = {
0xc0, 0x1f, 0x00, 0x81, 0x3f, 0x00, 0x03, 0x7f, 0x00, 0x07, 0xfe, 0x00,
0x0f, 0xfc, 0x01, 0x1f, 0xf8, 0x03, 0x3f, 0xf0, 0x07, 0x7f, 0xe0, 0x0f,
0xff, 0xc0, 0x1f, 0xff, 0x81, 0x3f, 0xff, 0x03, 0x7f, 0xff, 0x07, 0xfe,
0xff, 0x07, 0xfe, 0xff, 0x03, 0x7f, 0xff, 0x81, 0x3f, 0xff, 0xc0, 0x1f,
0x7f, 0xe0, 0x0f, 0x3f, 0xf0, 0x07, 0x1f, 0xf8, 0x03, 0x0f, 0xfc, 0x01,
0x07, 0xfe, 0x00, 0x03, 0x7f, 0x00, 0x81, 0x3f, 0x00, 0xc0, 0x1f, 0x00 };
#define dc_024_bl_width 24
#define dc_024_bl_height 24
static unsigned char dc_024_bl_bits[] = {
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00,
0x0f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x7f, 0x00, 0x00,
0xff, 0x00, 0x00, 0xff, 0x01, 0x00, 0xff, 0x03, 0x00, 0xff, 0x07, 0x00,
0xff, 0x0f, 0x00, 0xff, 0x1f, 0x00, 0xff, 0x3f, 0x00, 0xff, 0x7f, 0x00,
0xff, 0xff, 0x00, 0xff, 0xff, 0x01, 0xff, 0xff, 0x03, 0xff, 0xff, 0x07,
0xff, 0xff, 0x0f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x3f, 0xff, 0xff, 0x7f };
#define dc_024_br_width 24
#define dc_024_br_height 24
static unsigned char dc_024_br_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xc0, 0x00, 0x00, 0xe0,
0x00, 0x00, 0xf0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfe,
0x00, 0x00, 0xff, 0x00, 0x80, 0xff, 0x00, 0xc0, 0xff, 0x00, 0xe0, 0xff,
0x00, 0xf0, 0xff, 0x00, 0xf8, 0xff, 0x00, 0xfc, 0xff, 0x00, 0xfe, 0xff,
0x00, 0xff, 0xff, 0x80, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xe0, 0xff, 0xff,
0xf0, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xfe, 0xff, 0xff };
#define dc_024_tl_width 24
#define dc_024_tl_height 24
static unsigned char dc_024_tl_bits[] = {
0xff, 0xff, 0x7f, 0xff, 0xff, 0x3f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x0f,
0xff, 0xff, 0x07, 0xff, 0xff, 0x03, 0xff, 0xff, 0x01, 0xff, 0xff, 0x00,
0xff, 0x7f, 0x00, 0xff, 0x3f, 0x00, 0xff, 0x1f, 0x00, 0xff, 0x0f, 0x00,
0xff, 0x07, 0x00, 0xff, 0x03, 0x00, 0xff, 0x01, 0x00, 0xff, 0x00, 0x00,
0x7f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
#define dc_024_tr_width 24
#define dc_024_tr_height 24
static unsigned char dc_024_tr_bits[] = {
0xfe, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xf0, 0xff, 0xff,
0xe0, 0xff, 0xff, 0xc0, 0xff, 0xff, 0x80, 0xff, 0xff, 0x00, 0xff, 0xff,
0x00, 0xfe, 0xff, 0x00, 0xfc, 0xff, 0x00, 0xf8, 0xff, 0x00, 0xf0, 0xff,
0x00, 0xe0, 0xff, 0x00, 0xc0, 0xff, 0x00, 0x80, 0xff, 0x00, 0x00, 0xff,
0x00, 0x00, 0xfe, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xf0,
0x00, 0x00, 0xe0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00 };
#define sa_024_l_width 12
#define sa_024_l_height 24
static unsigned char sa_024_l_bits[] = {
0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x0f, 0x80, 0x0f,
0xc0, 0x0f, 0xe0, 0x0f, 0xf0, 0x0f, 0xf8, 0x0f, 0xfc, 0x0f, 0xfe, 0x0f,
0xfe, 0x0f, 0xfc, 0x0f, 0xf8, 0x0f, 0xf0, 0x0f, 0xe0, 0x0f, 0xc0, 0x0f,
0x80, 0x0f, 0x00, 0x0f, 0x00, 0x0e, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x00 };
#define sa_024_r_width 12
#define sa_024_r_height 24
static unsigned char sa_024_r_bits[] = {
0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00,
0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01, 0xff, 0x03, 0xff, 0x07,
0xff, 0x07, 0xff, 0x03, 0xff, 0x01, 0xff, 0x00, 0x7f, 0x00, 0x3f, 0x00,
0x1f, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00 };
#!/usr/bin/env bash
# remove all dzen2 instance
pkill dzen2
# include
. ~/Documents/standalone/dzen2/bash/example-04-output.sh
# dzen2
xpos=0
ypos=0
width=640
height=24
fgcolor=$colBlack
bgcolor=$colWhite
font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
parameters=" -x $xpos -y $ypos -w $width -h $height"
parameters+=" -fn $font"
parameters+=" -ta c -bg $bgcolor -fg $fgcolor"
parameters+=" -title-name dzentop"
generated_output | dzen2 $parameters &
sleep 1 && exec `(transset-df .8 -n dzentop >/dev/null 2>&1 &)` &
#!/usr/bin/env bash
# color,
colWhite='#ffffff'
colBlack='#000000'
# also using google material
colRed500='#f44336'
colYellow500='#ffeb3b'
colBlue500='#2196f3'
colGrey500='#9e9e9e'
# http://fontawesome.io/
FontAwesome="^fn(FontAwesome-9)"
# icon
preIcon="^fg($colYellow500)$FontAwesome"
postIcon="^fn()^fg()"
# Glyph Icon Decoration
decopath="Documents/standalone/dzen2/assets/xbm"
# diagonal corner
deco_dc_tl="^i($decopath/dc-024-tl.xbm)"
deco_dc_tr="^i($decopath/dc-024-tr.xbm)"
deco_dc_bl="^i($decopath/dc-024-bl.xbm)"
deco_dc_br="^i($decopath/dc-024-br.xbm)"
# single arrow and double arrow
deco_sa_l="^i($decopath/sa-024-l.xbm)"
deco_sa_r="^i($decopath/sa-024-r.xbm)"
deco_da_l="^i($decopath/da-024-l.xbm)"
deco_da_r="^i($decopath/da-024-r.xbm)"
generated_output() {
local iconDate="$preIcon$postIcon"
local iconTime="$preIcon$postIcon"
# endless loop
while :; do
local date=$(date +'%a %b %d')
local time=$(date +'%H:%M:%S')
local text=""
text+="^bg($colBlue500)^fg($colWhite)$deco_dc_tl "
text+="^bg($colBlue500) $iconDate ^fg() $date "
text+="^bg($colWhite)^fg($colBlue500)$deco_da_r"
text+="^bg()^fg() "
text+="^bg($colWhite)^fg($colRed500)$deco_da_l"
text+="^bg($colRed500) $iconTime ^fg() $time ^bg()"
text+="^bg($colWhite)^fg($colRed500)$deco_dc_bl "
echo -n $text
echo
sleep 1
done
}
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