lemonbar: update workspaces to newer version of i3ipc.
Also temporary placeholders in conky for battery and screen brightness when on desktop
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
-- Conky for external bar
|
-- Conky for external bar
|
||||||
-- out simple text to console
|
-- out simple text to console
|
||||||
|
|
||||||
conky.config = {
|
conky.config = {
|
||||||
@@ -21,7 +21,7 @@ ${exec ~/.i3/lemonbar/get_vol.sh} \
|
|||||||
${if_up wlp3s0}${downspeedf wlp3s0} ${upspeedf wlp3s0}\
|
${if_up wlp3s0}${downspeedf wlp3s0} ${upspeedf wlp3s0}\
|
||||||
${else}down down${endif}\
|
${else}down down${endif}\
|
||||||
\
|
\
|
||||||
${if_up enp2s0}${downspeedf enp2s0} ${upspeedf enp2s0}\
|
${if_up enp5s0}${downspeedf enp2s0} ${upspeedf enp5s0}\
|
||||||
${else}down down${endif}\
|
${else}down down${endif}\
|
||||||
\
|
\
|
||||||
]]
|
]]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- Conky for external bar
|
-- Conky for external bar
|
||||||
-- out simple text to console
|
-- out simple text to console
|
||||||
|
|
||||||
conky.config = {
|
conky.config = {
|
||||||
@@ -20,7 +20,7 @@ ${cpu} \
|
|||||||
${mem} \
|
${mem} \
|
||||||
${fs_used_perc /} \
|
${fs_used_perc /} \
|
||||||
${fs_used_perc /home} \
|
${fs_used_perc /home} \
|
||||||
${exec ~/.i3/lemonbar/get_bat.sh} \
|
F100 \
|
||||||
${exec brillo} \
|
100.00 \
|
||||||
${exec /home/kuba/.i3/scripts/lang.sh show}
|
${exec /home/kuba/.i3/scripts/lang.sh show}
|
||||||
]]
|
]]
|
||||||
|
|||||||
@@ -270,13 +270,13 @@ class i3Module(LemonModule):
|
|||||||
# Find out which output the workspace is on
|
# Find out which output the workspace is on
|
||||||
output = None # TODO actually use this information
|
output = None # TODO actually use this information
|
||||||
for output_ in i3ws.outputs:
|
for output_ in i3ws.outputs:
|
||||||
if output_['name'] == workspace['output']:
|
if output_.name == workspace.output:
|
||||||
output = output_
|
output = output_
|
||||||
break
|
break
|
||||||
if not output:
|
if not output:
|
||||||
continue
|
continue
|
||||||
status = i3ws.state.get_state(workspace, output) # FOC or INA
|
status = i3ws.state.get_state(workspace, output) # FOC or INA
|
||||||
name = workspace['name'] # e.g. 5 terms
|
name = workspace.name # e.g. 5 terms
|
||||||
current = ''.join([parser.block(click=('i3-msg workspace' + name))
|
current = ''.join([parser.block(click=('i3-msg workspace' + name))
|
||||||
, name, parser.block(click='')])
|
, name, parser.block(click='')])
|
||||||
if status == "FOC":
|
if status == "FOC":
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ class State(object):
|
|||||||
urgent = 'URG'
|
urgent = 'URG'
|
||||||
|
|
||||||
def get_state(self, workspace, output):
|
def get_state(self, workspace, output):
|
||||||
if workspace['focused']:
|
if workspace.focused:
|
||||||
if output['current_workspace'] == workspace['name']:
|
if output.current_workspace == workspace.name:
|
||||||
return self.focused
|
return self.focused
|
||||||
else:
|
else:
|
||||||
return self.active
|
return self.active
|
||||||
if workspace['urgent']:
|
if workspace.urgent:
|
||||||
return self.urgent
|
return self.urgent
|
||||||
else:
|
else:
|
||||||
return self.inactive
|
return self.inactive
|
||||||
@@ -132,13 +132,13 @@ class i3ws(object):
|
|||||||
for workspace in workspaces:
|
for workspace in workspaces:
|
||||||
output = None
|
output = None
|
||||||
for output_ in outputs:
|
for output_ in outputs:
|
||||||
if output_['name'] == workspace['output']:
|
if output_.name == workspace.output:
|
||||||
output = output_
|
output = output_
|
||||||
break
|
break
|
||||||
if not output:
|
if not output:
|
||||||
continue
|
continue
|
||||||
st = self.state.get_state(workspace, output)
|
st = self.state.get_state(workspace, output)
|
||||||
name = workspace['name'].replace(" ","___")
|
name = workspace.name.replace(" ","___")
|
||||||
item= self.ws_format % (st, name)
|
item= self.ws_format % (st, name)
|
||||||
out += item
|
out += item
|
||||||
return self.end_format % out
|
return self.end_format % out
|
||||||
|
|||||||
Reference in New Issue
Block a user