From 128d39751808c33fd7e247c48d6d1c2fa0ac0a88 Mon Sep 17 00:00:00 2001 From: ggodot Date: Wed, 1 Jan 2025 23:19:50 +0100 Subject: [PATCH] scratpads learned --- README.md | 2 ++ config.py | 30 +++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e1456b1..3ab4a97 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ - [ ] popup - [ ] notifications - dunst - [ ] borders and separation of colors + - [ ] focus, multiple on one group, floating +- [ ] function that calls for change on wallpaper # Bugs diff --git a/config.py b/config.py index 202b5fd..b87853a 100644 --- a/config.py +++ b/config.py @@ -1,5 +1,5 @@ from libqtile import bar, layout, qtile, widget, hook -from libqtile.config import Click, Drag, Group, Key, Match, Screen, KeyChord +from libqtile.config import Click, Drag, Group, Key, Match, Screen, KeyChord, ScratchPad, DropDown from libqtile.lazy import lazy from qtile_extras import widget @@ -14,8 +14,8 @@ shift = "shift" alt = "mod1" home = os.path.expanduser('~') -#tapeta = '/home/godot/.config/qtile/wallpapers/theater_by_flaviobollo.jpg' -tapeta = '/home/godot/.config/qtile/wallpapers/McEscher-Street.jpg' +tapeta = '/home/godot/.config/qtile/wallpapers/theater_by_flaviobollo.jpg' +#tapeta = '/home/godot/.config/qtile/wallpapers/McEscher-Street.jpg' colors = [["#293136", "#293136"], #bg_dim [0] ["#333C43", "#333C43"], #bg_0 [1] @@ -81,6 +81,10 @@ keys = [ Key([mod], "s", lazy.spawn('rofi -show ssh'), desc="Spawn rofi SSH"), Key([mod], "r", lazy.spawn("rofi -show drun -show-icons"), desc="Spawn rofi drun"), + + # Scratchpads + Key([mod], 'c', lazy.group['scratchpad'].dropdown_toggle('term')), + Key([mod], 'v', lazy.group['scratchpad'].dropdown_toggle('btop')), # WLR-RANDR for second screen Key([mod, "control"], "Down", lazy.spawn("wlr-randr --output VGA-1 --transform normal"), desc="sets second monitor to normal rotation"), @@ -107,7 +111,23 @@ for vt in range(1, 8): ) -groups = [Group(i) for i in "1234567890"] +groups = [ + ScratchPad("scratchpad", [ + DropDown("term", "alacritty", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), + DropDown("btop", "alacritty -e btop", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), + ]), + + Group("1"), + Group("2"), + Group("3"), + Group("4"), + Group("5"), + Group("6"), + Group("7"), + Group("8"), + Group("9"), + Group("0"), +] for i in groups: keys.extend( @@ -234,7 +254,7 @@ vpn = widget.GenPollCommand( ram = widget.Memory( format = " {MemFree:.0f} 󰓡 {SwapFree:.0f}", - mouse_callbacks={"Button1":lazy.spawn("alacritty --class float -e btop ")}, + mouse_callbacks={"Button1":lazy.group['scratchpad'].dropdown_toggle('btop')}, background=colors[6], mesure_mem="M", mesure_swap="M",