From a0807a0ebb07d1cfbcf88bc3dc81eca4a5ff11e1 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Tue, 26 Jul 2022 21:29:51 +0200 Subject: Add config.org file to qtile conig --- .config/qtile/config.py | 113 ++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 56 deletions(-) (limited to '.config/qtile/config.py') diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 86d14bd..0cdd232 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -10,8 +10,9 @@ from libqtile.lazy import lazy from libqtile.utils import guess_terminal from libqtile import hook -mod = "mod4" -terminal = guess_terminal() +MOD = "mod4" + +TERMINAL = guess_terminal() BAR = '#282a36' LIGHT_BAR = '#393b37' @@ -22,55 +23,54 @@ GREEN = '#50fa7b' CYAN = '#8be9fd' LIGHT_CYAN = '#abfbff' - @hook.subscribe.startup_once def autostart(): home = os.path.expanduser('~/.config/qtile/autorc') subprocess.run([home]) keys = [ - Key([mod], "h", lazy.layout.left(), desc="Move focus to left"), - Key([mod], "l", lazy.layout.right(), desc="Move focus to right"), - Key([mod], "j", lazy.layout.down(), desc="Move focus down"), - Key([mod], "k", lazy.layout.up(), desc="Move focus up"), - Key([mod], "s", lazy.next_screen() ), - Key([mod], "space", lazy.layout.next(), + Key([MOD], "h", lazy.layout.left(), desc="Move focus to left"), + Key([MOD], "l", lazy.layout.right(), desc="Move focus to right"), + Key([MOD], "j", lazy.layout.down(), desc="Move focus down"), + Key([MOD], "k", lazy.layout.up(), desc="Move focus up"), + Key([MOD], "s", lazy.next_screen() ), + Key([MOD], "space", lazy.window.toggle_floating(), desc="Move window focus to other window"), - Key([mod, "shift"], "h", lazy.layout.shuffle_left(), + Key([MOD, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"), - Key([mod, "shift"], "l", lazy.layout.shuffle_right(), + Key([MOD, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"), - Key([mod, "shift"], "j", lazy.layout.shuffle_down(), + Key([MOD, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"), - Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"), + Key([MOD, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"), - Key([mod, "control"], "h", lazy.layout.grow_left(), + Key([MOD, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"), - Key([mod, "control"], "l", lazy.layout.grow_right(), + Key([MOD, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"), - Key([mod, "control"], "j", lazy.layout.grow_down(), + Key([MOD, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"), - Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), - Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), + Key([MOD, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), + Key([MOD], "n", lazy.layout.normalize(), desc="Reset all window sizes"), - Key([mod, "shift"], "Return", lazy.layout.toggle_split(), + Key([MOD, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), - Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), + Key([MOD], "Return", lazy.spawn(TERMINAL), desc="Launch terminal"), - Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), - Key([mod], "c", lazy.window.kill(), desc="Kill focused window"), + Key([MOD], "Tab", lazy.next_layout(), desc="Toggle between layouts"), + Key([MOD], "c", lazy.window.kill(), desc="Kill focused window"), - Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"), - Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), + Key([MOD, "control"], "r", lazy.restart(), desc="Restart Qtile"), + Key([MOD, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), - Key([mod], "F12", os.system("xbacklight -inc 10"), desc="Inc backlight"), - Key([mod], "F11", os.system("xbacklight -dec 10"), desc="Dec backlight"), + Key([MOD], "F12", os.system("xbacklight -inc 10"), desc="Inc backlight"), + Key([MOD], "F11", os.system("xbacklight -dec 10"), desc="Dec backlight"), - Key([mod], "r", lazy.spawncmd(), + Key([MOD], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), - Key([mod], "p", lazy.run_extension(extension.DmenuRun( + Key([MOD], "p", lazy.run_extension(extension.DmenuRun( dmenu_prompt="Run", dmenu_bottom=False, dmenu_lines=56, @@ -79,17 +79,18 @@ keys = [ foreground=CYAN, ))), - Key([mod, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), - Key([mod, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), - Key([mod, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), - Key([mod, "mod1"], "e", lazy.spawn("emacs"), desc="Spawn emacs"), - Key([mod, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"), - Key([mod, "mod1"], "c", lazy.spawn("alacritty -e cmus"), desc="Spawn cmus (music player)"), - Key([mod, "mod1"], "g", lazy.spawn("alacritty -e /home/jakub/.config/qtile/mdt_shell"), desc="connect to google coral device"), - Key([mod, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"), - Key([mod, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"), - Key([mod, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"), + Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), + Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), + Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), + Key([MOD, "mod1"], "e", lazy.spawn("emacs"), desc="Spawn emacs"), + Key([MOD, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"), + Key([MOD, "mod1"], "c", lazy.spawn("alacritty -e cmus"), desc="Spawn cmus (music player)"), + Key([MOD, "mod1"], "g", lazy.spawn("alacritty -e /home/jakub/.config/qtile/mdt_shell"), desc="connect to google coral device"), + Key([MOD, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"), + Key([MOD, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"), + Key([MOD, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"), ] + groups_names = [ "dev", "www", @@ -102,13 +103,20 @@ groups_names = [ groups = [Group(i) for i in groups_names] for i, group in enumerate(groups): keys.extend([ - Key([mod], str(i+1), lazy.group[group.name].toscreen(), + Key([MOD], str(i+1), lazy.group[group.name].toscreen(), desc="Switch to group {}".format(group.name)), - Key([mod, "shift"], str(i+1), lazy.window.togroup(group.name, switch_group=True), + Key([MOD, "shift"], str(i+1), lazy.window.togroup(group.name, switch_group=True), desc="Switch to & move focused window to group {}".format(group.name)), ]) +mouse = [ + Drag([MOD], "Button1", lazy.window.set_position_floating(), + start=lazy.window.get_position()), + Drag([MOD], "Button3", lazy.window.set_size_floating(), + start=lazy.window.get_size()), + Click([MOD], "Button2", lazy.window.bring_to_front()) +] layout_cfg = { 'border_width': 2, @@ -118,12 +126,12 @@ layout_cfg = { } layouts = [ - layout.Columns(**layout_cfg), + # layout.Columns(**layout_cfg), # layout.Max(), layout.Stack(num_stacks=1, **layout_cfg), # layout.Bsp(), # layout.Matrix(), - # layout.MonadTall(), + layout.MonadTall(**layout_cfg), # layout.MonadWide(), # layout.RatioTile(), # layout.Tile(), @@ -137,7 +145,6 @@ widget_defaults = dict( fontsize=12, padding=6, ) -extension_defaults = widget_defaults.copy() transparent_sep = { 'foreground': BAR, @@ -195,19 +202,6 @@ screens = [ ), ] -mouse = [ - Drag([mod], "Button1", lazy.window.set_position_floating(), - start=lazy.window.get_position()), - Drag([mod], "Button3", lazy.window.set_size_floating(), - start=lazy.window.get_size()), - Click([mod], "Button2", lazy.window.bring_to_front()) -] - -dgroups_key_binder = None -dgroups_app_rules = [] # type: List -follow_mouse_focus = True -bring_front_click = False -cursor_warp = False floating_layout = layout.Floating(float_rules=[ # Run the utility of `xprop` to see the wm class and name of an X client. *layout.Floating.default_float_rules, @@ -218,6 +212,13 @@ floating_layout = layout.Floating(float_rules=[ Match(title='branchdialog'), # gitk Match(title='pinentry'), # GPG key password entry ]) + +dgroups_key_binder = None +dgroups_app_rules = [] + +follow_mouse_focus = True +bring_front_click = False +cursor_warp = False auto_fullscreen = True focus_on_window_activation = "smart" reconfigure_screens = True -- cgit v1.2.3