diff --git a/autostart.sh b/autostart.sh old mode 100644 new mode 100755 index a9bf588..8ca5567 --- a/autostart.sh +++ b/autostart.sh @@ -1 +1,3 @@ #!/bin/bash + +#alacritty -e tmux new -s btop btop diff --git a/bar.py b/bar.py index 2fe4169..52af0a1 100644 --- a/bar.py +++ b/bar.py @@ -89,6 +89,7 @@ kb_layout = widget.KeyboardLayout( ram = widget.Memory( font="JetBrainsMono Nerd Font", format = " {MemFree:.0f} 󰓡 {SwapFree:.0f}", + mouse_callbacks={"Button1":lazy.spawn("alacritty -e btop")}, background=colors[6], mesure_mem="M", mesure_swap="M", diff --git a/config.py b/config.py index 2c9d19b..e776e86 100644 --- a/config.py +++ b/config.py @@ -1,7 +1,6 @@ -from libqtile import bar, layout, widget +from libqtile import bar, layout, widget, hook from libqtile.config import Click, Drag, Group, Key, Match, Screen from libqtile.lazy import lazy -from libqtile import hook from bar import * from keys import * @@ -13,12 +12,6 @@ import os # mod = "mod4" terminal = "alacritty" -# #autostart sh script -# @hook.subscribe.startup_once -# def autostart(): -# home os.path.expanduser("~/.config/qtile/autostart.sh") -# subprocess.run([home]) - groups = [Group(i) for i in "1234567890"] for i in groups: @@ -70,40 +63,6 @@ layouts = [ # layout.Zoomy(), ] -# TODO this is theroetycli duplicate -widget_defaults = dict( - font="sans", - fontsize=12, - padding=3, -) -extension_defaults = widget_defaults.copy() - - -#screens = [ -# Screen( -# wallpaper='~/.config/qtile/wallpapers/theater.jpg', -# wallpaper_mode='fill', -# top=bar.Bar( -# [ -# # widget.CurrentLayout(), -# widget.GroupBox(), -# widget.Prompt(), -# widget.WindowName(), -# widget.Chord( -# chords_colors={ -# "launch": ("#ff0000", "#ffffff"), -# }, -# name_transform=lambda name: name.upper(), -# ), -# widget.Clock(format="%Y-%m-%d %a %H:%M"), -# ], -# 24, -# # border_width=[2, 0, 2, 0], # Draw top and bottom borders -# # border_color=["ff00ff", "000000", "ff00ff", "000000"] # Borders are magenta -# ), -# ), -#] - # Drag floating layouts. mouse = [ @@ -145,12 +104,11 @@ auto_minimize = True # When using the Wayland backend, this can be used to configure input devices. wl_input_rules = None -# Hooks for groupebox -#@hook.subscribe.setgroup -#def setgroup(): -# for i in range(0, 9): -# qtile.groups[i].label = "○" -# qtile.current_group.label = "◉" +#autostart bash script +@hook.subscribe.startup_once +def autostart(): + script = os.path.expanduser("~/.config/qtile/autostart.sh") + subprocess.run([script]) # Gasp! We're lying here. In fact, nobody really uses or cares about this