Use scratchpad + more workspace icons

This commit is contained in:
2021-11-16 16:40:27 +01:00
parent 6cf171227a
commit c2f9d53ead
3 changed files with 13 additions and 13 deletions

View File

@@ -303,6 +303,11 @@ exec ~/.config/sway/workspace_rename.py
for_window [class="Tor Browser"] floating enable
for_window [app_id="kitty-scratch"] {
move to scratchpad
scratchpad show
}
workspace 1 output eDP-1
exec $term

View File

@@ -36,12 +36,12 @@ block = "memory"
display_type = "memory"
format_mem = "{mem_used;M}"
clickable = false
on_click = "kitty btop"
on_click = "kitty --class kitty-scratch btop"
[[block]]
block = "cpu"
interval = 1
on_click = "kitty btop"
on_click = "kitty --class kitty-scratch btop"
#[[block]]
#block = "sound"
@@ -59,7 +59,7 @@ format_up_to_date = "up to date"
hide_when_uptodate = true
critical_updates_regex = "(^(linux-|sway|wl)|pipewire)"
aur_command = "yay -Qua"
on_click = "kitty zsh -i -c update"
on_click = "kitty --class kitty-scratch zsh -i -c update"
[[block]]
block = "networkmanager"

View File

@@ -9,16 +9,7 @@ from i3ipc.aio import Connection
async def main():
sway = await Connection().connect()
def on(event, handler=None):
def on_wrapped(handler):
sway.on(event, handler)
return handler
if handler:
return on_wrapped(handler)
else:
return on_wrapped
@on(Event.WINDOW_FOCUS)
@sway.on(Event.WINDOW_FOCUS)
async def on_window_focus(sway, e):
focused_window = (await sway.get_tree()).find_focused()
focused_workspace = focused_window.workspace()
@@ -42,6 +33,10 @@ async def main():
new_name += ''
elif app_name in ['GEMOC Studio', 'code-oss']:
new_name += ''
elif 'okular' in app_name:
new_name += '<span font=\'FontAwesome 5 Free Solid\'></span>'
elif app_name == 'pavucontrol':
new_name += ''
elif app_name:
new_name += app_name