autostar + onclick mem btop

This commit is contained in:
ggodot 2024-12-22 03:10:02 +01:00
parent 2ee2018741
commit 7833ed0f0c
3 changed files with 9 additions and 48 deletions

2
autostart.sh Normal file → Executable file
View File

@ -1 +1,3 @@
#!/bin/bash
#alacritty -e tmux new -s btop btop

1
bar.py
View File

@ -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",

View File

@ -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