# Change window sizes (MonadTall) Key([mod, "shift"], "l", lazy.layout.grow()), Key([mod, "shift"], "h", lazy.layout.shrink()), # Move windows up or down in current stack Key([mod, "control"], "k", lazy.layout.shuffle_down()), Key([mod, "control"], "j", lazy.layout.shuffle_up()), # Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next()), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate()), Key([mod, "shift"], "Return", lazy.layout.toggle_split()), Key([mod], "Return", lazy.spawn(terminal)), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout()), Key([mod], "w", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "r", lazy.spawncmd()), # APPS CONFIG # menu Key([mod], "m", lazy.spawn("rofi -show run")), # visual Key([mod], "v", lazy.spawn("code")),
mod = "mod4" terminal = guess_terminal() 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], "r", lazy.spawncmd(), desc = "Spawn a command using a prompt widget"), Key([mod], "w", lazy.window.kill(), desc = "Kill focused window"), Key([mod], "m", lazy.layout.maximize(), desc = 'toggle window between minimum and maximum sizes'), Key([mod], "n", lazy.layout.normalize(), desc = "Reset all window sizes"), Key([mod], "Tab", lazy.next_layout(), desc = "Toggle between layouts"), Key([mod], "space", lazy.layout.next(), desc = "Move window focus to other window"), Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc = "Move window to the left"), Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc = "Move window to the right"), 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"], "f", lazy.window.toggle_floating(), desc = 'toggle floating'), Key([mod, "shift"], "Return", lazy.spawn("rofi -show drun -show-icons"), desc="Move window up"), Key([mod, "shift"], "space",lazy.layout.rotate(), lazy.layout.flip(), desc = 'Switch which side main pane occupies (XmonadTall)'), Key([mod, "control"], "h", lazy.layout.grow_left(), desc = "Grow window to the left"), Key([mod, "control"], "l", lazy.layout.grow_right(), desc = "Grow window to the right"), 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, "control"], "Return", lazy.layout.toggle_split(), desc = "Toggle between split and unsplit sides of stack"), Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"),
# Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate(), desc="Swap panes of split stack"), Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"), Key([mod], "g", lazy.window.toggle_floating(), desc="Toggle floating"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes #Key([mod, "shift"], "Return", lazy.layout.toggle_split(), # desc="Toggle between split and unsplit sides of stack"), Key([mod], "t", lazy.spawn(terminal), desc="Launch terminal"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "q", 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], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), ] groups = [Group(i) for i in "12345"] for i in groups:
# Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate(), desc="Swap panes of split stack"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes 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"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod, "shift"], "q", lazy.window.kill(), desc="Kill focused window"), Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), Key([mod], "d", lazy.spawn("rofi -show drun")), Key([mod], "f", lazy.spawn("firefox")), Key([mod, "control"], "r", lazy.spawn("ranger")), Key([mod, "control"], "p", lazy.spawn("bashtop")), Key([mod, "control"], "p", lazy.spawn("bashtop")), Key([mod, "shift"], "p", lazy.spawn("main -s | xclip -selection clipboard -t image/png")),
import psutil import subprocess from typing import List # noqa: F401 from libqtile import bar, layout, widget, hook, qtile from libqtile.config import Click, Drag, Group, Key, Match, Screen from libqtile.lazy import lazy from libqtile.utils import guess_terminal import battery mod = "mod1" # Alt key. sup = "mod4" # Super key. terminal = "tilix" keys = [ # Spawn Guide. Key([], "XF86Favorites", lazy.spawn('zathura ~/.config/help.pdf')), # Program spawn. Key([sup], "1", lazy.spawn('firefox')), # Firefox browser. Key([sup], "2", lazy.spawn('nemo')), # Nemo File Manager. Key([sup], "3", lazy.spawn(terminal)), # Tilix terminal emulator. Key([sup], "4", lazy.spawn('code')), # Visual Studio Code. #Key([sup], "5", lazy.spawn('spyder')), # Spyder IDE. #Key([sup], "6", lazy.spawn('vmplayer')), # Vmware Player. Key([sup], "7", lazy.spawn( '/home/necronzero/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/bin/studio.sh' )), # Android Studio Key([sup], "8", lazy.spawn("simple-scan")), # Gnome document scanner GUI Key([sup], "9", lazy.spawn("chromium")), Key([sup], "0", lazy.spawn(terminal + ' -e bpytop')), # Navigating through windows.
desc="Grow window down"), Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), Key([mod], "comma", lazy.prev_screen(), desc="Focus to the left screen"), Key([mod], "period", lazy.next_screen(), desc="Focus to the right screen"), Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes 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"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod, "shift"], "c", lazy.window.kill(), desc="Kill focused window"), Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"), Key( [mod, "shift"], "q", lazy.spawn("rofi -show powermenu -modi powermenu:" + home + "/.local/bin/rofi_powermenu.sh"), desc="Shutdown Qtile", ), Key([mod], "t", lazy.window.toggle_floating(), desc="Toggle floating window"),
Key([mod], "Up", lazy.layout.up()), Key([mod], "Down", lazy.layout.down()), Key([mod], "Left", lazy.layout.left()), Key([mod], "Right", lazy.layout.right()), # Move windows up or down in current stack Key([mod, "control"], "Down", lazy.layout.shuffle_down()), Key([mod, "control"], "Up", lazy.layout.shuffle_up()), Key([mod, "control"], "Left", lazy.layout.shuffle_left()), Key([mod, "control"], "Right", lazy.layout.shuffle_right()), # Swap panes of split stack Key([mod], "Tab", lazy.layout.rotate()), # Brightness Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 5")), Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 5")), # Volume Key([], "XF86AudioMute", lazy.spawn("pulsemixer --toggle-mute")), Key([], "XF86AudioLowerVolume", lazy.spawn("pulsemixer --change-volume -5 --max-volume 100")), Key([], "XF86AudioRaiseVolume", lazy.spawn("pulsemixer --change-volume +5 --max-volume 100")), # Key([], "XF86AudioMute", lazy.spawn("amixer -D pulse sset Master toggle")), # Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -D pulse sset Master 5%-")), # Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -D pulse sset Master 5%+")), # Media player Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")), Key([], "XF86AudioNext", lazy.spawn("playerctl next")),
Key([MOD, SHIFT], "l", lazy.layout.shuffle_right()), Key([MOD], "w", lazy.layout.flip()), #-------------------- workspaces --------------------# Key([MOD], "a", lazy.group["1"].toscreen()), Key([MOD], "s", lazy.group["2"].toscreen()), Key([MOD], "d", lazy.group["3"].toscreen()), Key([MOD], "p", lazy.group["4"].toscreen()), Key([MOD, SHIFT], "a", lazy.window.togroup("1")), Key([MOD, SHIFT], "s", lazy.window.togroup("2")), Key([MOD, SHIFT], "d", lazy.window.togroup("3")), Key([MOD, SHIFT], "p", lazy.window.togroup("4")), Key([MOD], "f", lazy.next_layout()), Key([MOD], "semicolon", lazy.hide_show_bar("top")), #------------------- applications -------------------# Key([], "F6", lazy.spawn("kitty -e ./Dropbox/scripts/bctl.sh")), Key([MOD], "i", lazy.spawn("firefox")), Key([MOD], "o", lazy.spawn("dmenu_run -nb '#272422' \ -nf '#fafafa' -sf '#fafafa' \ -fn 'PragmataPro-10'\ -sb '#404040' -h 20 -w 480 -x 445 -y 2")), Key([], "F10", lazy.spawn( "i3lock -n -i /home/codex/Pictures/street.jpg --insidecolor=373445ff --ringcolor=ffffffff --line-uses-inside --keyhlcolor=d23c3dff --bshlcolor=d23c3dff --separatorcolor=00000000 --insidevercolor=feffffff --insidewrongcolor=d23c3dff --ringvercolor=ffffffff --ringwrongcolor=ffffffff --radius=15 --veriftext=" " --wrongtext=" " --clock --timepos='x+150:y+734' --datepos='x+150:y+728' --timecolor='ffffffff' --datecolor='00000000' --indpos='x+50:y+723' --indicator" )), #-------------------- operations --------------------# Key([MOD], "q", lazy.window.kill()),
Key([mod], "l", lazy.layout.right()), Key([mod], "j", lazy.layout.down()), Key([mod], "k", lazy.layout.up()), Key([mod, "shift"], "h", lazy.layout.swap_left()), Key([mod, "shift"], "l", lazy.layout.swap_right()), Key([mod, "shift"], "j", lazy.layout.shuffle_down()), Key([mod, "shift"], "k", lazy.layout.shuffle_up()), Key([mod], "i", lazy.layout.grow()), Key([mod], "m", lazy.layout.shrink()), Key([mod], "n", lazy.layout.normalize()), Key([mod], "o", lazy.layout.maximize()), Key([mod, "shift"], "space", lazy.layout.flip()), # Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next()), Key([mod], "Return", lazy.spawn(TERMINAL)), Key([mod], "f", lazy.spawn(BROWSER)), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout()), Key([mod], "w", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "r", lazy.spawncmd()), ] groups = [Group(i) for i in "123456789"] for i in groups: keys.extend([ Key([mod],
Key([mod, "control"], "l", lazy.layout.grow_right(),desc="Grow window to the right"), Key([mod, "control"], "j", lazy.layout.grow_down(),desc="Grow window down"), Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), # From floating########################################## Key([mod], "Up", lazy.window.toggle_maximize(),lazy.window.disable_floating()), Key([mod], "Down", lazy.window.toggle_minimize()), Key([mod, "control"], "Up", lazy.window.toggle_fullscreen()), # Toggle between layouts################################ Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), # Actions######################################## Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), Key([mod], "x", lazy.window.kill(), desc="Kill focused window"), Key([mod, "control"], "F5", lazy.restart(),lazy.spawn('xrandr -s 0'), desc="Restart Qtile"), Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), # Spawns############################################### Key([mod], "r", lazy.spawn(terminal), desc="Launch terminal"), Key([mod], "f", lazy.spawncmd(),desc="Spawn a command using a prompt widget"), Key([mod], "Return",lazy.spawn('rofi -show drun'),desc='Run Launcher'), Key([], "Print", lazy.spawn("deepin-screenshot")), Key([mod], "w",lazy.spawn('alacritty -e nvim /home/seba/.dropbox/Files/Dropbox/wiki/index.md' ),desc='Start vimwiki') ] # Drag floating layouts. mouse = [ Drag([mod], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()), Drag([mod], "Button3", lazy.window.set_size_floating(),
#move in stack Key([MOD, SHIFT], DOWN, lazy.layout.suffle_down()), Key([MOD, SHIFT], UP, lazy.layout.suffle_up()), #kill windows Key([MOD], "q", lazy.window.kill()), #restart shutdown Key([MOD, CONTROL, SHIFT], "r", lazy.restart()), Key([MOD, CONTROL, SHIFT], "q", lazy.shutdown()), #change layout Key([MOD], "Tab", lazy.next_layout()), Key([MOD, SHIFT], "Tab", lazy.prev_layout()), #spawn windows Key([MOD], "Return", lazy.spawn("alacritty")), Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")), Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")), Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")), Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")), Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 10%-")), #menu Key([MOD], "d", lazy.spawn("rofi -show drun -show-icons -disable-history")), #thunar Key([MOD], "e", lazy.spawn("thunar")),
Key([mod, "control"], "d", lazy.layout.shuffle_down(), desc="Move window right in current stack "), # Switch window focus to other pane(s) of stack Key(["mod1", "shift"], "Tab", lazy.layout.previous(), desc="Switch window focus to other pane(s) of stack"), Key(["mod1"], "Tab", lazy.layout.next(), desc="Switch window focus to other pane(s) of stack"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), Key([mod], "t", lazy.spawn(terminal), desc="Launch terminal"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], 'f', lazy.window.toggle_floating()), Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), Key([mod], "x", lazy.spawn(powermenu), desc="Show Powermenu"), Key([mod], "e", lazy.spawn(file_manager), desc="Run File Manager"), Key([mod], "b", lazy.spawn(my_browser), desc="Run Browser"), Key([mod], "c", lazy.spawn(code_editor), desc="Run Code Editor"), Key([mod], "m", lazy.spawn(calculator), desc="Run Calculator"), Key(["shift"], "Print", lazy.spawn(screenshot), desc="Full Screenshot"), Key([], "Print", lazy.spawn(meet_screenshot), desc="Meet Screenshot"), Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"), Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
("M-C-n", [ lazy.layout.reset().when(layout="tall"), lazy.layout.normalize().when(layout="cols"), ], "Reset layout"), ("M-C-i", [ lazy.layout.swap_column_left().when(layout="cols") ], "Shuffle window right"), ("M-C-o", [ lazy.layout.swap_column_right().when(layout="cols") ], "Shuffle window right"), ("M-C-f", [ lazy.layout.flip().when(layout="tall") ], "Shuffle window right"), # Applications ("M-<Return>", lazy.spawn(terminal), "Launch terminal"), ("M-e", lazy.spawn(f"{terminal} {editor}"), "Launch editor"), ("M-b", lazy.spawn(f"{browser} --disable-features=SendMouseLeaveEvents"), "Launch browser"), ("M-S-b", lazy.spawn(f"{browser} --incognito"), "Launch browser (incognito)"), # Launchers ("M-<space>", lazy.spawn("rofi -show drun"), "Launch rofi"), ("M-S-<space>", [ ('p', lazy.spawn(rofi.show("projects")), "Launch rofi (projects)"), ('d', lazy.spawn(rofi.show("dotfiles")), "Launch rofi (dotfiles)"), ('b', lazy.spawn(rofi.show("bookmarks")), "Launch rofi (bookmarks)"), ('e', lazy.spawn("rofimoji"), "Launch rofi (emoji)"), ], ""), ("M-q", lazy.spawn(rofi.show("system")), "Launch rofi (power menu)"), # Volume
# Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next(), desc="Switch window focus to other pane(s) of stack"), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate(), desc="Swap panes of split stack"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes 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"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "w", lazy.window.kill(), desc="Kill focused window"), # Qtile system keys Key([mod, "control"], "l", lazy.spawn("betterlockscreen -l")), Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"), Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"), Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), Key([mod, "control"], "p", lazy.spawn("rofi -show p -modi p:"+home+"/.local/bin/rofi-power-menu -width 20 -lines 6")), # Rofi Key(["control"], "space", lazy.spawn("rofi -show drun")),
# Grow windows (Columns mode) Key([mod, "control"], "h", lazy.layout.grow_left()), Key([mod, "control"], "l", lazy.layout.grow_right()), Key([mod, "control"], "j", lazy.layout.grow_down()), Key([mod, "control"], "k", lazy.layout.grow_up()), Key([mod], "n", lazy.layout.normalize()), # Grow windows (XMonad mode) Key([mod], "i", lazy.layout.grow()), Key([mod], "m", lazy.layout.shrink()), Key([mod], "o", lazy.layout.maximize()), Key([mod, "shift"], "space", lazy.layout.flip()), # Spawn apps Key([mod], "Return", lazy.spawn(terminal)), Key([mod], "r", lazy.spawn(menu)), Key([mod], "f", lazy.spawn(browser)), Key([mod], "s", lazy.spawn(music_player)), Key([mod], "v", lazy.spawn(video_player)), Key([mod], "p", lazy.spawn(doc_reader)), Key([mod], "n", lazy.spawn(notes)), Key([mod, "shift"], "m", lazy.spawn(mail)), # Toggle between layouts Key([mod], "Tab", lazy.next_layout()), Key([mod], "w", lazy.window.kill()), # Qtile options Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()),
def update(): lazy.spawn(my_term + " -e 'sudo pacman -Syu'")
def get_asdf(): keys = [ # Switch between windows 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], "space", lazy.layout.next(), desc="Move window focus to other window"), # Move windows between left/right columns or move up/down in current stack. # Moving out of range in Columns layout will create new column. Key( [mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left", ), Key( [mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right", ), 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"], "f", lazy.window.toggle_floating(), desc="toggle floating"), Key([mod], "f", lazy.window.toggle_fullscreen(), desc="toggle fullscreen"), # Grow windows. If current window is on the edge of screen and direction # will be to screen edge - window would shrink. Key( [mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left", ), Key( [mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right", ), 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"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key( [mod, "shift"], "Return", lazy.spawn("rofi -show combi"), desc="Toggle between split and unsplit sides of stack", ), Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "w", lazy.window.kill(), desc="Kill focused window"), Key([mod], "b", lazy.spawn(browser), desc="Launch Qutebrowser"), Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"), Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), Key( [mod], "r", lazy.spawn("rofi -show drun"), desc="Spawn a command using a prompt widget", ), KeyChord( ["control"], "e", [ Key( [], "e", lazy.spawn("emacsclient -c -a 'emacs'"), desc="Launch Emacs", ), Key( [], "b", lazy.spawn("emacsclient -c -a 'emacs' --eval '(ibuffer)'"), desc="Launch ibuffer inside Emacs", ), Key( [], "d", lazy.spawn( "emacsclient -c -a 'emacs' --eval '(dired nil)'"), desc="Launch dired inside Emacs", ), Key( [], "i", lazy.spawn("emacsclient -c -a 'emacs' --eval '(erc)'"), desc="Launch erc inside Emacs", ), Key( [], "m", lazy.spawn("emacsclient -c -a 'emacs' --eval '(mu4e)'"), desc="Launch mu4e inside Emacs", ), Key( [], "n", lazy.spawn("emacsclient -c -a 'emacs' --eval '(elfeed)'"), desc="Launch elfeed inside Emacs", ), Key( [], "s", lazy.spawn("emacsclient -c -a 'emacs' --eval '(eshell)'"), desc="Launch the eshell inside Emacs", ), Key( [], "v", lazy.spawn( "emacsclient -c -a 'emacs' --eval '(+vterm/here nil)'" ), desc="Launch vterm inside Emacs", ), ], ), # Monitor Switches Key([mod], "period", lazy.next_screen(), desc="Move focus to next monitor"), Key([mod], "comma", lazy.prev_screen(), desc="Move focus to prev monitor"), ## Treetab controls Key( [mod, "shift"], "h", lazy.layout.move_left(), desc="Move up a section in treetab", ), Key( [mod, "shift"], "l", lazy.layout.move_right(), desc="Move down a section in treetab", ), ] # Idea taken from Augusto Nicola's Dotfiles => https://github.com/AugustoNicola/dotfiles group_names = [ ("SYS", { "label": "ﬦ", "layout": "columns" }), ("DEV", { "label": "", "layout": "columns" }), ("WWW", { "label": "", "layout": "columns" }), ("DIS", { "label": "ﭮ", "layout": "columns" }), ("TEAMS", { "label": "", "layout": "columns" }), ("DOC", { "label": "", "layout": "columns" }), ("MUS", { "label": "", "layout": "columns" }), ("VID", { "label": "嗢", "layout": "columns" }), ("VBOX", { "label": "", "layout": "columns" }), ] groups = [ Group(name, init=True, persist=True, **kwargs) for name, kwargs in group_names ] for i, (name, kwargs) in enumerate(group_names, 1): keys.append( Key([mod], str(i), lazy.group[name].toscreen())) # Switch to another group keys.append(Key( [mod, "shift"], str(i), lazy.window.togroup(name))) # Send current window to another group return keys, groups
# Move windows up or down in current stack #Key([mod, "control"], "k", lazy.layout.shuffle_down()), #Key([mod, "control"], "j", lazy.layout.shuffle_up()), # Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next()), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate()), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key([mod, "shift"], "Return", lazy.layout.toggle_split()), Key([mod], "Return", lazy.spawn("kitty")), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout()), Key([mod], "w", lazy.window.kill()), # Qtile commands Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "r", lazy.spawncmd()), ### Custom Keybinds for bsp layout ### Key([mod], "j", lazy.layout.down()), Key([mod], "k", lazy.layout.up()), Key([mod], "h", lazy.layout.left()), Key([mod], "l", lazy.layout.right()),
# Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key( [mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack", ), # Spawning programs Key([mod], "Return", lazy.spawn(binaries['terminal']), desc="Launch terminal"), Key([mod, "shift"], "Return", lazy.spawn(binaries['floating-term']), desc="Launch terminal"), Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"), Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), ] # Keybinds to switch to a specific group or move windows to a group for i in groups: keys.extend([
Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"), Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"), 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"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes 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"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "w", 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], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), Key([mod, "shift"], "m", lazy.spawn("rofi -show")), Key([mod], "m", lazy.spawn("rofi -show run")), Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")), Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 10%-")), Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")), Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")),
i = qtile.screens.index(qtile.current_screen) if i + 1 != len(qtile.screens): group = qtile.screens[i + 1].group.name qtile.current_window.togroup(group) def switch_screens(qtile): i = qtile.screens.index(qtile.current_screen) group = qtile.screens[i - 1].group qtile.current_screen.set_group(group) # keybindings keys = [ # Launch terminal, kill window, restart and exit Qtile Key([mod], "Return", lazy.spawn(myTerm)), Key([mod], "x", lazy.window.kill()), # Key([mod], "Escape", lazy.spawn('xkill')), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()), # Key([mod], "x", lazy.spawn("powerspec")), # Dmenu, Rofi and Gmrun # Key([mod, "mod1"], "d", lazy.spawn("dmenu_run")), # Key([mod, "mod1"], "n", lazy.spawn("networkmanager_dmenu")), # Key([mod, "mod1"], "r", lazy.spawn("dmenufm")), Key([mod, "shift"], "Return", lazy.spawn("rofi -modi drun -show drun -show-icons")), Key([mod, "mod1"], "c", lazy.spawn("rofi -show emoji -modi emoji")), Key([mod, "mod1"], "v", lazy.spawn("rofi-locate")), # Key([mod, "mod1"], "z", lazy.spawn("gmrun")),
import os import subprocess from typing import List # noqa: F401 mod = "mod4" term="xterm" @hook.subscribe.startup_once def autostart(): home = os.path.expanduser('~/.config/qtile/autostart.sh') subprocess.call([home]) keys = [ # Sound Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -q -D pulse sset Master 1%-")), Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -q -D pulse sset Master 1%+")), # Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next()), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate()), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key([mod, "shift"], "Return", lazy.layout.toggle_split()), Key([mod], "Return", lazy.spawn("xterm")),
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"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes 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"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod, "shift"], "q", lazy.window.kill(), desc="Kill focused window"), Key([mod, "shift"], "r", lazy.restart(), desc="Restart Qtile"), Key([mod, "shift"], "c", lazy.shutdown(), desc="Shutdown Qtile"), Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), Key( [mod], "d", lazy.spawn("appmenu"), desc="rofi instantos pywal ",
'nord9': '#81A1C1', 'nord10': '#5E81AC', 'nord11': '#BF616A', 'nord12': '#D08770', 'nord13': '#EBCB8B', 'nord14': '#A3BE8C', 'nord15': '#B48EAD' } my_background = my_nord_theme['nord0'] my_foreground = my_nord_theme['nord4'] keys = [ ### Essentials Key([mod], "Return", lazy.spawn(my_terminal), desc='Launches my terminal emulator'), Key([mod], "q", lazy.window.kill(), desc='Kills window with focus'), Key([mod, "control"], "r", lazy.restart(), desc='Restarts QTile and reloads config'), Key([mod, "control"], "q", lazy.shutdown(), desc='Quit QTile'), Key([mod], "space", lazy.spawn("rofi -show run"), desc='Start rofi application launcher'), Key(["mod1"], "Tab", lazy.spawn("rofi -show window"), desc='Start rofi window switcher'),
@hook.subscribe.startup_once def start_once(): home = os.path.expanduser("~/dotfiles/qtile/autostart.sh") subprocess.call([home]) class Audio: volume_up = "pactl set-sink-volume @DEFAULT_SINK@ +5%" volume_down = "pactl set-sink-volume @DEFAULT_SINK@ -5%" toggle_mute = "pactl set-sink-mute @DEFAULT_SINK@ toggle" keys = [ Key([mod], "d", lazy.spawn("rofi -modi window,drun,run -show drun"), desc="Launches command launcher"), # Switch between windows Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"), Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"), Key([mod], "Down", lazy.layout.down(), desc="Move focus down"), Key([mod], "Up", lazy.layout.up(), desc="Move focus up"), Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"), # Move windows between left/right columns or move up/down in current stack. # Moving out of range in Columns layout will create new column. Key([mod, "shift"],
Key([MOD] , "a", lazy.group["1"].toscreen()), Key([MOD] , "s", lazy.group["2"].toscreen()), Key([MOD] , "d", lazy.group["3"].toscreen()), Key([MOD] , "p", lazy.group["4"].toscreen()), Key([MOD] , "f", lazy.next_layout()), Key([MOD] , "semicolon", lazy.hide_show_bar("top")), #------------------- applications -------------------# Key([MOD] , "slash", lazy.spawn(FILES)), Key([MOD] , "i", lazy.spawn("firefox")), Key([MOD] , "space", lazy.spawn("dmenu_run -nb '#272422' \ -nf '#fafafa' -sf '#fafafa' \ -fn 'PragmataPro-10'\ -sb '#404040' -h 20 -w 480 -x 445 -y 2")), Key([MOD, SHIFT] , "space", lazy.spawn("i3lock -n -i /home/arandel/Pictures/genshin.jpg --insidecolor=373445ff --ringcolor=ffffffff --line-uses-inside --keyhlcolor=d23c3dff --bshlcolor=d23c3dff --separatorcolor=00000000 --insidevercolor=feffffff --insidewrongcolor=d23c3dff --ringvercolor=ffffffff --ringwrongcolor=ffffffff --radius=15 --veriftext="" --wrongtext="" --clock --timepos='x+150:y+734' --datepos='x+150:y+728' --timecolor='ffffffff' --datecolor='00000000' --indpos='x+50:y+723' --indicator")), #-------------------- operations --------------------# Key([MOD] , "w", lazy.window.kill()), Key([MOD] , "c", lazy.restart()), Key([MOD,SHIFT] , "x", lazy.shutdown(),),
# Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate(), desc="Swap panes of split stack"), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), Key([mod], "Return", lazy.spawn("alacritty"), desc="Launch terminal"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "w", 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], "r", lazy.spawn('rofi -show run'), desc="Spawn a command using a prompt widget"), Key([mod], "b", lazy.spawn("brave"), desc="Opens up brave browser.") ] groups = [Group(i) for i in "12345678"]
# Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate(), desc="Swap panes of split stack"), Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod, "shift"], "f", lazy.window.toggle_floating()), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes 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"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "q", 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], "r", lazy.spawn("dmenu_run"), desc="Spawn a dmenu_run launcher"), Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")), Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")), Key([], "Print", lazy.function(take_screenshot)), ] groups = []
# Move windows up or down in current stack Key([mod, "control"], "k", lazy.layout.shuffle_down()), Key([mod, "control"], "j", lazy.layout.shuffle_up()), # Switch window focus to other pane(s) of stack # Key([mod], "space", lazy.layout.next()), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate()), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes # Key([mod, "shift"], "Return", lazy.layout.toggle_split()), Key([mod], "Return", lazy.spawn(MY_TERM)), Key([mod], "r", lazy.spawn( "dmenu_run -fn 'UbuntuMono Nerd Font:size=10' -nb '#292d3e' -nf '#bbc5ff' -sb '#82AAFF' -sf '#292d3e' -p 'dmenu:'" )), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.layout.next()), Key([mod, "shift"], "w", lazy.window.kill()), # Key([mod, "mod1"], "r", lazy.restart()), # lo quito porque hago la validación abajo Key([mod, "control"], "r", lazy.restart()), Key([mod, "mod1"], "r", validate_and_restart), Key([mod, "mod1"], "q", lazy.shutdown()), # Key([mod], "r", lazy.spawncmd()), Key([mod, "shift"], "Escape", lazy.spawn(ROFI_SCRIPTS_DIR + 'rofi_logout.sh')),
# VARIÁVEIS DE CORES bg, fg, cursor, color1, color2, color3, color4, color5, color6, color7, color8 = get_colors( ) mod = "mod4" ctrl = 'control' alt = 'mod1' shift = 'shift' terminal = guess_terminal() # default qtile keys = [ # MOVIMENTO DAS TELAS Key([alt], 'h', lazy.spawn('qtile cmd-obj -o cmd -f next_screen')), Key([alt], 'l', lazy.spawn('qtile cmd-obj -o cmd -f previous_screen')), # FOCUS DA JANELA Key([mod], "j", lazy.layout.down(), desc='Foco na janela de baixo'), Key([mod], "k", lazy.layout.up(), desc='Foco na janela de cima'), Key([mod], 'h', lazy.layout.left(), desc='Foco na janela da esquerda'), Key([mod], 'l', lazy.layout.right(), desc='Foco na janela da direita'), Key([mod], "space", lazy.layout.next(), desc='Foco na próxima janela'), # MOVIMENTO DA JANELA FOCADA Key([mod, shift], "j", lazy.layout.shuffle_down(), desc='Move a janela pra baixo'), Key([mod, shift],