From 0db6e954c78ee81e377263c2a69b9fa8b4ce26be Mon Sep 17 00:00:00 2001 From: The-Repo-Club Date: Mon, 7 Aug 2023 22:01:47 +0100 Subject: [PATCH] Update --- dconf/.config/dconf/user | Bin 4637 -> 4645 bytes localbin/.local/bin/autostart | 31 ++++----- picom/.config/picom/picom.conf | 3 +- qtile/.config/qtile/config.py | 67 +++++++++++++++----- qtile/.config/qtile/scripts/picom-toggle.sh | 2 +- qtile/.config/qtile/widgets.py | 2 - 6 files changed, 69 insertions(+), 36 deletions(-) diff --git a/dconf/.config/dconf/user b/dconf/.config/dconf/user index a6555789df43299cb5305226d9061a32f9ae44d5..957301f4995d1018371dc256917647d7583ec0cf 100644 GIT binary patch delta 1973 zcmW-i4NR1E9LN8>8E_mNMkH#A6A>FIn}sA`w+KAsLd>RSqL8A;)F8YVL-TM0gu#kN zDuvLcU^b_bmZMQ%X$xN>+nlr33w4@kW}2>CR`&VcZC}2h=llGh|LgC0=uGHI=q(KN zlzp6WIno%D7;a3Eahha29euNCf;)j+9BryhA-)8)XVq3OA{URL{R+GoWpD1?nL#eL z(7pn%LF@Ky->h7$yb*6hTefx$1Q_G-UqsN6mvBGY466rPw8qYm`x(HxK7x8Oo`u6HAlXyU^nz(`AMkz(l zwrd4q9SyTG!RXfFZM*H{;xGoV;SVwv&tX`qknM=y2Di zR2_jhkO3O;7S#F0rN7mWcs%X*;|EZsY1^)W#oD<(d=Rx3EO3O8dvu{KI*Xr2YZGFd zv@)^Ias>CG?_MizQ7%@I-ofvp{K8htByw>u6JmKL24(G9?ocs`bu{t#JT!W`BSUYQ z*kYU>;{*y(=FFEv?c5M+;9`6On)BF4tFuY-X{3 z4yB_f$(Eu1Tc3y9$;H}g7haC8oLqHMUsAEoz7}sl3#-Qem(KY9i%2?povYcO*nL8zE&*O2Z};6K`8CHQ_gsD zu}3S20BmUKDMV6ong zKD-~f^5V{=l8g2IIDwx<-o}B$c5<=5sBs^<+M4~@&17!qLLJ?~@1nUq4F`1uVoivW zH&*m}L&i5<(QW36W)q`tbey6iTdJj@?N|TEh})I^&}U2 zlAp#0QANA&mzt0`hn@$_7nJR6qEf#n^qv! z(ahripy|!e9kG#%eHg&o-jmpKkq?7nGO3Q5WjUpF&GND=AFVL8z!`tk-jA9*4I39;4F1072~v@P~O?nK**ni62Doq>pd)A{Xl{oA3dY-Ff4C)fa0g z#_;QC>erusRxZ}-J%i5%a{f<_)Y~)+{7i+6?@IC0}g`F4lg%#`U%ke6-v26Z-@r>^(1kh0Ea_~Hq@o0IvCM4EG zi|{h^Z&uJ|-3hUd*cr_Ge~?1rhVf!{-^KcJ)sek~Y%~2vw_U8u)rKEISMO`-*T7=E z9ldxTDp(&e97`_N_u~wH9(B~6J!K;oyDl|8if%O}e>(Lb4^&V`llU}R-F4`sjzFvl z&Ej6{{qKhorgSI7I^!UGL354IYxABeEG;eE7gLn`O#ag`C3`FKO=I&SOITP*X>Mu$ u3f_EL?E+(V7Z&f!Ep0BeJmhBS>#|&Ock^l9@Bg*e^ZXh*`%(hNJpKn!R&Rs= diff --git a/localbin/.local/bin/autostart b/localbin/.local/bin/autostart index 95c6952d1..ccf892721 100755 --- a/localbin/.local/bin/autostart +++ b/localbin/.local/bin/autostart @@ -12,7 +12,7 @@ #Created: # Mon 22 November 2021, 03:15:54 PM [GMT+1] #Modified: -# Sun 06 August 2023, 06:58:02 PM [GMT+1] +# Mon 07 August 2023, 09:45:19 PM [GMT+1] # #Description: # @@ -60,26 +60,27 @@ if [[ $DESKTOP_SESSION == "i3" ]]; then else echo "i3-autolayout can not be found" fi +fi - if command -v xroot &>/dev/null; then - if ! pgrep -f "xroot" >/dev/null; then - if command -v xmenu_desktop &>/dev/null; then - if ! pgrep -f "xmenu_desktop" >/dev/null; then - ( - sleep 2s - xroot -r xmenu_desktop - ) & - else - echo "xroot already Running" - fi +if command -v xroot &>/dev/null; then + if ! pgrep -f "xroot" >/dev/null; then + if command -v xmenu_desktop &>/dev/null; then + if ! pgrep -f "xmenu_desktop" >/dev/null; then + ( + sleep 2s + xroot -r xmenu_desktop + ) & + else + echo "xroot already Running" fi - else - echo "xroot already Running" fi else - echo "xroot can not be found" + echo "xroot already Running" fi +else + echo "xroot can not be found" fi + if command -v clipmenu-daemon &>/dev/null; then if ! pgrep -f "clipmenu-daemon" >/dev/null; then ( diff --git a/picom/.config/picom/picom.conf b/picom/.config/picom/picom.conf index 9e0e81b8d..9d92c2101 100644 --- a/picom/.config/picom/picom.conf +++ b/picom/.config/picom/picom.conf @@ -163,7 +163,8 @@ rounded-corners-exclude = [ # Window Manager Stuff "class_g = 'repowm'", "class_g = 'repowmsystray'", - "class_g = 'scratchpad_terminal'" + "class_g = 'scratchpad_terminal'", + "QTILE_INTERNAL:32c = 1" ]; diff --git a/qtile/.config/qtile/config.py b/qtile/.config/qtile/config.py index 72c4d5cdf..7c149ac1c 100644 --- a/qtile/.config/qtile/config.py +++ b/qtile/.config/qtile/config.py @@ -21,10 +21,8 @@ # SOFTWARE. import re -import json import locale import subprocess -from os.path import expanduser from widgets import Widgets from groups import Groups @@ -32,10 +30,11 @@ from colors import colorScheme, currentColor locale.setlocale(locale.LC_ALL, '') -from libqtile import bar, layout, hook +from libqtile import qtile, bar, layout, hook from libqtile.config import Key, Click, Drag, Screen, Match, KeyChord, ScratchPad, DropDown from libqtile.lazy import lazy -from libqtile.dgroups import simple_key_binder + +from typing import Callable ################### ## Color Schemes ## @@ -47,6 +46,21 @@ from colors import foregroundColor, backgroundColor ## Utils ## ########### +def go_to_group(name: str) -> Callable: + def _inner(qtile: qtile) -> None: + if len(qtile.screens) == 1: + qtile.groups_map[name].cmd_toscreen() + return + + if name in '12345': + qtile.focus_screen(0) + qtile.groups_map[name].cmd_toscreen() + else: + qtile.focus_screen(1) + qtile.groups_map[name].cmd_toscreen() + + return _inner + class Commands(object): editor = 'code' @@ -120,9 +134,6 @@ keys = [ Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -10")), ] -dgroups_key_binder = simple_key_binder(MOD) -dgroups_app_rules = [] # type: list - keys.extend([ ################ ## Key Chords ## @@ -173,22 +184,30 @@ groups = Groups.groups # Define scratchpads groups.append( - ScratchPad("scratchpad", [ - DropDown("term", "kitty --class=scratch", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), - DropDown("clifm", "kitty --class=clifm -e clifm", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9), - DropDown("btop", "kitty --class=btop -e btop", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9), - DropDown("volume", "pavucontrol", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.9), + ScratchPad("TAB", + [ + DropDown("term", "kitty --name=scratch", width=0.6, height=0.6, x=0.2, y=0.1, opacity=1), + DropDown("clifm", "kitty --name=clifm -e clifm", width=0.6, height=0.6, x=0.2, y=0.1, opacity=0.8), + DropDown("btop", "kitty --name=btop -e btop", width=0.6, height=0.6, x=0.2, y=0.1, opacity=0.8), + DropDown("volume", "pavucontrol", width=0.6, height=0.6, x=0.2, y=0.1, opacity=0.8), ]) ) +for i in groups: + keys.extend([ + Key([MOD], i.name, lazy.function(go_to_group(i.name))), + Key([MOD, "shift"], i.name, lazy.window.togroup(i.name)), + ]) + # Scratchpad keybindings keys.extend([ - Key([CTRL], "Return", lazy.group['scratchpad'].dropdown_toggle('term')), - Key([ALT], "c", lazy.group['scratchpad'].dropdown_toggle('clifm')), - Key([ALT], "b", lazy.group['scratchpad'].dropdown_toggle('btop')), - Key([ALT], "v", lazy.group['scratchpad'].dropdown_toggle('volume')), + Key([CTRL], "Return", lazy.group['TAB'].dropdown_toggle('term')), + Key([ALT], "c", lazy.group['TAB'].dropdown_toggle('clifm')), + Key([ALT], "b", lazy.group['TAB'].dropdown_toggle('btop')), + Key([ALT], "v", lazy.group['TAB'].dropdown_toggle('volume')), ]) + #################### ## Layouts Config ## #################### @@ -396,11 +415,25 @@ wl_input_rules = None # # We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in # java that happens to be on java's whitelist. -wmname = "Qtile 0.22.1" +wmname = "Qtile" + +@hook.subscribe.screens_reconfigured +async def _(): + if len(qtile.screens) > 1: + Widgets.groupBox1.visible_groups = ['1', '2', '3', '4', '5'] + Widgets.groupBox2.visible_groups = ['6', '7', '8', '9', '0'] + else: + Widgets.groupBox1.visible_groups = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'] @hook.subscribe.startup_once def start_once(): + if len(qtile.screens) > 1: + Widgets.groupBox1.visible_groups = ['1', '2', '3', '4', '5'] + Widgets.groupBox2.visible_groups = ['6', '7', '8', '9', '0'] + else: + Widgets.groupBox1.visible_groups = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'] + for configure in Commands.configure: subprocess.Popen([configure], shell=True) diff --git a/qtile/.config/qtile/scripts/picom-toggle.sh b/qtile/.config/qtile/scripts/picom-toggle.sh index 5c2bb4189..d9e88bfdc 100755 --- a/qtile/.config/qtile/scripts/picom-toggle.sh +++ b/qtile/.config/qtile/scripts/picom-toggle.sh @@ -9,5 +9,5 @@ if pgrep -x "picom" > /dev/null then killall picom else - picom -CGb --config ~/.config/picom/picom.conf + picom --config ~/.config/picom/picom.conf & fi diff --git a/qtile/.config/qtile/widgets.py b/qtile/.config/qtile/widgets.py index 52a5b7d92..233a73264 100644 --- a/qtile/.config/qtile/widgets.py +++ b/qtile/.config/qtile/widgets.py @@ -64,7 +64,6 @@ class Widgets(object): foreground=foregroundColor, background=backgroundColor, use_mouse_wheel=False, - visible_groups=["1", "2", "3", "4", "5"], ) groupBox2 = widget.GroupBox( @@ -92,7 +91,6 @@ class Widgets(object): foreground=foregroundColor, background=backgroundColor, use_mouse_wheel=False, - visible_groups=["6", "7", "8", "9", "0"], ) windowName1 = widget.WindowName(