"F12", lazy.spawn(["feh", home + "/.config/qtile/mod4-mod1.png"]), desc="Open mod4-mod1 modifier image"), Key([mod, "shift"], "F12", lazy.spawn(["feh", home + "/.config/qtile/mod4-shift.png"]), desc="Open mod4-shift modifier image"), Key(["mod1"], "F12", lazy.spawn(["feh", home + "/.config/qtile/mod1.png"]), desc="Open mod1 modifier image"), # Mod4 (Super) + Key([mod], "b", lazy.hide_show_bar(position='top'), desc="Hide/show top bar"), Key([mod], "c", lazy.spawn("power"), desc="Open logot script"), Key([mod], "d", lazy.spawn( "dmenu_run -i -p 'Search' -nb '#2f2b26' -sb '#2e8b57' -fn 'JetBrains Mono Medium-12'" ), desc="Open dmenu"), Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Fullscreen on/off"), Key([mod], "i", lazy.spawn(term + " -e htop"), desc="Open htop"), Key([mod], "n", lazy.spawn(term + " -e newsboat"), desc="Open newsboat"), Key([mod], "p", lazy.spawn("discord"), desc="Open discord"), Key([mod], "q", lazy.window.kill(), desc="Close window"), Key([mod], "r",
desc="Toggle between layouts"), Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), Key([mod], "w", lazy.to_layout_index(1), desc="full layouts"), Key([mod], "s", lazy.to_layout_index(0), desc="columns layouts"), Key([mod], "o", lazy.window.toggle_fullscreen(), desc="full layouts"), Key([mod, "shift"], "o", lazy.window.toggle_floating(), desc="full layouts"), Key([mod, "shift"], "r", lazy.restart(), desc="Restart Qtile"), Key([mod, "shift"], "q", lazy.shutdown(), desc="Shutdown Qtile"), Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), Key([mod], "b", lazy.hide_show_bar()), Key([mod], "f", lazy.window.toggle_floating()), ##### Spawn ##### Key(["control"], "Return", lazy.spawn("adb shell input keyevent 26")), Key([alt, "control"], "n", lazy.spawn("feh --bg-fill --randomize " + home + "/Pictures/wallpapers/")), Key([alt, "shift"], "a", lazy.spawn("flameshot gui")), Key([alt, "control"], "a", lazy.spawn("deepin-screen-recorder")), Key([alt, "control"], "Left", lazy.spawn("xrandr --output HDMI-0 --rotate left")), Key([alt, "control"], "Right", lazy.spawn("xrandr --output HDMI-0 --rotate right")), Key([alt, "control"], "Up", lazy.spawn("xrandr --output HDMI-0 --rotate normal")),
Key([mod], 'Tab', lazy.next_layout()), Key([mod, 'shift'], 'Tab', lazy.prev_layout()), # NOTE: window Key([mod], 'F11', lazy.window.toggle_fullscreen()), Key([mod, 'shift'], 'F11', lazy.window.toggle_floating()), Key([mod], 'period', lazy.window.toggle_minimize()), Key([mod], 'numbersign', lazy.window.toggle_maximize()), # # Key([mod, 'control'], 'numbersign', lazy.group.unminimize_all()), # Key([mod], 'F4', lazy.window.kill()), Key([mod_alt], 'F4', lazy.window.kill()), # NOTE: fancy goto prompt: Key([mod], 'g', lazy.switchgroup(prompt='g')), Key([mod, 'shift'], 'g', lazy.togroup(prompt='g>')), Key([mod], 'b', lazy.hide_show_bar(position='top')), ] basic_launch_keys = [ Key([mod], 't', lazy.spawn(terminal), desc='Launch your favourite terminal.'), Key([], 'XF86WWW', lazy.spawn(browser), desc='Launch your favourite web browser.'), Key([mod], 'r', lazy.spawncmd(prompt='$')), Key([mod, 'control'], 'r', lazy.spawn('rofi -show drun')), Key([], 'XF86Search', lazy.spawn('rofi -show drun')), Key([mod], 'F4', lazy.spawn('xkill')),
), Key([mod], "l", lazy.layout.shrink(), lazy.layout.decrease_nmaster(), desc='Shrink window (MonadTall), decrease number in master pane (Tile)' ), # Toggle floating Key([mod, "shift"], "f", lazy.window.toggle_floating(), desc="Toggle floating" ), # Toggle Fullscreen Key([mod], "f", lazy.window.toggle_fullscreen(), lazy.hide_show_bar(position='all'), desc='Toggle fullscreen and the bars' ), # 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.
# Resize windows 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()), # Toggle between split and unsplit sides of stack. Key([mod, "shift"], "Return", lazy.layout.toggle_split()), # Controls Key([mod], "w", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "Escape", lazy.window.toggle_fullscreen()), Key([mod], "b", lazy.hide_show_bar("top")), # Audio Key([], "XF86AudioLowerVolume", lazy.spawn('volumecontrol down')), Key([], "XF86AudioRaiseVolume", lazy.spawn('volumecontrol up')), Key([], "XF86AudioMute", lazy.spawn('volumecontrol mute')), # Spotify Key([], "XF86AudioPlay", lazy.spawn( 'dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify '\ '/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause' )), Key([], "XF86AudioPrev", lazy.spawn( 'dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify '\ '/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous' )),
lazy.restart(), ), Key( [mod, "control"], "q", lazy.shutdown(), ), Key( [mod, "shift"], "space", lazy.window.toggle_floating(), ), Key( [mod], "t", lazy.hide_show_bar(), ), Key([mod], "Return", lazy.spawn("kitty -d ~"), desc="Launch Terminal"), Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer sset Master 5%+")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master 5%-")), Key( [], "XF86AudioMute", lazy.spawn("amixer -q -D pulse sset Master toggle"), ), Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl s 5%+")), Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl s 5%-")), Key([mod], "r", lazy.spawn("/home/lawrance/.config/qtile/scripts/launcher.sh"), desc="run rofi"),
Key([mod], "slash", lazy.window.toggle_floating(), desc="Toggle Floating"), Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle Fullscreen"), Key([mod], "w", lazy.prev_screen()), Key([mod], "o", lazy.layout.flip(), desc="Shrink Main"), Key([mod], "y", lazy.layout.maximize(), desc="Shrink Main"), Key([mod], "x", lazy.function(kick_to_next_screen)), Key([mod], "bracketleft", lazy.findwindow(), desc='Find window'), Key([mod], "b", lazy.hide_show_bar("top"), desc='Toggle bar' ), Key([mod], "t", lazy.function(toggleMargins)), Key([mod], "z", lazy.function(incMargins)), Key([mod, "shift"], "z", lazy.function(decMargins)), # Screens Key([mod], "m", lazy.screen.toggle_group(), ), Key([mod], "period", lazy.layout.shuffle_down() ), Key([mod], "comma", lazy.layout.shuffle_up() ), #Key([mod], "bracketleft", lazy.prev_screen() ), Key([mod], "r", lazy.spawn(terminal + " -e ranger"), desc="Launch Ranger"), Key([mod], "v", lazy.spawn(terminal + " -e nvim"), desc="Launch Nvim"),
from libqtile.config import Key from libqtile.lazy import lazy CONTROL_KEYS = [ Key(["control"], "r", lazy.restart(), desc="Restart Qtile"), Key(["control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), Key(["control"], "l", lazy.spawn(["betterlockscreen", "-l"]), desc="Lock Screen with betterlockscreen"), Key(["control"], "s", lazy.spawn(["betterlockscreen", "-s"]), desc="Suspend with betterlockscreen"), Key(["control"], "Home", lazy.hide_show_bar(position="top"), desc="Toggle top bar"), Key(["control"], "End", lazy.hide_show_bar(position="bottom"), desc="Toggle bottom bar"), ]
Key([mod, "shift"], "6", lazy.window.togroup(""), desc=" ... Move to group "), Key([mod], "a", lazy.next_screen(), desc=' ... Move focus to other monitor'), 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, "shift"], "Left", lazy.layout.shuffle_left(), desc=' ... Move window to the left'), Key([mod, "shift"], "Right", lazy.layout.shuffle_right(), desc=' ... Move window to the right'), Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc=' ... Move window down'), Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), desc=' ... Move window up'), Key([mod], "z", lazy.window.toggle_minimize(), desc=' ... Minimise window'), Key([mod], "s", lazy.window.toggle_floating(), desc=' ... Toggle floating'), Key([mod, "control"], "Up", lazy.layout.grow(), desc=' ... Grow window'), Key([mod, "control"], "Down", lazy.layout.shrink(), desc=' ... Shrink window'), Key([mod], "x", lazy.window.kill(), desc=' ... Kill focused window'), Key([mod], "b", lazy.hide_show_bar(position='all'), desc=' ... Toggle bars'), Key([mod], "Pause", lazy.spawn("dpower"), desc=' ... Power Menu'), Key([mod, "control"], "r", lazy.restart(), desc=' ... Restart Qtile'), Key([mod, "control"], "q", lazy.shutdown(), desc=' ... Shutdown Qtile'), Key([mod], "d", lazy.spawn("menu"), desc=' ... Main menu'), Key([mod, "shift"], "d", lazy.spawn("run_menu"), desc=' ... Run menu'), Key([mod], "c", lazy.spawn("dclipmenu"), desc=' ... Clipboard menu'), Key([mod], "u", lazy.spawn("walrand"), desc=' ... Random colourscheme'), Key([mod], "y", lazy.spawn("yad --no-buttons --image '/home/zero/.config/wpg/current_sample.png'"), desc=' ... Colourscheme'), Key([mod], "Print", lazy.spawn("flameshot full -d 5000 -p /mnt/Gog/Pictures/scrots"), desc=' ... Full screenshot'), Key([mod], "p", lazy.spawn("flameshot gui -p /mnt/Gog/Temp"), desc=' ... Screenshot'), Key([mod], "Return", lazy.spawn(terminal), desc=' ... Terminal'), Key([mod], "F1", lazy.spawn("microsoft-edge-beta"), desc=' ... Browser'), Key([mod], "F2", lazy.spawn("vscodium"), desc=' ... Text editor'), Key([mod], "F3", lazy.group['scratch'].dropdown_toggle('floaterm'), desc=' ... Scratch term'), Key([mod], "j", lazy.group['scratch'].dropdown_toggle('jack'), desc=' ... JACK patchbay'),
guiFileManager = "pcmanfm" default_margin = 0 default_border_width = 1 bar_opacity = 0.9 bar_thickness = 28 universal_fontsize = 12 keys = [ Key([mod, "shift"], "n", lazy.spawn('rofi -show drun')), # Key([mod, "shift"], "n", lazy.spawn("dmenu_run -fn 'Roboto Mono-12'")), # Key([mod, "shift"], "n", lazy.spawn( # 'rofi -no-lazy-grab -show drun -modi drun -theme ~/.config/rofi/launchers/ribbon/full_left.rasi')), Key([mod], "Tab", lazy.spawn('rofi -show window')), Key([mod, "control"], "g", lazy.spawn(terminal + \ " -e start-stop-daemon -SbCv -x ~/.config/neovide")), Key([mod], "z", lazy.hide_show_bar("bottom")), Key([mod], "m", lazy.spawn("pcmanfm")), Key([mod], "c", lazy.spawn("code")), Key([mod], "b", lazy.spawn(myBrowser)), Key([mod], "n", lazy.spawn("nitrogen")), Key([mod], "g", lazy.spawn("google-chrome")), Key([mod, "shift"], "g", lazy.spawn(terminal + \ " -e tmux new-session -d ~/.config/neovide/target/release/neovide --multiGrid")), Key([mod], "w", lazy.spawn("qalculate")), Key([mod], "v", lazy.spawn(terminal+" -e vifm")), Key([mod, "control"], "d", lazy.spawn(guiFileManager)), Key([mod, "shift"], "q", lazy.spawn("shutdown now"), desc='Shutdown Qtile' ), Key([mod, "control"], "s", lazy.spawn("systemctl suspend")),
def init_keys(self): #################### CUSTOM KEYS ########################## return [ ############ BINDINGS FOR MONADTALL ############## Key([self.mod], "h", lazy.layout.left()), Key([self.mod], "l", lazy.layout.right()), Key([self.mod], "j", lazy.layout.down()), Key([self.mod], "k", lazy.layout.up()), Key([self.mod, "shift"], "h", lazy.layout.swap_left()), Key([self.mod, "shift"], "l", lazy.layout.swap_right()), Key([self.mod, "shift"], "j", lazy.layout.shuffle_down()), Key([self.mod, "shift"], "k", lazy.layout.shuffle_up()), Key([self.mod], "i", lazy.layout.grow()), Key([self.mod], "m", lazy.layout.shrink()), Key([self.mod], "n", lazy.layout.normalize()), Key([self.mod], "o", lazy.layout.maximize()), Key([self.mod, "shift"], "space", lazy.layout.flip()), ############ BINDINGS FOR FLOATING ############## Key([self.mod, "shift"], "g", lazy.window.toggle_floating(), desc='toggle floating'), Key([self.mod, "shift"], "f", lazy.window.toggle_fullscreen(), desc='toggle fullscreen'), # Move screen to next and previous workspace Key([self.mod], "k", lazy.screen.next_group(), desc="Move screen to the next workspace"), Key([self.mod], "j", lazy.screen.prev_group(), desc="Move screen to the previous workspace"), # Move window to next group Key([self.control, self.shift], "k", Functions.window_to_next_group(), desc="Move screen to the next workspace"), Key([self.control, self.shift], "j", Functions.window_to_prev_group(), desc="Move screen to the previous workspace"), # Kill Functions Key([self.mod, self.altgr], "c", Functions.kill_all_windows_minus_current(), desc="Kill all windows except current in the workspace"), Key([self.mod, self.altgr], "x", Functions.kill_all_windows(), desc="Kill all windows except current in the workspace"), # Toggle between different layouts as defined below Key([self.mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), # Toggle bar Key([self.mod, "shift"], "t", lazy.hide_show_bar("top"), desc="Show and hide top bar"), # Basic Commands Key([self.mod], "q", lazy.window.kill(), desc="Kill focused window"), Key([self.mod], "Return", lazy.spawn(self.terminal), desc="Launch terminal"), Key([self.mod, "shift"], "r", lazy.restart(), desc="Restart qtile"), Key([self.mod, "shift"], "q", lazy.shutdown(), desc="Shutdown qtile"), # Key([self.mod], "r", lazy.spawn('rofi -modi system:/home/surajkarki/.config/rofi/scripts/powermenu.sh -show system -theme dmenu -icon-theme "Papirus-Dark" -show-icons'), # desc="Run Rofi"), Key([self.mod], "d", lazy.spawn('dmenu_run'), desc="Run dmenu"), Key([self.mod], "Escape", lazy.spawn("betterlockscreen -l"), desc="Lock the sreen"), # Applications hotkeys # Most apps are opened with Super + left self.alt keys Key([self.mod, self.alt], "e", lazy.spawn("emacs"), desc="Open Doom Emacs"), Key([self.mod, self.alt], "b", lazy.spawn("brave"), desc="Open Brave Browser"), Key([self.mod, self.alt], "v", lazy.spawn("codium"), desc="Open VS codium"), Key([self.mod, self.alt], "a", lazy.spawn("pavucontrol"), desc="Open Pulse audio GUI controller"), Key([self.mod, self.alt], "s", lazy.spawn("signal-desktop"), desc="Open Signal"), Key([self.mod, self.alt], "n", lazy.spawn("pcmanfm"), desc="Open PCManFM file browser"), Key([self.mod, self.alt], "i", lazy.spawn("insomnia"), desc="Open Insomnia"), Key([self.mod, self.alt], "r", lazy.spawn(self.terminal + " ranger"), desc="Open Ranger file manager"), Key([self.mod], "s", lazy.spawn("spotifymusic"), desc="Open Spotify"), Key([self.mod], "p", lazy.spawn("passmenu"), desc="Open passmenu"), # System Key([self.mod, self.control], "r", lazy.spawn("systemctl reboot"), desc="Reboot"), Key([self.mod, self.control], "s", lazy.spawn("systemctl poweroff"), desc="Shutdown"), Key([self.mod, self.control], "a", lazy.spawn("systemctl suspend"), desc="Suspend"), # Media hotkeys Key([self.mod], 'Up', lazy.spawn('pulseaudio-ctl up 5')), Key([self.mod], 'Down', lazy.spawn('pulseaudio-ctl down 5')), Key([], "XF86AudioPlay", lazy.spawn('playerctl play-pause')), Key([], "XF86AudioPause", lazy.spawn('playerctl play-pause')), # Screenshots Key([], "Print", lazy.spawn('xfce4-screenshooter')), Key([self.alt], "Print", lazy.spawn('xfce4-screenshooter -f -c')), Key([self.shift], "Print", lazy.spawncmd( "xfce4-screenshooter -f -s /home/daniel/Pictures/Screenshots/" )), # ------------ Hardware Configs ------------ # Volume 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")), # Brightness Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")), Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 10%-")), ]
Key(["control", "shift"], "space", lazy.spawn("dunstctl close-all"), desc="Dunst close all notification"), Key(["mod1", "shift"], "space", lazy.spawn("dunstctl context"), desc="Dunst show context menu"), Key([MODKEY], "space", lazy.window.toggle_floating(), desc="Toggle Floating for Focused Window"), Key([MODKEY], "f", lazy.window.toggle_fullscreen(), desc="Toggle Fullscreen"), Key([MODKEY], "b", lazy.hide_show_bar("top"), desc="Toggle Fullscreen"), # ScreenShot Key([MODKEY], "Print", lazy.spawn(f"bash -c '{os.path.join(SCRIPTS, 'screenshot.sh')}'"), desc="Screenshot"), Key([MODKEY, "control"], "Print", lazy.spawn(f"bash -c '{os.path.join(SCRIPTS, 'screenshot.sh')} -i'"), desc="Screenshot"), Key([MODKEY, "shift"], "Print", lazy.spawn(f"bash -c '{os.path.join(SCRIPTS, 'screenshot.sh')} -w'"), desc="Screenshot"), # Brightness Key([], "XF86MonBrightnessUp",
Key([MOD, SHIFT], "h", lazy.layout.shuffle_left()), Key([MOD, SHIFT], "j", lazy.layout.shuffle_down()), Key([MOD, SHIFT], "k", lazy.layout.shuffle_up()), 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" )),
# Toggle between split and unsplit sides of stack. Key([mod], "m", lazy.window.toggle_maximize(), desc="Toggle maximize focused window"), Key([mod, "control"], "Tab", lazy.next_layout(), desc="Cycle between layouts"), # Key([mod, "shift"], "Return", # lazy.layout.toggle_split(), # desc="Toggle between split and unsplit sides of stack"), # Miscellaneous Key([mod], "period", lazy.hide_show_bar(), desc="Toggle bar"), 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"), ] groups = [Group(i) for i in "123456789"] for i in groups: keys.extend([ # mod1 + letter of group = switch to group Key([mod], i.name, lazy.group[i.name].toscreen(), desc="Switch to group {}".format(i.name)), # mod1 + shift + letter of group = switch to & move focused window to group
Key([mod], 'j', lazy.layout.up()), # Keybinds for basic desktop management Key([mod], 'c', lazy.window.kill()), Key([mod], 'x', lazy.spawn('flameshot gui')), Key([mod], 'z', lazy.spawn('copyq toggle')), Key([mod], 'Tab', lazy.next_layout()), Key([mod, 'control'], 'r', lazy.restart()), Key([mod, 'control'], 'q', lazy.shutdown()), Key([mod, 'shift'], 'j', lazy.layout.shuffle_up()), Key([mod, 'shift'], 'k', lazy.layout.shuffle_down()), Key([mod], 'h', lazy.layout.grow()), Key([mod], 'l', lazy.layout.shrink()), Key([mod, 'shift'], 'q', lazy.shutdown()), Key([mod], 'space', lazy.widget['keyboardlayout'].next_keyboard()), Key([mod, 'shift'], 'b', lazy.hide_show_bar('all')), # Keybinds for opening programs Key([mod], 'Return', lazy.spawn('alacritty')), Key([mod], 'b', lazy.spawn('chromium')), # swap to the correct browser Key([mod], 'r', lazy.spawn('rofi -show run')), Key([mod], 's', lazy.spawn('spotify')), # Switch between groups Key([mod], '1', lazy.group['1'].toscreen()), Key([mod, 'shift'], '1', lazy.window.togroup('1')), Key([mod], '2', lazy.group['2'].toscreen()), Key([mod, 'shift'], '2', lazy.window.togroup('2')), Key([mod], '3', lazy.group['3'].toscreen()), Key([mod, 'shift'], '3', lazy.window.togroup('3')), Key([mod], '4', lazy.group['4'].toscreen()),
"alacritty -e /home/david/.config/qtile/ranger-startup-fix.sh"), desc="Launch Ranger"), Key([mod, "control"], "l", lazy.spawn("/home/david/.config/qtile/lock-and-suspend.sh"), desc="sleep and suspend"), Key([], "Print", lazy.spawn("flameshot gui"), desc="take a screenshot"), # Toggle between different layouts as defined below Key([mod], "space", 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"), # toggle the status bar Key([mod], "b", lazy.hide_show_bar(), desc="toggle the status bar"), Key([mod, "shift"], "f", lazy.window.toggle_fullscreen(), desc="turn off the bar and go full screen mode"), ] groups = [Group(i) for i in "123456789"] for i in groups: keys.extend([ # mod1 + letter of group = switch to group Key([mod], i.name, lazy.group[i.name].toscreen(), desc="Switch to group {}".format(i.name)),
ctrl = "control" alt = "mod1" keys = [] dm = os.path.expanduser(dmscripts) keys.extend([ Key([mod, ctrl], "r", lazy.restart(), desc="Restart qTile"), Key([mod, ctrl], "q", lazy.shutdown(), desc="Quit qTile"), # # Debugging # Key( [mod, ctrl], "d", lazy.hide_show_bar("all"), desc="Debugging hotkey", ), # # Swith Keyboard Layouts # # Key( # [alt], # "Shift_L", # lazy.widget["keyboardlayout"].next_keyboard(), # desc="Next keyboard layout" # ), Key( [shift], "Alt_L", lazy.widget["keyboardlayout"].next_keyboard(),
Key([mod, "mod1"], "period", lazy.next_screen(), desc="Go to next screen"), Key([mod, "shift", "mod1"], "comma", window_to_offset_screen(-1), desc="Move window and to prev screen"), Key([mod, "shift", "mod1"], "period", window_to_offset_screen(1), desc="Move window and to next screen"), Key([mod, "control", "shift", "mod1"], "comma", window_to_offset_screen(-1, False), desc="Move window to prev screen"), Key([mod, "control", "shift", "mod1"], "period", window_to_offset_screen(1, False), desc="Move window to next screen"), Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window left"), Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window 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], "l", lazy.layout.grow_main(), desc="Grow window"), Key([mod], "h", lazy.layout.shrink_main(), desc="Shrink window"), Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"), Key([mod, "shift"], "space", lazy.hide_show_bar("top"), desc="Toggle bar"), Key([mod], "f", lazy.window.toggle_floating(), desc="Toggle floating"), Key([mod, "shift"], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"), Key([], "F11", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"), Key([mod, "shift"], "Up", lazy.spawn("xrandr --output eDP1 --rotate normal"), desc="Rotate screen normal"), Key([mod, "shift"], "Down", lazy.spawn("xrandr --output eDP1 --rotate inverted"), desc="Rotate screen normal"), Key([mod, "shift"], "Left", lazy.spawn("xrandr --output eDP1 --rotate left"), desc="Rotate screen normal"), Key([mod, "shift"], "Right", lazy.spawn("xrandr --output eDP1 --rotate right"), desc="Rotate screen normal"), # Media keys Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")), Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")), Key([], "XF86AudioNext", lazy.spawn("playerctl next")), Key([], "XF86MonBrightnessUp", lazy.spawn(f"bash -c 'xbacklight -inc 5% && {show_brightness_cmd}'")), Key([], "XF86MonBrightnessDown", lazy.spawn(f"bash -c 'xbacklight -dec 5% && {show_brightness_cmd}'")),
EzKey("M-<period>", lazy.next_screen()), EzKey("M-<comma>", lazy.prev_screen()), EzKey("M-S-<period>", window_to_next_screen()), EzKey("M-S-<comma>", window_to_previous_screen()), EzKey("M-C-<Right>", focus_next_group()), EzKey("M-C-<Left>", focus_previous_group()), # Various window controls EzKey("M-S-c", lazy.window.kill()), EzKey("M-C-c", lazy.window.center()), EzKey("M-S-<space>", lazy.layout.reset()), EzKey("M-f", lazy.window.toggle_fullscreen()), EzKey("M-S-f", lazy.window.toggle_floating()), EzKey("M-<space>", lazy.layout.flip()), EzKey("M-<Tab>", lazy.spawn(SWITCHER)), EzKey("M-S-<Tab>", float_to_front()), EzKey("M-b", lazy.hide_show_bar()), EzKey("M-u", clear_urgent("keybind")), EzKey("M-i", toggle_widget_info()), # Layout toggles EzKey("M-m", toggle_layout(layout_names["max"])), EzKey("M-t", toggle_layout(layout_names["treetab"])), # Notification commands EzKey("M-S-b", notification("battery")), EzKey("M-S-d", notification("date")), EzKey("M-S-w", notification("wifi")), # Some app shortcuts EzKey("M-w", spawn_or_focus(BROWSER)), EzKey("M-<Return>", lazy.spawn(TERMINAL)), EzKey("M-C-<Return>", lazy.spawn(FILE_MANAGER)), EzKey("M-c", spawn_or_focus("signal-desktop")), EzKey("M-r", lazy.spawn(LAUNCHER)),
# 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], "m", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"), Key([mod], "b", lazy.hide_show_bar("bottom"), desc="Toggle fullscreen"), 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 "asdfuiop"] for i in groups: keys.extend([ # mod1 + letter of group = switch to group Key([mod], i.name, lazy.group[i.name].toscreen(), desc="Switch to group {}".format(i.name)),