def init_keys(): keys = [ Key([mod], "Left", lazy.screen.prevgroup()), Key([mod], "Right", lazy.screen.nextgroup()), Key([mod, "shift"], "Left", window_to_prev_group), Key([mod, "shift"], "Right", window_to_next_group), Key([mod], "Tab", lazy.group.next_window()), Key([mod, "shift"], "Tab", lazy.group.prev_window()), Key([mod], "space", lazy.nextlayout()), Key([mod, "shift"], "space", lazy.prevlayout()), Key([mod], "j", lazy.layout.up()), Key([mod], "k", lazy.layout.down()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "r", lazy.spawncmd()), Key([mod], "Return", lazy.spawn(term)), Key([mod], "l", lazy.spawn(lock)), Key([mod, "shift"], "c", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()) ] if DEBUG: keys += [ Key(["mod1"], "Tab", lazy.layout.next()), Key(["mod1", "shift"], "Tab", lazy.layout.previous()) ] return keys
def init_keys(): keys = [ Key([mod], "Left", lazy.screen.prevgroup()), Key([mod], "Right", lazy.screen.nextgroup()), Key([mod, "shift"], "Left", window_to_prev_group), Key([mod, "shift"], "Right", window_to_next_group), Key([mod], "Tab", lazy.group.next_window()), Key([mod, "shift"], "Tab", lazy.group.prev_window()), Key([mod], "space", lazy.nextlayout()), Key([mod, "shift"], "space", lazy.prevlayout()), Key([mod], "j", lazy.layout.up()), Key([mod], "k", lazy.layout.down()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "r", lazy.spawncmd()), Key([mod], "Return", lazy.spawn(term)), Key([mod], "l", lazy.spawn(lock)), Key([mod, "shift"], "c", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()), # My Own Shortcuts! Key([alt, "shift"], "e", lazy.spawn("nautilus")), Key([alt, "shift"], "w", lazy.spawn("firefox")), Key([alt, "shift"], "f", lazy.spawn("firefox")), Key([alt, "shift"], "s", lazy.spawn("subl")), Key([alt, "shift"], "l", lazy.spawn("wakeonlan 00:15:17:30:24:08")), Key([alt, "shift"], "t", lazy.spawn("terminology")) ] if DEBUG: keys += [ Key(["mod1"], "Tab", lazy.layout.next()), Key(["mod1", "shift"], "Tab", lazy.layout.previous()) ] return keys
def init_keys(): keys = [Key([mod], "Left", lazy.screen.prevgroup()), Key([mod], "Right", lazy.screen.nextgroup()), Key([mod, "shift"], "Left", window_to_prev_group), Key([mod, "shift"], "Right", window_to_next_group), Key([mod], "Tab", lazy.group.next_window()), Key([mod, "shift"], "Tab", lazy.group.prev_window()), Key([mod], "space", lazy.nextlayout()), Key([mod, "shift"], "space", lazy.prevlayout()), Key([mod], "j", lazy.layout.up()), Key([mod], "k", lazy.layout.down()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "r", lazy.spawncmd()), Key([mod], "Return", lazy.spawn(term)), Key([mod], "l", lazy.spawn(lock)), Key([mod, "shift"], "c", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown())] if DEBUG: keys += [Key(["mod1"], "Tab", lazy.layout.next()), Key(["mod1", "shift"], "Tab", lazy.layout.previous())] return keys
def init_keys(): keys = [ Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)), Key([mod], "Right", lazy.screen.next_group(skip_managed=True)), Key([mod, "shift"], "Left", window_to_previous_column_or_group()), Key([mod, "shift"], "Right", window_to_next_column_or_group()), Key([mod, "control"], "Up", lazy.layout.grow_up()), Key([mod, "control"], "Down", lazy.layout.grow_down()), Key([mod, "control"], "Left", lazy.layout.grow_left()), Key([mod, "control"], "Right", lazy.layout.grow_right()), Key([mod, "mod1"], "Left", lazy.previous_screen()), Key([mod, "mod1"], "Right", lazy.next_screen()), Key([mod, "shift", "mod1"], "Left", window_to_previous_screen()), Key([mod, "shift", "mod1"], "Right", window_to_next_screen()), Key([mod], "t", switch_screens()), Key([mod], "Up", lazy.group.prev_window()), Key([mod], "Down", lazy.group.next_window()), Key([mod, "shift"], "Up", lazy.layout.shuffle_up()), Key([mod, "shift"], "Down", lazy.layout.shuffle_down()), Key([mod], "space", lazy.next_layout()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "r", lazy.spawncmd()), Key([mod], "u", lazy.spawn(browser)), Key([mod], "Return", lazy.spawn(terminal)), Key([mod], "BackSpace", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()), Key([], "Print", lazy.spawn("gnome-screenshot -i")), Key([], "Scroll_Lock", lazy.spawn(screenlocker)), Key([mod], "Delete", lazy.spawn("amixer set Master toggle")), Key([mod], "Prior", lazy.spawn("amixer set Master 5+")), Key([mod], "Next", lazy.spawn("amixer set Master 5-")), Key([mod], "Insert", lazy.spawn(HOME + ".local/bin/spotify-dbus playpause")), Key([mod], "End", lazy.spawn(HOME + ".local/bin/spotify-dbus next")), Key([mod], "Home", lazy.spawn(HOME + ".local/bin/spotify-dbus previous")), ] if DEBUG: keys += [ Key([mod], "Tab", lazy.layout.next()), Key([mod, "shift"], "Tab", lazy.layout.previous()), Key([mod], "f", lazy.layout.flip()), Key([mod], "s", lazy.group["scratch"].dropdown_toggle("term")) ] return keys
def init_keys(self): """ Initialize key bindings """ def move_window_to_screen(screen_num): """ Move the selected window to a different screen """ def inner(qtile): if qtile.currentWindow is not None: qtile.currentWindow.togroup(qtile.screens[ self.screen_layout[screen_num]].group.name) return inner return [ Key('M-j', lazy.layout.down()), Key('M-k', lazy.layout.up()), Key('M-h', lazy.layout.left()), Key('M-l', lazy.layout.right()), Key('M-S-j', lazy.layout.shuffle_down()), Key('M-S-k', lazy.layout.shuffle_up()), Key('M-S-h', lazy.layout.swap_left()), Key('M-S-l', lazy.layout.swap_right()), Key('A-<Tab>', lazy.next_layout()), Key('M-q', lazy.window.kill()), Key( 'A-S-r', lazy.spawn( "termite --name ranger -e '/usr/bin/tmux new -A -s ranger ranger'" )), Key('M-v', projectm_toggle), Key('M-e', lazy.spawn("termite")), Key('M-S-r', lazy.restart()), Key('M-b', lazy.hide_show_bar("all")), Key('M-S-q', lazy.shutdown()), Key('M-r', dm_run), Key('M-a', decrease_master_volume), Key('M-f', increase_master_volume), Key('M-s', decrease_mpd_volume), Key('M-d', increase_mpd_volume), Key('M-x', mpd_prev_song), Key('M-c', mpd_next_song), Key('M-<space>', mpd_toggle_play), ] + [ Key('M-%s' % str(index + 1), lazy.to_screen(screen)) for index, screen in enumerate(self.screen_layout) ] + [ Key('M-S-%s' % str(i + 1), lazy.function(move_window_to_screen(i))) for i in self.screen_layout ]
def init_keys(mod): keys = [ # Switch between windows in current stack pane Key([mod], "k", lazy.layout.down()), Key([mod], "j", lazy.layout.up()), # Move windows up or down in current stack Key([mod, "control"], "k", lazy.layout.shuffle_down()), Key([mod, "control"], "j", lazy.layout.shuffle_up()), # Move windows to other stack Key([mod, "shift"], "j", lazy.layout.client_to_next()), # Switch window focus to other pane(s) of stack Key(["mod1"], "Tab", lazy.layout.next()), # Swap panes of split stack Key(["mod5"], "Tab", lazy.screen.next()), # 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")), # 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()), # Monitor orientation Key([mod], "v", lazy.function(screenlayout, 'vertical')), Key([mod], "h", lazy.function(screenlayout, 'horizontal')), # Keyboard layouts Key([mod], "s", lazy.function(kbd_layout, "es", option=" ")), Key([mod], "e", lazy.function(kbd_layout, "us", "altgr-intl", "compose:menu,ctrl:nocaps")), # Lock screen Key([mod], "l", lazy.spawn("xscreensaver-command -lock")), # DropDown Key([], 'F11', lazy.group['scratchpad'].dropdown_toggle('term')), Key([], 'F12', lazy.group['scratchpad'].dropdown_toggle('org')), ] return keys
def init_keys(config): # Key bindings mod = config['mod'] keys = [ # WM control Key([mod, 'control'], 'r', lazy.restart()), Key([mod, 'control'], 'q', lazy.shutdown()), Key([mod], 'r', lazy.spawncmd()), Key([mod, 'shift'], 'c', lazy.window.kill()), # Applications Key([mod], 'Return', lazy.spawn(config['terminal'])), Key([mod], 'r', lazy.spawn(config['launcher'])), Key([mod], 'f', lazy.spawn(config['file_manager'])), Key([mod, 'shift'], 'l', lazy.spawn(config['lock'])), # Scratchpad Key([mod], 'g', lazy.group['scratchpad'].dropdown_toggle("terminal")), Key([mod], 'q', lazy.group['scratchpad'].dropdown_toggle("qshell")), Key([mod], 'Left', lazy.screen.prev_group()), Key([mod], 'Right', lazy.screen.next_group()), # Layout control Key([mod, 'control'], 'space', lazy.window.toggle_floating()), Key([mod], 'k', lazy.layout.up()), Key([mod], 'j', lazy.layout.down()), Key([mod, 'shift'], 'k', lazy.layout.shuffle_up()), Key([mod, 'shift'], 'j', lazy.layout.shuffle_down()), Key([mod, 'shift'], 'space', lazy.layout.flip()), Key([mod], 'space', lazy.next_layout()), Key([mod], 'n', lazy.layout.normalize()), Key([mod], 'm', lazy.layout.maximize()), Key([mod], 'l', lazy.layout.grow()), Key([mod], 'h', lazy.layout.shrink()), # Screen control Key([mod, 'control'], 'j', lazy.next_screen()), Key([mod, 'control'], 'k', lazy.prev_screen()), ] for i in range(1, 10): # mod + letter of group keys.append(Key([mod], str(i), lazy.group[str(i)].toscreen())) # mod + shift + leter of group = move window to group #keys.append(Key([mod, 'shift'], i.name, lazy.window.togroup(i.name))) keys.append(Key([mod, 'shift'], str(i), lazy.window.togroup(str(i)))) return keys
def init_keys(): keys = [ Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)), Key([mod], "Right", lazy.screen.next_group(skip_managed=True)), Key([mod, "shift"], "Left", window_to_prev_group()), Key([mod, "shift"], "Right", window_to_next_group()), Key([mod, "mod1"], "Left", lazy.prev_screen()), Key([mod, "mod1"], "Right", lazy.next_screen()), Key([mod, "shift", "mod1"], "Left", window_to_prev_screen()), Key([mod, "shift", "mod1"], "Right", window_to_next_screen()), Key([mod], "t", switch_screens()), Key([mod], "Up", lazy.group.next_window()), Key([mod], "Down", lazy.group.prev_window()), Key([mod], "space", lazy.next_layout()), Key([mod], "j", lazy.layout.up()), Key([mod], "k", lazy.layout.down()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "r", lazy.spawncmd()), Key([mod], "u", lazy.spawn(browser)), Key([mod], "Return", lazy.spawn(terminal)), Key([mod], "BackSpace", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()), Key([], "Print", lazy.spawn("scrot")), Key([], "Scroll_Lock", lazy.spawn(HOME + ".local/bin/i3lock -d")), Key([mod], "Delete", lazy.spawn("amixer set Master toggle")), Key([mod], "Prior", lazy.spawn("amixer set Master 5+")), Key([mod], "Next", lazy.spawn("amixer set Master 5-")), Key([mod], "Insert", lazy.spawn(HOME + ".local/bin/spotify-dbus playpause")), Key([mod], "End", lazy.spawn(HOME + ".local/bin/spotify-dbus next")), Key([mod], "Home", lazy.spawn(HOME + ".local/bin/spotify-dbus previous")), ] if DEBUG: keys += [Key(["mod1"], "Tab", lazy.layout.next()), Key(["mod1", "shift"], "Tab", lazy.layout.previous())] return keys
def init_keys(): keys = [ Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)), Key([mod], "Right", lazy.screen.next_group(skip_managed=True)), Key([mod, "shift"], "Left", window_to_previous_column_or_group()), Key([mod, "shift"], "Right", window_to_next_column_or_group()), Key([mod, "control"], "Up", lazy.layout.grow_up()), Key([mod, "control"], "Down", lazy.layout.grow_down()), Key([mod, "control"], "Left", lazy.layout.grow_left()), Key([mod, "control"], "Right", lazy.layout.grow_right()), Key([mod, "mod1"], "Left", lazy.prev_screen()), Key([mod, "mod1"], "Right", lazy.next_screen()), Key([mod, "shift", "mod1"], "Left", window_to_previous_screen()), Key([mod, "shift", "mod1"], "Right", window_to_next_screen()), Key([mod], "t", switch_screens()), Key([mod], "Up", lazy.group.prev_window()), Key([mod], "Down", lazy.group.next_window()), Key([mod, "shift"], "Up", lazy.layout.shuffle_up()), Key([mod, "shift"], "Down", lazy.layout.shuffle_down()), Key([mod], "space", lazy.next_layout()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "s", lazy.layout.toggle_split()), Key([mod], "r", lazy.spawncmd()), Key([mod], "u", lazy.spawn(browser)), Key([mod], "Return", lazy.spawn(terminal)), Key([mod], "BackSpace", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()), Key([], "Print", lazy.spawn("gnome-screenshot -i")), Key([mod], "Print", lazy.spawn("gnome-screenshot -p")), Key([], "Scroll_Lock", lazy.spawn(screenlocker)), Key([mod], "Delete", lazy.spawn("amixer set Master toggle")), Key([mod], "Prior", lazy.spawn("amixer set Master 5+")), Key([mod], "Next", lazy.spawn("amixer set Master 5-")), Key([mod], "Insert", lazy.spawn("spotify-dbus playpause")), Key([mod], "End", lazy.spawn("spotify-dbus next")), Key([mod], "Home", lazy.spawn("spotify-dbus previous")), ] if DEBUG: keys += [ Key([mod], "Tab", lazy.layout.next()), Key([mod, "shift"], "Tab", lazy.layout.previous()), Key([mod, "shift"], "f", lazy.layout.flip()), Key([mod, "shift"], "s", lazy.group["scratch"].dropdown_toggle("term")) ] return keys
def get_keyboard_hotkey(mod): return [ Key([mod], "k", lazy.layout.down()), Key([mod], "j", lazy.layout.up()), Key([mod, "shift"], "k", lazy.layout.shuffle_down()), Key([mod, "shift"], "j", lazy.layout.shuffle_up()), Key([mod], "l", lazy.layout.grow()), Key([mod], "h", lazy.layout.shrink()), Key([mod], "n", lazy.layout.normalize()), Key([mod], "o", lazy.layout.maximize()), Key([mod], "space", lazy.nextlayout()), Key([mod], "r", lazy.function(lambda qtile: DMenu().run(True))), Key([mod, "shift"], "r", lazy.function(lambda qtile: DMenu().run(False))), Key([mod, "control"], "r", lazy.spawncmd()), Key([mod], "equal", lazy.function(inc_volume)), Key([mod], "minus", lazy.function(dec_volume)), Key([mod], "Return", lazy.spawn("urxvt")), Key([mod], "e", lazy.spawn("emacs")), Key([mod, "shift"], "q", lazy.window.kill()), Key([mod, "shift", "control"], "r", lazy.restart()), Key([mod, "shift", "control"], "q", lazy.shutdown()), Key([mod, "shift"], "d", lazy.hide_show_bar()), ]
def init_keys(): keys = [ # Switch between windows in current stack pane Key([mod], "j", lazy.layout.down()), Key([mod], "k", lazy.layout.up()), # Move windows in current stack Key([mod, "shift"], "j", lazy.layout.shuffle_down()), Key([mod, "shift"], "k", lazy.layout.shuffle_up()), # Switch through the different layouts Key([mod, "control"], "j", lazy.next_layout()), Key([mod, "control"], "k", lazy.prev_layout()), # Maximize / minimize current window Key([mod], "m", lazy.window.toggle_maximize()), # Normalize all windows by restoring the default size ratios Key([mod], "n", lazy.layout.normalize()), # Toggle floating Key([mod, "shift"], "t", lazy.window.toggle_floating()), Key([mod, "shift"], "s", show_shortcuts), # Move current window between different groups Key([mod, "shift"], "h", window_to_previous_group()), Key([mod, "shift"], "l", window_to_next_group()), # Grow size of current window (XmonadTall) Key([mod, "control"], "h", lazy.layout.shrink(), lazy.layout.decrease_nmaster()), # Shrink size of current window (XmonadTall) Key([mod, "control"], "l", lazy.layout.grow(), lazy.layout.increase_nmaster()), # Start the configured terminal Key([mod], "Return", lazy.spawn(myterm)), # Kill active window Key([mod], "w", lazy.window.kill()), # Restart qtile / reload configuration Key([mod, "control"], "r", lazy.restart()), # Quit qtile Key([mod, "control"], "q", lazy.shutdown()), # Run a command; will open an input-field Key([mod], "r", lazy.spawncmd()), ] return keys
def init_keys(): return [ # Switch between windows in current stack pane # EzKey("-b", lazy.layout.down()), # EzKey("C-f", lazy.layout.up()), EzKey("M-b", lazy.layout.shuffle_down()), EzKey("M-f", lazy.layout.shuffle_up()), EzKey("M-<space>", lazy.layout.next()), EzKey("M-S-f", float_to_front), # Swap panes of split stack # EzKey("M-S-<space>", lazy.layout.rotate()), # Toggle between split and unsplit sides of stack. # EzKey("M-S-<Return>", lazy.layout.toggle_split()), EzKey("M-<Tab>", lazy.next_layout()), EzKey("M-C-r", lazy.restart()), EzKey("M-C-q", lazy.shutdown()), EzKey("M-w", lazy.window.kill()), EzKey("M-m", lazy.window.toggle_maximize()), # Sound EzKey("<XF86AudioMute>", lazy.spawn("pamixer -t")), EzKey("<XF86AudioLowerVolume>", lazy.spawn("pamixer -d 1 -u")), EzKey("<XF86AudioRaiseVolume>", lazy.spawn("pamixer -i 1 -u")), # Media EzKey("<XF86AudioPrev>", lazy.spawn("playerctl previous")), EzKey("<XF86AudioPlay>", lazy.spawn("playerctl play-pause")), EzKey("<XF86AudioStop>", lazy.spawn("playerctl stop")), EzKey("<XF86AudioNext>", lazy.spawn("playerctl next")), # Applications EzKey("M-r", lazy.spawn("rofi -show drun")), EzKey("M-S-w", lazy.spawn("rofi -show window")), EzKey("M-<Return>", lazy.spawn(my_term)), EzKey("M-C-d", lazy.spawn("pcmanfm")), EzKey("M-e", lazy.spawn("emacsclient -nc")), EzKey("M-C-i", lazy.spawn("firefox")), EzKey("M-S-h", lazy.spawn(my_term + " -e bpytop")), # EzKey("M-C-n", lazy.spawn("notion-app")), EzKey("M-C-m", lazy.spawn("youtubemusic-nativefier")), # Screenshot EzKey( "M-<Print>", lazy.spawn("flameshot full -p /home/ayush/Pictures/Screenshots")), ]
def set_keys(self): self._add_key('j', lazy.layout.up()) self._add_key('k', lazy.layout.down()) self._add_key('Tab', lazy.layout.next()) self._add_key('space', lazy.layout.rotate(), extra_mod='shift') self._add_key('space', lazy.next_layout()) self._add_key('f', lazy.window.toggle_floating()) self._add_key('Right', lazy.screen.next_group()) self._add_key('Left', lazy.screen.prev_group()) self._add_key('w', lazy.window.kill()) self._add_key('Return', lazy.spawn(self.term)) self._add_key('l', lazy.spawn('xscreensaver-command --lock')) self._add_key( 'Print', lazy.spawn("scrot -e 'mv $f ~/pictures/ 2>/dev/null'"), no_mod=True ) self._add_key('r', lazy.spawncmd()) self._add_key('r', lazy.restart(), extra_mod='control') self._add_key('q', lazy.shutdown(), extra_mod='control') return self.keys
def init_keys(): keys = [ Key([mod], "Left", lazy.screen.prev_group(skip_managed=True)), Key([mod], "Right", lazy.screen.next_group(skip_managed=True)), Key([mod, "shift"], "Left", window_to_prev_group()), Key([mod, "shift"], "Right", window_to_next_group()), Key([mod, "mod1"], "Left", lazy.prev_screen()), Key([mod, "mod1"], "Right", lazy.next_screen()), Key([mod, "shift", "mod1"], "Left", window_to_prev_screen()), Key([mod, "shift", "mod1"], "Right", window_to_next_screen()), Key([mod], "t", switch_screens()), Key([mod], "Up", lazy.group.next_window()), Key([mod], "Down", lazy.group.prev_window()), Key([mod], "space", lazy.next_layout()), Key([mod], "j", lazy.layout.up()), Key([mod], "k", lazy.layout.down()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "r", lazy.spawncmd()), Key([mod], "u", lazy.spawn(browser)), Key([mod], "Return", lazy.spawn(terminal)), Key([mod], "BackSpace", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()), Key([], "Print", lazy.spawn("scrot")), Key([], "Scroll_Lock", lazy.spawn(HOME + ".local/bin/i3lock -d")), Key([mod], "Delete", lazy.spawn("amixer set Master toggle")), Key([mod], "Prior", lazy.spawn("amixer set Master 5+")), Key([mod], "Next", lazy.spawn("amixer set Master 5-")), Key([mod], "Insert", lazy.spawn(HOME + ".local/bin/spotify-dbus playpause")), Key([mod], "End", lazy.spawn(HOME + ".local/bin/spotify-dbus next")), Key([mod], "Home", lazy.spawn(HOME + ".local/bin/spotify-dbus previous")), ] if DEBUG: keys += [ Key(["mod1"], "Tab", lazy.layout.next()), Key(["mod1", "shift"], "Tab", lazy.layout.previous()) ] return keys
def init_keys(): keys = [ # I only use bsp Key([mod], "h", lazy.layout.left()), Key([mod], "j", lazy.layout.down()), Key([mod], "k", lazy.layout.up()), Key([mod], "l", lazy.layout.right()), 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, "mod1"], "h", lazy.layout.flip_left()), Key([mod, "mod1"], "j", lazy.layout.flip_down()), Key([mod, "mod1"], "k", lazy.layout.flip_up()), Key([mod, "mod1"], "l", lazy.layout.flip_right()), Key([mod, "control"], "h", lazy.layout.grow_left()), Key([mod, "control"], "j", lazy.layout.grow_down()), Key([mod, "control"], "k", lazy.layout.grow_up()), Key([mod, "control"], "l", lazy.layout.grow_right()), Key([mod, "shift"], "n", lazy.layout.normalize()), # utility commands Key([mod], "w", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -c 0 -q set Master 2dB+")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -c 0 -q set Master 2dB-")), Key([], "XF86AudioMute", lazy.spawn("amixer -c 0 -q set Master toggle")), # spawn commands Key([mod], "r", lazy.spawncmd()), Key([mod], "Return", lazy.spawn("st")), Key([mod], "b", lazy.spawn("brave")), ] return keys
def init_keys(): keys = [Key([mod], "Left", lazy.screen.prevgroup()), Key([mod], "Right", lazy.screen.nextgroup()), Key([mod, "shift"], "Left", window_to_prev_group), Key([mod, "shift"], "Right", window_to_next_group), Key([mod], "Tab", lazy.group.next_window()), Key([mod, "shift"], "Tab", lazy.group.prev_window()), Key([mod], "space", lazy.nextlayout()), Key([mod, "shift"], "space", lazy.prevlayout()), Key([mod], "j", lazy.layout.up()), Key([mod], "k", lazy.layout.down()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "r", lazy.spawncmd()), Key([mod], "Return", lazy.spawn(term)), Key([mod], "l", lazy.spawn(lock)), Key([mod, "shift"], "c", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "q", lazy.shutdown()), # My Own Shortcuts! Key([alt, "shift"], "e", lazy.spawn("nautilus")), Key([alt, "shift"], "w", lazy.spawn("firefox")), Key([alt, "shift"], "f", lazy.spawn("firefox")), Key([alt, "shift"], "s", lazy.spawn("subl")), Key([alt, "shift"], "l", lazy.spawn("wakeonlan 00:15:17:30:24:08")), Key([alt, "shift"], "t", lazy.spawn("terminology"))] if DEBUG: keys += [Key(["mod1"], "Tab", lazy.layout.next()), Key(["mod1", "shift"], "Tab", lazy.layout.previous())] return keys
def init_keys(): keys = [ # Switch between windows in current stack pane Key([mod], "e", lazy.layout.down()), Key([mod], "u", lazy.layout.up()), Key([mod], "n", lazy.layout.left()), Key([mod], "i", lazy.layout.right()), # Move windows up or down in current stack Key([mod, "shift"], "u", lazy.layout.shuffle_up()), Key([mod, "shift"], "e", lazy.layout.shuffle_down()), Key([mod, "shift"], "n", lazy.layout.swap_left()), Key([mod, "shift"], "i", lazy.layout.swap_right()), Key([mod], "o", lazy.layout.swap_main()), # Grow and shink the windows Key([mod, "mod1"], "u", lazy.layout.grow()), Key([mod, "mod1"], "e", lazy.layout.shrink()), Key([mod, "shift"], "Return", lazy.window.toggle_floating()), # Toggle floating # Switch window focus to other pane(s) of stack Key([mod], "p", lazy.to_screen(0)), # Keyboard focus screen(1) Key([mod], "f", lazy.to_screen(1)), # Keyboard focus screen(2) Key([mod], "space", lazy.layout.next()), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate()), # multiple stack panes Key([mod, "shift"], "Return", lazy.layout.toggle_split()), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout()), Key([mod], "q", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "t", lazy.screen.toggle_group()), Key([mod, "mod1"], "t", lazy.screen.toscreen(1)), # Key([mod], "r", lazy.spawncmd()), ] return keys
# multiple stack panes Key([mod, shift], "Return", lazy.layout.toggle_split()), Key([mod], "Return", lazy.spawn(terminal)), # Window Key([mod], "n", lazy.window.toggle_minimize()), Key([mod], "m", lazy.window.toggle_maximize()), # Language Key([mod], "space", NextKeyboardLayout), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout()), Key([mod], "q", lazy.window.kill()), Key([mod, control], "r", lazy.restart()), Key([mod, control], "q", lazy.shutdown()), Key([mod], "r", lazy.spawncmd()), # Sys Programs Key([mod, shift], "f", lazy.spawn(Commands.rofi)), # Programs Key([mod], "w", lazy.spawn(browser)), Key([mod], "e", lazy.spawn(filemgr)), Key([alt, control], "c", lazy.spawn(editor_gui)), Key([mod], "t", lazy.spawn(terminal)), # Brightness Key([], "XF86MonBrightnessUp", lazy.spawn(Commands.brightness_up)), Key([], "XF86MonBrightnessDown", lazy.spawn(Commands.brightness_down)),
[mod, "shift"], "Return", lazy.layout.toggle_split() ), Key([mod, "control"], "t", lazy.spawn("xfce4-terminal")), Key([mod, "control"], "f", lazy.spawn("thunar")), # Toggle between different layouts as defined below9 Key([mod], "space", lazy.next_layout()), Key([mod], "q", lazy.window.function(smart_kill)), # Toggle different keyboard layouts Key([mod], "Caps_Lock", lazy.widget['keyboardlayout'].next_keyboard()), Key([mod, "mod4"], "r", lazy.restart()), Key([mod, "mod4"], "q", lazy.shutdown()), Key([mod, "mod4"], "p", lazy.spawn("maim")), Key([mod], "r", lazy.spawncmd()), ] groups = [Group("a", layouts=[layout.Max(), layout.MonadTall(border_width=1, ratio=0.65)], matches=[Match(wm_instance_class=["chromium"])]), Group("s", layouts=[layout.MonadTall(border_width=1, ratio=0.65), layout.Max()], matches=[Match(wm_class=["jetbrains-pycharm-ce", "jetbrains-idea-ce", "dota2"])]), Group("d", layouts=[layout.MonadTall(border_width=1, ratio=0.5), layout.Matrix(border_focus='#ff0000')], matches=[Match(wm_class=["Skype", "Steam", "discord"])]), Group("f", layouts=[layout.Stack(num_stacks=2, border_focus='#ff0000')], matches=[Match(wm_class=["Clementine", "Deluge"])]), Group("z", matches=[Match(wm_class=["exe.Wine"])]), Group("x", matches=[Match(wm_class=[""])]), Group("c", layouts=[layout.Floating()], matches=[Match(wm_class=["FTL"])]), Group("v", matches=[Match(role=["playall"])]), ] for i in groups:
lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), # Launch a terminal window Key([mod], "Return", lazy.spawn(term), desc="Launch terminal (kitty)"), # Launch a browser Key([mod], "b", lazy.spawn(browser), desc="Launch browser (firefox)"), # 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"), # System binds 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"), # Toggle modes other than tiling mode Key([mod], "m", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen mode"), Key([mod], "z", lazy.window.toggle_floating(), desc="Toggle floating mode"), ] groups = [Group(i) for i in "asdfuiop"]
charge_char='↑', discharge_char='↓', foreground=BRIGHT_BLUE, ), widget.Spacer(width=4), widget.TextBox('Vol:'), widget.Spacer(width=1), widget.Volume(foreground=BRIGHT_BLUE), widget.Spacer(width=5), ], size=17, **bar_defaults) ), ] keys = [ Key([ALT_KEY, CONTROL_KEY, MOD_KEY, SHIFT_KEY], 'q', lazy.shutdown()), Key([ALT_KEY, CONTROL_KEY, MOD_KEY, SHIFT_KEY], 'r', lazy.restart()), Key([MOD_KEY], 'k', lazy.layout.up()), Key([MOD_KEY], 'j', lazy.layout.down()), Key([MOD_KEY], 'h', lazy.layout.previous()), Key([MOD_KEY], 'l', lazy.layout.next()), Key([MOD_KEY], RETURN_KEY, lazy.layout.maximize()), Key([MOD_KEY, SHIFT_KEY], RETURN_KEY, lazy.layout.normalize()), Key([CONTROL_KEY, MOD_KEY], 'h', lazy.layout.prev_screen()), Key([CONTROL_KEY, MOD_KEY], 'l', lazy.layout.next_screen()), Key([MOD_KEY], '1', lazy.to_screen(0)), Key([MOD_KEY], '2', lazy.to_screen(1)), Key([MOD_KEY], '3', lazy.to_screen(2)), Key([ALT_KEY, CONTROL_KEY, MOD_KEY, SHIFT_KEY], 'x', lazy.window.kill()), Key([MOD_KEY], RETURN_KEY, lazy.spawn('urxvt -title term -e zsh')),
Key([mod, "mod1"], "k", lazy.layout.flip_up()), Key([mod, "mod1"], "h", lazy.layout.flip_left()), Key([mod, "mod1"], "l", lazy.layout.flip_right()), Key([mod, "control"], "j", lazy.layout.grow_down()), Key([mod, "control"], "k", lazy.layout.grow_up()), Key([mod, "control"], "h", lazy.layout.grow_left()), Key([mod, "control"], "l", lazy.layout.grow_right()), Key(["mod1"], "n", lazy.layout.normalize()), Key([mod], "n", lazy.next_layout()), Key([mod], "f", lazy.window.toggle_fullscreen()), Key(["mod1"], "f", lazy.window.toggle_floating()), Key([mod], "Return", lazy.layout.toggle_split()), Key([mod], "space", lazy.layout.rotate()), Key(["mod1"], "b", lazy.spawn("bartoggle")), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "shift"], "e", lazy.shutdown()), Key([mod], "q", lazy.window.kill()), Key ([mod], "grave", lazy.group['scratchpad'].dropdown_toggle('term')), #Application Hotkeys Key([], "Print", lazy.spawn("scrot ~/Pictures/scrots")), Key([mod], "w", lazy.spawn("firefox")), Key([mod], "e", lazy.spawn("emacs")), Key([mod], "r", lazy.spawn("liferea")), Key([mod], "c", lazy.spawn("qalculate-gtk")), Key([mod], "p", lazy.spawn("gpodder")), Key([mod], "t", lazy.spawn("urxvt")), Key([mod], "m", lazy.spawn("thunderbird")), Key([mod,"shift"], "w", lazy.spawn("walp")), Key([mod], "v", lazy.spawn("vlc")), Key([mod], "b", lazy.spawn("pcmanfm-qt")), Key([mod], "d", lazy.spawn("discord")),
Key([], 'XF86AudioPrev', lazy.spawn('''bash -c 'mpc prev' ''')), Key([], 'XF86AudioNext', lazy.spawn('''bash -c 'mpc next' ''')), # Volume Key([], 'XF86AudioRaiseVolume', lazy.spawn('''bash -c 'amixer -q set Master 2%+' ''')), Key([], 'XF86AudioLowerVolume', lazy.spawn('''bash -c 'amixer -q set Master 2%-' ''')), Key([], 'XF86AudioMute', lazy.spawn('''bash -c 'amixer -q set Master toggle' ''')), # Management Key([mod, ctrl], 's', lazy.spawn('susp')), Key([mod, ctrl], 'r', lazy.restart()), Key([mod, ctrl], 'l', lazy.spawn('locker')), Key([mod, ctrl], 'F4', lazy.shutdown()), # Misc Key([], 'Print', lazy.spawn('bash -c "screenshot; sleep 3;"')), # Key([mod, 'shift'], 'space', lazy.next_()), # Toggle between different layouts as defined below # 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("M-S-<Left>", lazy.layout.shuffle_left(), lazy.layout.swap_left(), lazy.layout.client_to_previous()), Key("M-S-<Down>", lazy.layout.shuffle_down()), Key("M-S-<Right>", lazy.layout.shuffle_right(), lazy.layout.swap_right(), lazy.layout.client_to_next()), Key("M-S-<minus>", lazy.layout.normalize()), Key("M-S-<equal>", lazy.layout.maximize()), Key("M-<minus>", lazy.layout.grow()), Key("M-<equal>", lazy.layout.shrink()), Key("M-<period>", lazy.layout.toggle_split()), Key("M-<grave>", rot_layout()), Key("M-A-<grave>", rot_layout(-1)), Key("M-<Tab>", lazy.screen.toggle_group()), Key("M-S-q", lazy.window.kill()), Key("M-A-r", lazy.restart()), Key("M-A-q", lazy.shutdown()), Key("M-r", lazy.spawncmd()), Key("M-<Return>", lazy.spawn("xterm")), Key("M-w", lazy.spawn("rofi -show window")), Key("M-s", lazy.spawn("rofi -show run")), Key("M-A-l", lazy.spawn("xscreensaver-command -lock")), Key("M-z", lazy.spawn("spotify")), Key("M-x", lazy.spawn("chromium")), Key("M-c", lazy.spawn("gimp")), Key("M-v", lazy.spawn("gedit")), Key("M-b", lazy.spawn("pcmanfm")) ] #group initialization groups = [Group(i) for i in "1234567890"]
#Key([sup, "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([sup, "shift"], "Return", lazy.layout.toggle_split() ), # Toggle between different layouts as defined below Key([sup], "Tab", lazy.nextlayout()), Key([sup], "w", lazy.window.kill()), Key([sup, "control"], "r", lazy.restart()), Key([sup, "control"], "q", lazy.shutdown()), #Key([alt], "F2", lazy.spawncmd("")), Key([alt], "F4", lazy.window.kill()), Key([sup],"t",lazy.spawn("urxvt")), Key([sup],"f",lazy.spawn("chromium")), Key([sup],"e",lazy.spawn("emacs")), Key([sup],"m",lazy.spawn("urxvt -name mocp -background black -foreground white -e mocp")), Key([],"F2",lazy.spawn("xbacklight -dec 10")), Key([],"F3",lazy.spawn("xbacklight -inc 10")), Key([],"F6",lazy.spawn("amixer -q set Master toggle")), Key([],"F7",lazy.spawn("amixer set Master 5%- unmute")), Key([],"F8",lazy.spawn("amixer set Master 5%+ unmute")), ]
# 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, "control"], "t", lazy.spawn("xfce4-terminal")), Key([mod, "control"], "f", lazy.spawn("thunar")), # Toggle between different layouts as defined below9 Key([mod], "space", lazy.next_layout()), Key([mod], "q", lazy.window.function(smart_kill)), # Toggle different keyboard layouts Key([mod], "Caps_Lock", lazy.widget['keyboardlayout'].next_keyboard()), Key([mod, "mod4"], "r", lazy.restart()), Key([mod, "mod4"], "q", lazy.shutdown()), Key([mod, "mod4"], "p", lazy.spawn("maim")), Key([mod], "r", lazy.spawncmd()), ] groups = [ Group("a", layouts=[layout.Max(), layout.MonadTall(border_width=1, ratio=0.65)], matches=[Match(wm_instance_class=["chromium"])]), Group("s", layouts=[layout.MonadTall(border_width=1, ratio=0.65), layout.Max()], matches=[ Match(wm_class=[ "jetbrains-pycharm-ce", "jetbrains-idea-ce", "dota2" ])
# Switch between screens. screen_switch_keys = [ # Super + the two keys on both sides of the middle row of the keyboard to switch windows. ("semicolon", "apostrophe"), ("s", "d"), ] for firstkey, secondkey in screen_switch_keys: keys.append(Key([mod], firstkey, lazy.to_screen(0))) keys.append(Key([mod], secondkey, lazy.to_screen(1))) keys.append(Key([mod, ctrl], "r", lazy.restart())) keys.append(Key([mod, ctrl, shift, alt], "q", lazy.spawn("echo \"quit\" > /tmp/hevents%s" % (os.environ["DISPLAY"].replace(":", "_"))), lazy.shutdown())) keys.append(Key([mod, ctrl, alt, shift], "1", lazy.spawn(os.path.expanduser("~/.bin/screenconf 1")))) keys.append(Key([mod, ctrl, alt, shift], "2", lazy.spawn(os.path.expanduser("~/.bin/screenconf 2")))) #### Application Launching # Slock for screen locking. keys.append(Key([mod], "l", lazy.spawn("slock"))) # Synapse for doing stuff. keys.append(Key([mod], "space", lazy.spawn("synapse"))) # File browser #keys.append(Key([mod], "e", lazy.spawn("nemo")))
## Keys ################################################################################ mod = 'mod4' alt = 'mod1' ctrl = 'control' shft = 'shift' keys = [ Key([mod, ctrl], 'Left', lazy.layout.toggle_split()), Key([mod, ctrl], 'Right', lazy.layout.client_to_next()), Key([mod, ctrl], 'Down', lazy.layout.down()), Key([mod, ctrl], 'Up', lazy.layout.rotate()), Key([alt], 'Tab', lazy.layout.next()), Key([mod], 'f', lazy.window.toggle_floating()), Key([mod], 'Tab', lazy.next_screen()), Key([mod, ctrl], 'q', lazy.shutdown()), Key([], 'F1', lazy.screen[0].togglegroup('')), Key([mod], 'Return', lazy.spawn(term)), Key([mod, shft], 'Tab', lazy.next_layout()), Key([mod], 'Prior', lazy.screen.prev_group()), Key([mod], 'Next', lazy.screen.next_group()), Key([alt], 'F4', lazy.window.kill()), Key([mod, ctrl], 'r', lazy.restart()), Key([mod], 'space', lazy.spawncmd('run')), Key([mod, ctrl], 'f', lazy.window.toggle_fullscreen()), Key([alt], 'grave', lazy.window.bring_to_front()), Key([], 'XF86MonBrightnessDown', lazy.spawn('sudo /home/filipe/local/bin/backlight dec')), Key([], 'XF86MonBrightnessUp', lazy.spawn('sudo /home/filipe/local/bin/backlight inc')), Key([], 'XF86AudioLowerVolume', lazy.spawn('sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 -5%"')), Key([], 'XF86AudioRaiseVolume', lazy.spawn('sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +5%"')), Key([], 'XF86AudioMute', lazy.spawn('pactl set-sink-mute 0 toggle')),
# 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() ), # Toggle between different layouts as defined below Key([mod], "space", lazy.next_layout()), Key([mod], "w", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod], "Delete", lazy.shutdown()), # Spawn programs Key([mod], "r", lazy.spawncmd()), Key([mod], "Return", lazy.spawn("gnome-terminal")), Key([mod], "c", lazy.spawn("google-chrome")), Key([mod], "v", lazy.spawn("/opt/google/chrome/google-chrome --profile-directory=Default --app-id=fhbjgbiflinjbdggehcddcbncdddomop")), Key([mod], "s", lazy.spawn("subl")), Key([mod], "x", lazy.spawn("xchat")), Key([mod], "h", lazy.spawn("hipchat")), Key([mod], "m", lazy.spawn("spotify")), Key([mod], "g", lazy.spawn("gnome-control-center")), # Volume control Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -c 0 sset Master 1- unmute")),
Key([], 'XF86Back', lazy.screen.prev_group(skip_managed=True, )), Key([], 'XF86Forward', lazy.screen.next_group(skip_managed=True, )), Key([mod], 'XF86Back', lazy.screen.prev_group(skip_managed=True, )), Key([mod], 'XF86Forward', lazy.screen.next_group(skip_managed=True, )), Key([mod], 'Left', lazy.screen.prev_group(skip_managed=True, )), Key([mod], 'Right', lazy.screen.next_group(skip_managed=True, )), Key([mod], 'Escape', lazy.screen.togglegroup()), # Toggle between different layouts as defined below Key([mod], 'space', lazy.next_layout()), Key([mod, 'shift'], 'space', lazy.prev_layout()), # lazy.group.setlayout('... Key([mod, 'shift'], 'c', lazy.window.kill()), # qtile maintenence Key([mod, 'shift'], 'e', lazy.spawn('gvim {}'.format(__file__))), Key([mod, 'shift'], 'r', lazy.restart()), # default is control! ;) Key([mod, 'shift'], 'q', lazy.shutdown()), Key([mod], 'r', lazy.spawncmd()), Key([mod], 'f', lazy.window.toggle_floating()), Key([mod], 'm', lazy.window.toggle_fullscreen()), Key([mod], 'n', lazy.window.toggle_minimize()), #Key( [mod, 'shift'], '2', lazy.to_screen(1), lazy.group.toscreen(1)), ] # create groups groups = [Group(i) for i in '1234567890'] for i in groups: # mod1 + letter of group = switch to group keys.append( Key([mod], i.name, lazy.group[i.name].toscreen()) )
lazy.spawn(Commands.dmenu)), Key([mod], "Return", lazy.spawn('terminology')), Key([win], "s", lazy.spawn(Commands.screenshot)), Key([win], "f", lazy.spawn(Commands.ranger)), Key([win], "m", lazy.spawn(Commands.mutt)), Key([win], "w", lazy.spawn(Commands.weechat)), Key([mod, "shift"], "p", lazy.restart()), Key([mod, 'control'], 'q', lazy.shutdown()), ] ## Mouse 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())] ## Border border = dict(order_normal='#808080', border_width=2,) ## Screens screens = [ Screen(top=bar.Bar([ widget.GroupBox(urgent_alert_method='text', **widget_defaults),
), Key([mod], "space", lazy.nextlayout()), Key([mod], "r", lazy.spawncmd()), Key([mod], "x", lazy.spawn("xchat")), Key([mod], "w", lazy.spawn("firefox")), Key([mod], "Return", lazy.spawn("tilda")), Key([mod], "f", lazy.spawn("pcmanfm")), Key([mod], "s", lazy.spawn("skype")), Key([mod], "g", lazy.spawn("gimp")), # alt Key([alt], "t", lazy.window.toggle_floating()), Key([alt], "w", lazy.window.kill()), Key([alt], "r", lazy.restart()), Key([alt], "q", lazy.shutdown()), Key([alt], "F10", lazy.spawn("scrot -b -d 1 '%Y:%m:%d:%H:%M:%S.png' -e 'mv $f ~/Desktop/'")), ] groups = [ Group("1"), Group("2"), Group("3"), Group("4"), Group("5"), Group("6"), Group("7"), Group("8"), Group("9") ]
lazy.window.toggle_split(), 'M-<Return>': lazy.spawn('urxvt'), 'M-q': lazy.window.kill(), 'M-f': lazy.window.toggle_fullscreen(), # System 'M-<Tab>': lazy.next_layout(), 'M-S-q': lazy.window.kill(), 'M-C-r': lazy.restart(), 'M-C-q': lazy.shutdown(), # Launchers 'M-d': lazy.spawn('rofi -show drun -modi drun,run'), 'M-e': lazy.spawn('rofi -show window -modi window'), # Laptop keys '<XF86MonBrightnessUp>': lazy.spawn('xbacklight -inc 10'), '<XF86MonBrightnessDown>': lazy.spawn('xbacklight -dec 10'), '<XF86AudioMute>': lazy.spawn('pactl set-sink-mute @DEFAULT_SINK@ toggle'), '<XF86AudioMicMute>': lazy.spawn('pactl set-sink-mute @DEFAULT_SINK@ toggle'), '<XF86AudioRaiseVolume>':
from libqtile.command import lazy from libqtile.config import Key from helper import MOD, SPACE keys = [ # Switch window focus to other pane(s) of stack Key([MOD], "space", lazy.layout.next()), Key([MOD], "Return", lazy.spawn("termite")), # 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], "d", lazy.spawn("rofi -show drun")), Key([MOD], "Left", lazy.layout.left()), Key([MOD], "Right", lazy.layout.right()), Key([MOD], "Up", lazy.layout.up()), Key([MOD], "Down", lazy.layout.down()), Key([MOD], "f", lazy.window.toggle_fullscreen()), Key([MOD, "shift"], "space", lazy.window.toggle_floating()), Key([], 'XF86AudioMute', lazy.spawn('amixer -q sset Master toggle')), Key([], 'XF86AudioRaiseVolume', lazy.spawn('amixer -q sset Master 5%+')), Key([], 'XF86AudioLowerVolume', lazy.spawn('amixer -q sset Master 5%-')), Key([], 'XF86MonBrightnessUp', lazy.spawn('xbacklight -inc 10')), Key([], 'XF86MonBrightnessDown', lazy.spawn('xbacklight -dec 10')), Key([MOD], 'v', lazy.layout.mode_vertical()), Key([MOD], 'h', lazy.layout.mode_horizontal()), Key([MOD, "shift"], 'Left', lazy.layout.grow_width(SPACE)), Key([MOD, "shift"], 'Right', lazy.layout.grow_width(-SPACE)), Key([MOD, "shift"], 'Up', lazy.layout.grow_height(SPACE)), Key([MOD, "shift"], 'Down', lazy.layout.grow_height(-SPACE)),
charge_char=u"↑", discharge_char=u"↓", format='{char} {percent:2.0%}', fontsize=12), widget.Clock('%Y-%m-%d %a %I:%M %p', fontsize=12), ], 22))] mod = "mod4" alt = "mod1" control = "control" shift = "shift" keys = [ # Log out Key([mod, control], "Escape", lazy.shutdown()), # Run shortcuts Key([mod], "t", lazy.spawn("gnome-terminal")), Key([mod], "e", lazy.spawn("thunar")), Key([mod], "c", lazy.spawn("google-chrome")), Key([mod], "v", lazy.spawn("gvim")), Key([mod], "r", lazy.spawncmd()), Key([control, mod, alt], "l", lazy.spawn("gnome-screensaver-command --lock")), # Quit window Key([mod], "q", lazy.window.kill()), # Move windows around Key([mod], "j", lazy.layout.down()), Key([mod], "k", lazy.layout.up()),
Key([mod, control], "o", lazy.layout.maximize()), Key([mod, control], "space", lazy.layout.flip()), Key([alt_l], "Tab", lazy.group.next_window(), lazy.function(lambda x: focus_transset(x.currentWindow))), Key([mod], 'c', lazy.window.kill(), lazy.group.next_window(), lazy.function(lambda x: focus_transset(x.currentWindow))), Key([mod, super_l], 'r', lazy.restart()), Key([mod], "space", lazy.function(toggle_layout)), Key([mod, shift], 'space', lazy.group.setlayout(layouts[2].name)), Key([mod], 't', lazy.window.toggle_floating()), Key([mod], 'F12', lazy.window.toggle_fullscreen()), Key([mod], 'n', lazy.hide_show_bar('bottom')), ] keys.extend([ Key([mod, shift], 'q', lazy.shutdown()), Key([mod, shift], 'r', lazy.restart()), ]) def open_web(url): return lazy.spawn('firefox ' + url) m = PyMouse() def mouse_move(x_move, y_move): (x, y) = m.position() m.move(x + x_move, y + y_move)
mod = 'mod4' alt = 'mod1' keys = [ Key([mod], 'Return', lazy.spawn('gnome-terminal --hide-menubar')), Key([mod], 'b', lazy.spawn('google-chrome')), # Toggle between different layouts as defined below # Key([mod], "Tab", lazy.next_layout()), Key([mod], "w", lazy.window.kill()), # Switch between windows in current stack pane Key([alt], 'Tab', lazy.layout.down()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "r", lazy.spawncmd()), Key([], 'Caps_Lock', lazy.function(change_keyboard_layout())), Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -c 1 -q set Master 2dB+")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -c 1 -q set Master 2dB-")), ] screens = [ Screen(top=bar.Bar([ widget.GroupBox(), widget.WindowName(), widget.TextBox('🔋'), widget.Battery(battery_name='BAT1'), widget.TextBox('🔈'),
from libqtile import bar, hook, layout, widget from libqtile.command import lazy from libqtile.config import Click, Drag, Group, Key, Screen wmname = 'qtile' mod = 'mod4' # Key bindings keys = [ # Window manager controls Key([mod, 'control'], 'r', lazy.restart()), Key([mod, 'control'], 'q', lazy.shutdown()), Key([mod], 'r', lazy.spawncmd()), Key([mod], 'Return', lazy.spawn('xterm')), Key([mod], 'w', lazy.window.kill()), Key([mod], 'Tab', lazy.layout.next()), Key([mod], 'Left', lazy.screen.prevgroup()), Key([mod], 'Right', lazy.screen.nextgroup()), # Layout modification Key([mod, 'control'], 'space', lazy.window.toggle_floating()), # Switch between windows in current stack pane Key([mod], 'k', lazy.layout.down()), Key([mod], 'j', lazy.layout.up()), # Move windows up or down in current stack Key([mod, 'control'], 'k', lazy.layout.shuffle_down()), Key([mod, 'control'], 'j', lazy.layout.shuffle_up()),
def init_keys(): return [ # Fixed Screen # Key([mod], "comma", # lazy.to_screen(2)), # Keyboard focus screen 3 # Key([mod], "period", # lazy.to_screen(0)), # Keyboard focus screen 1 # Key([mod], "semicolon", # lazy.to_screen(1)), # Keyboard focus screen 2 # Dinamic screen # Key([mod], "Page_Up", # lazy.next_screen()), # Switch to another screen # Key([mod], "Page_Down", # lazy.prev_screen()), # Switch to another screen # Misc Key([mod, "control"], "Insert", lazy.restart()), # Restart Qtile Key([mod, "control"], "Delete", lazy.shutdown()), # Shutdown Qtile Key([mod, "shift"], "p", lazy.spawncmd()), # Launch Qtile prompt Key([mod], "b", lazy.spawn("light-locker-command -l")), # Lock screen # Rofi Launcher Key([mod], "q", lazy.spawn("rofi -show")), Key([mod, alt], "space", lazy.spawn("rofi -show drun")), # Window control Key([mod], "Home", lazy.window.bring_to_front()), # Bring window to front Key([mod], "End", minimize_window()), # Toogle minimize Key([mod, "shift"], "End", lazy.group["M"].toscreen()), # Go to minimized windows gruop Key([mod], "k", lazy.layout.down()), # Switch to next window Key([mod], "j", lazy.layout.up()), # Switch to previous window Key([mod, "shift"], "k", lazy.layout.shuffle_down()), # Move windows down in current stack Key([mod, "shift"], "j", lazy.layout.shuffle_up()), # Move windows up in current stack Key([mod, "control"], "k", lazy.layout.client_to_next()), # Move window to previous stack side Key([mod, "control"], "j", lazy.layout.client_to_previous()), # Move window to next stack side Key([alt], "Tab", lazy.group.next_window()), # Switch focus to other window Key([alt, "shift"], "Tab", lazy.group.prev_window()), # Switch focus to other window Key([mod], "w", lazy.window.kill()), # Kill active window Key([mod, alt], "w", lazy.spawn("xkill")), # Terminate program Key([mod, "shift"], "w", kill_all_windows_except_current()), # Kill all windows except current Key([mod, "control"], "w", kill_all_windows()), # Kill all windows # Layout control Key([mod], "space", lazy.layout.next()), # Move focus to another stack (Stack) Key([mod], "backslash", lazy.layout.swap_main()), # Swap current window to main pane Key([mod], "l", lazy.layout.grow()), # Grow size of window (Xmonad) Key([mod, "shift"], "l", lazy.layout.grow_main()), # Grow size of main window (Xmonad) Key([mod], "h", lazy.layout.shrink()), # Shrink size of window (Xmonad) Key([mod, "shift"], "h", lazy.layout.shrink_main()), # Shrink size of main window (Xmonad) Key([mod, "shift"], "n", lazy.layout.normalize()), # Restore all windows to default size ratios Key([mod, "shift"], "m", lazy.layout.maximize()), # Toggle a window between min and max sizes Key([mod, "shift"], "space", lazy.layout.rotate(), # Swap panes of split stack (Stack) lazy.layout.flip()), # Switch side main pane occupies (Xmonad) Key([mod, "shift"], "Return", lazy.layout.toggle_split()), # Toggle between split and unsplit (Stack) # Cycle layouts Key([mod], "Down", lazy.next_layout()), # Toggle through layouts Key([mod], "Up", lazy.prev_layout()), # Toggle through layouts # Layout related Key([mod, "control"], "Return", lazy.window.toggle_floating()), # Toggle floating # On group and screen Key([mod], "Right", lazy.screen.next_group()), # Move to right group Key([mod], "Left", lazy.screen.prev_group()), # Move to left group Key([mod], "z", lazy.screen.togglegroup()), # Move to previous visited group Key([mod, "shift"], "Right", window_to_next_group()), # Move window to right workspace Key([mod, "shift"], "Left", window_to_prev_group()), # Move window to left workspace Key([mod, "control"], "Right", window_to_next_group(), lazy.screen.next_group()), # Move window to right workspace Key([mod, "control"], "Left", window_to_prev_group(), lazy.screen.prev_group()), # Move window to left workspace Key([mod, "shift"], "i", lazy.next_urgent()), # Move to next urgent group # General # Return Key([mod], "Return", lazy.spawn(defTerm)), # Open terminal Key([mod, alt], "Return", lazy.spawn(fbkTerm)), # Open program terminal # Function Key([mod], "F6", lazy.spawn("systemctl start org.cups.cupsd.service")), Key([mod], "F7", lazy.spawn("systemctl stop org.cups.cupsd.service")), Key([mod], "F8", lazy.spawn("nmcli radio wifi on")), Key([mod], "F9", lazy.spawn("nmcli radio wifi off")), Key([mod], "F10", lazy.spawn("systemctl restart NetworkManager")), Key([mod, "control"], "F11", lazy.spawn("cmus-remote -u")), Key([mod, "control"], "F12", lazy.spawn("cmus-remote -s")), Key([mod, "shift"], "F11", lazy.spawn("cmus-remote -v -5%")), Key([mod, "shift"], "F12", lazy.spawn("cmus-remote -v +5%")), # QWERT Key([mod, "shift"], "t", lazy.spawn(pgmTerm + " -e htop")), Key([mod], "e", lazy.spawn("subl3")), Key([mod], "r", lazy.spawn(pgmTerm + " -e ranger")), Key([mod], "t", lazy.spawn("xfce4-taskmanager")), Key([mod], "y", lazy.spawn(pgmTerm + " -e mpsyt")), Key([mod], "i", lazy.spawn(pgmTerm + " -e irssi")), Key([mod], "o", lazy.spawn("libreoffice")), Key([mod], "p", lazy.spawn("arandr")), # ASDFG Key([mod, "shift"], "a", lazy.spawn("chromium")), Key([mod], "a", lazy.spawn("firefox-developer-edition")), Key([mod], "s", lazy.spawn("pavucontrol")), Key([mod], "d", lazy.spawn("xlinks")), Key([mod], "f", lazy.spawn("thunar")), Key([mod], "g", lazy.spawn("geany")), # ZXCVB Key([mod], "x", lazy.spawn("pamac-manager")), Key([mod], "c", lazy.spawn(pgmTerm + " -e cmus")), Key([mod], "v", lazy.spawn("VirtualBox")), Key([mod], "n", lazy.spawn("nm-connection-editor")), Key([], prnt, lazy.spawn("xfce4-screenshooter")) ]
# Commands for Matrix Key([mod, shift], "h", lazy.layout.add()), Key([mod, shift], "l", lazy.layout.delete()), Key([mod], "Return", lazy.spawn(terminal)), Key([mod], "y", lazy.spawn("ydcv-notify.sh")), Key([mod], "w", lazy.spawn(wallpaper_cmd)), # Toggle between different layouts as defined below Key([mod], "space", lazy.nextlayout()), Key([mod, shift], "c", lazy.window.kill()), Key([mod, ctrl], "r", lazy.restart()), # Key([mod], "r", lazy.spawncmd()), Key([mod], "r", lazy.spawn("dmenu_run")), Key([mod, shift], "q", lazy.shutdown()), Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod, shift], "f", lazy.window.toggle_floating()), Key([mod], "comma", lazy.window.down_opacity()), Key([mod], "period", lazy.window.up_opacity()), ] groups = [Group(chr(ord("1") + i)) for i in range(9)] for i in groups: keys.append(Key([mod], i.name, lazy.group[i.name].toscreen())) keys.append(Key([mod, shift], i.name, lazy.window.togroup(i.name))) keys.append(Key([mod], "Left", lazy.group.prevgroup())) keys.append(Key([mod], "Right", lazy.group.nextgroup())) dgroups_key_binder = None
# -*- coding: utf-8 -*- from libqtile.manager import Key, Screen, Group, Drag, Click from libqtile.command import lazy from libqtile import layout, bar, widget, hook follow_mouse_focus = True mod = "mod4" alt = "mod1" keys = [ # Kill Qtile Key(["control", mod], "q", lazy.shutdown()), # Restart Qtile Key([mod, "control"], "r", lazy.restart()), # Kill window Key([mod], "w", lazy.window.kill()), # Switch between windows Key([mod], "k", lazy.layout.down()), Key([mod], "j", lazy.layout.up()), # Move windows up/down or left/right in current stack # It's like resizing the window Key([mod, "control"], "k", lazy.layout.shuffle_down()), Key([mod, "control"], "j", lazy.layout.shuffle_up()), Key([alt], "Tab", lazy.group.next_window()), # this is usefull when floating windows get buried # Key([alt], "grave", lazy.window.bring_to_front()), Key([mod, alt], "Tab", lazy.window.to_next_screen()), Key([mod, alt], "1", lazy.to_screen(0), lazy.group.toscreen(0)), Key([mod, alt], "2", lazy.to_screen(1), lazy.group.toscreen(1)),
from libqtile.command import lazy from libqtile import layout, bar, widget, hook try: from libqtile.manager import Key, Group except ImportError: from libqtile.config import Key, Group from libqtile.manager import Click, Drag, Screen sup = "mod4" alt = "mod1" keys = [ # Window manager controls Key([alt, 'control'], 'r', lazy.restart()), Key([alt, 'control'], 'q', lazy.shutdown()), Key([alt], 'r', lazy.spawn('dmenu_run')), Key([alt], 'Return', lazy.spawn('urxvt')), Key([alt], 'w', lazy.window.kill()), Key([alt], 'Tab', lazy.layout.next()), Key([alt], 'Left', lazy.screen.prevgroup()), Key([alt], 'Right', lazy.screen.nextgroup()), # Layout modification Key([alt, 'control'], 'space', lazy.window.toggle_floating()), # Switch between windows in current stack pane Key([alt], "k", lazy.layout.down()), Key([alt], "j", lazy.layout.up()), Key([alt, "shift"], "k", lazy.layout.shuffle_down()), Key([alt, "shift"], "j", lazy.layout.shuffle_up()), Key([alt], "i", lazy.layout.grow()), Key([alt], "m", lazy.layout.shrink()),
# Bindings for Tile layout Key([alt, "shift"], "i", lazy.layout.increase_ratio()), Key([alt, "shift"], "d", lazy.layout.decrease_ratio()), # Sound Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer sset Master 5%+")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master 5%-")), Key([], "XF86AudioMute", lazy.spawn("amixer sset Master toggle")), # Qtile management Key([alt, "shift"], "r", lazy.restart()), Key([alt, "shift"], "q", lazy.shutdown()), # cycle to previous group Key([mod], "F11", lazy.screen.prevgroup(skip_managed=True)), # cycle to next group Key([mod], "F12", lazy.screen.nextgroup(skip_managed=True)), # toggle group Key([mod], "Tab", lazy.screen.togglegroup()), # PRINT SCREEN Key([mod], "F10", lazy.spawn("import -window root ~/screenshot.png")), ] groups = [ Group("term"), Group("work"),
myTerm = "alacritty" # My terminal of choice keys = [ # SUPER + FUNCTION KEYS Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod], "q", lazy.window.kill()), Key([mod], "t", lazy.spawn('xterm')), Key([mod], "v", lazy.spawn('pavucontrol')), Key([mod], "d", lazy.spawn('nwggrid -p -o 0.4')), Key([mod], "Escape", lazy.spawn('xkill')), Key([mod], "Return", lazy.spawn('alacritty')), Key([mod], "KP_Enter", lazy.spawn('alacritty')), Key([mod], "x", lazy.shutdown()), # SUPER + SHIFT KEYS Key([mod, "shift"], "Return", lazy.spawn('pcmanfm')), Key([mod, "shift"], "d", lazy.spawn( "dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'" )), # Key([mod, "shift"], "d", lazy.spawn(home + '/.config/qtile/scripts/dmenu.sh')), Key([mod, "shift"], "q", lazy.window.kill()), Key([mod, "shift"], "r", lazy.restart()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "shift"], "x", lazy.shutdown()), # CONTROL + ALT KEYS Key(["mod1", "control"], "o",
def init_const_keys(): """For layMan key-switcher (WIP): non-layout, consistent keys""" keys = [ # Switch window focus to other pane(s) of stack Key([mod], "Tab", lazy.layout.next()), Key([mod, shift], 'Tab', lazy.layout.previous()), # 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], 'w', lazy.window.toggle_minimize()), Key([mod, shift], 'w', lazy.window.toggle_minimize()), # Toggle between different layouts as defined below Key([mod], "space", lazy.next_layout()), Key([mod, shift], "space", lazy.prev_layout()), Key([mod, shift], "q", lazy.restart()), Key([mod, ctrl], "q", lazy.shutdown()), Key([mod, shift], "semicolon", lazy.spawncmd()), # Scrotter Key([mod, shift], 'a', lazy.spawn([ 'scrot', '-q', '100', '%Y%m%d.%H%M:%S_qtile.png', '-e', 'mv $f ~/Screenshots/', ])), Key([mod, shift], 'u', lazy.spawn([ 'scrot', '-ubq', '100', '%Y%m%d.%H%M:%S_window.png', '-e', 'mv $f ~/Screenshots', ])), # TODO: grab mouse for this Key([mod, shift], 's', lazy.spawn([ 'scrot', '-sq', '100', '%Y%m%d.%H%M:%S_selection.png', '-e', 'mv $f ~/Screenshots', ])), # Window Ops Key([mod], "x", lazy.window.kill()), Key([mod], "t", lazy.window.toggle_floating()), Key([mod, shift], "e", lazy.window.toggle_fullscreen()), Key([mod], "semicolon", lazy.spawn(TERMUX)), #movement Key([mod], "g", lazy.togroup()), Key([mod], "slash", lazy.findwindow()), # Sound and Mpd Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer sset Master 5%+")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master 5%-")), Key([], "XF86AudioMute", lazy.spawn("amixer sset Master toggle")), Key([], "XF86AudioNext", # lazy.function(lambda q: fipc_jango("next"))), lazy.spawn("mpc next")), Key([], "XF86AudioPrev", # lazy.function(lambda q: fipc_jango("prev"))), lazy.spawn("mpc prev")), # No mute key @notebook Key([shift], "XF86AudioMute"), # Key([], "F12", lazy.function(SwapGroup('h4x'))), #qtile-examples/roger/ # Key(['shift'], "F12", lazy.function(to_urgent)), #qtile-examples/roger/ ] keys.extend(init_groups_keys()) return keys
if os.path.exists(xmodmap): call(['xmodmap', xmodmap]) mpc = 'mpc -h %s ' % mpd_host mod = 'mod4' liteblue = '0066FF' litegreen = '00BB55' keys = [ Key([mod, "shift"], "Left", lazy.layout.decrease_ratio()), Key([mod, "shift"], "Return", lazy.layout.toggle_split()), Key([mod, "shift"], "Right", lazy.layout.increase_ratio()), Key([mod, "shift"], "Tab", lazy.layout.previous()), Key([mod, "shift"], "j", lazy.spawn("amixer -c 0 -q set Master 2dB-")), Key([mod, "shift"], "k", lazy.spawn("amixer -c 0 -q set Master 2dB+")), Key([mod, "shift"], "q", lazy.shutdown()), Key([mod, "shift"], "p", lazy.pause()), Key([mod, "shift"], "space", lazy.layout.rotate()), Key([mod], "Left", lazy.group.prevgroup()), Key([mod], "Right", lazy.group.nextgroup()), Key([mod], "Up", lazy.to_next_screen()), Key([mod], "Down", lazy.to_prev_screen()), Key([mod], "Tab", lazy.layout.next()), Key([mod], "f", lazy.window.toggle_floating()), Key([mod], "g", lazy.togroup()), Key([mod], "r", lazy.spawncmd()), Key([mod], "j", lazy.layout.up()), Key([mod], "k", lazy.layout.down()), Key([mod], "q", lazy.restart()), Key([mod], "l", lazy.spawn( 'alock -auth pam -bg image:center,file=' + image)),
from libqtile.command import lazy from libqtile import layout, bar, widget, hook try: from libqtile.manager import Key, Group except ImportError: from libqtile.config import Key, Group from libqtile.manager import Click, Drag, Screen sup = "mod4" alt = "mod1" keys = [ # General Keybindings Key([sup, "shift"], "q", lazy.shutdown()), Key([sup], "k", lazy.layout.down()), Key([sup], "j", lazy.layout.up()), Key([sup, "control"], "k", lazy.layout.shuffle_down()), Key([sup, "control"], "j", lazy.layout.shuffle_up()), Key([sup], "space", lazy.layout.next()), Key([sup, "shift"], "space", lazy.layout.rotate()), Key([sup, "shift"], "Return", lazy.layout.toggle_split()), Key([sup], "Tab", lazy.next_layout()), Key([sup], "w", lazy.window.kill()), Key([sup, "control"], "r", lazy.restart()), Key([sup, "control"], "q", lazy.shutdown()), Key([sup], "r", lazy.spawncmd()), Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -c 0 sset Master 1- unmute")), Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -c 0 sset Master 1+ unmute")),
def main(qtile): system("_modmap us") # TODO: extend for a generic number of screens? dualscreen = not qtile or len(qtile.conn.pseudoscreens) > 1 # key modifiers normal = ["mod4"] strong = ["mod4", "mod1"] # # commands # term = "_terminal " normal_commands = { "b": "chromium-browser", "y": term + "-x _calendar", "v": "gvim", "t": "_tango_newsletter", "c": term + "-x coffee", "e": term + "-x _elm-repl", "a": term + "-x alsamixer -c %d" % sound_card, "F10": 'sh -c "import screenshot$(yymmdd_HHMMSS).png"', "F12": "mount_and_open_all", "Return": term, "equal": "amixer -c %d -q set Master 2dB+" % sound_card, "minus": "amixer -c %d -q set Master 2dB-" % sound_card, "bracketleft": "brightness down", "bracketright": "brightness up", "Escape": "gnome-screensaver-command -l", "BackSpace": "qshell -c restart", } strong_commands = {"s": "_modmap se", "g": "_modmap gr", "1": "_modmap it", "0": "_modmap us"} keys.extend( [ Key([], "XF86MonBrightnessUp", lazy.spawn("brightness up")), Key([], "XF86MonBrightnessDown", lazy.spawn("brightness down")), Key([], "XF86MonBrightnessDown", lazy.spawn("brightness down")), Key(strong, "q", lazy.shutdown()), Key(normal, "j", lazy.layout.switchdown(0)), Key(strong, "j", lazy.layout.client_to_stack(0)), Key(normal, "k", lazy.layout.switchdown(1)), Key(strong, "k", lazy.layout.client_to_stack(1)), Key(normal, "h", lazy.screen.prev_group()), Key(normal, "l", lazy.screen.next_group()), Key(normal, "space", lazy.screen.togglegroup()), Key(normal, "semicolon", lazy.spawncmd()), Key(normal, "t", lazy.layout.toggle_split()), Key(normal, "r", lazy.layout.rotate()), Key(normal, "apostrophe", lazy.next_layout()), Key(normal, "x", lazy.window.kill()), Key(normal, "f", lazy.window.toggle_floating()), ] ) keys.extend([Key(normal, k, lazy.spawn(v)) for k, v in normal_commands.items()]) keys.extend([Key(strong, k, lazy.spawn(v)) for k, v in strong_commands.items()]) # # Screens and bars # class CustomWindowName(widget.WindowName): def button_press(self, x, y, button): screen = self.bar.screen { 1: lambda: screen.group.layout.cmd_switchdown(0), # left mouse, left pane 2: lambda: self.qtile.cmd_next_layout(), # mid mouse, change layout 3: lambda: screen.group.layout.cmd_switchdown(1), # right mouse, right pane 4: lambda: screen.cmd_next_group(), # wheel up 5: lambda: screen.cmd_prev_group(), # wheel down }.get(button, lambda: "")() main_bar = bar.Bar( [ widget.GroupBox( urgent_alert_method="text", borderwidth=2, padding=1, margin_x=1, margin_y=1, active="00FF00", this_current_screen_border="009900", disable_drag=True, inactive="CCCCCC", ), widget.Volume(cardid=sound_card, device=None), widget.Sep(), CustomWindowName(), widget.Sep(), widget.Notify(default_timeout=1), widget.Prompt(), widget.Battery(update_delay=1), widget.Systray(icon_size=25), widget.Clock(format="%m%d %a %I:%M%P"), ], 25, ) lower_bar = bar.Bar([CustomWindowName()], 1) screens.extend([Screen(top=main_bar, bottom=lower_bar), Screen()]) # # Groups # group_def = "n m comma:c period:p u i o p" if dualscreen: group_def += " slash:/" for key in group_def.split(): if len(key) is 1: name = key.upper() else: key, name = key.split(":") groups.append(Group(name)) keys.append(Key(normal, key, lazy.screen.togglegroup(name))) keys.append(Key(strong, key, lazy.window.togroup(name))) if dualscreen: lazy.group["/"].toScreen(1) # # Layouts # class CustomStack(layout.Stack): def cmd_switchdown(self, offset): offset %= len(self.stacks) if self.currentStackOffset is offset: self.cmd_down() else: self.group.focus(self.stacks[offset].cw, True) layouts.extend([CustomStack(num_stacks=1, border_width=0), CustomStack(num_stacks=2, border_width=1)]) # # Mouse floats # mouse.extend( [ Drag(normal, "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()), Drag(normal, "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()), ] )
x_display = display.Display() x_screen = x_display.screen() class command: terminal = get_alternatives(['terminator', 'gnome-terminal', 'xterm']) autostart = os.path.join(os.path.dirname(__file__), 'bin/autostart') lock = os.path.join(os.path.dirname(__file__), 'bin/lock') suspend = os.path.join(os.path.dirname(__file__), 'bin/suspend') hibernate = os.path.join(os.path.dirname(__file__), 'bin/hibernate') # Key bindings keys = [ # Window manager controls Key([MODKEY, CTRL], 'r', lazy.restart()), Key([MODKEY, CTRL], 'q', lazy.shutdown()), Key([MODKEY, SHIFT], SPACE, lazy.layout.flip()), Key([MODKEY], RETURN, lazy.spawn(command.terminal)), Key([MODKEY], SPACE, lazy.nextlayout()), Key([MODKEY], 'q', lazy.window.kill()), Key([MODKEY], 'p', lazy.spawncmd()), Key([MODKEY], 't', lazy.window.toggle_floating()), Key([MODKEY], 'f', lazy.window.toggle_fullscreen()), # Move Focus Key([MODKEY], TAB, lazy.layout.next()), Key([MODKEY, SHIFT], TAB, lazy.layout.previous()), Key([MODKEY], 'h', lazy.layout.left()), Key([MODKEY], 'j', lazy.layout.down()), Key([MODKEY], 'k', lazy.layout.up()), Key([MODKEY], 'l', lazy.layout.right()),
def get_keys(): keys = [] ######################################################################## index = 1 for current_group in groups.get_groups(): keys.append(Key([mod], str(index), lazy.function(go_to_group, current_group.name))) # Switch to another group keys.append(Key([mod, "shift"], str(index), lazy.window.togroup(current_group.name))) # Send current window to another group index += 1 ######################################################################## ######################################################################## keys.append(Key([mod], "h", lazy.layout.left())) keys.append(Key([mod], "l", lazy.layout.right())) keys.append(Key([mod], "j", lazy.layout.down())) keys.append(Key([mod], "k", lazy.layout.up())) keys.append(Key([mod, "shift"], "h", lazy.layout.swap_left())) keys.append(Key([mod, "shift"], "l", lazy.layout.swap_right())) keys.append(Key([mod, "shift"], "j", lazy.layout.shuffle_down())) keys.append(Key([mod, "shift"], "k", lazy.layout.shuffle_up())) keys.append(Key([mod], "i", lazy.layout.grow())) keys.append(Key([mod], "m", lazy.layout.shrink())) #keys.append(Key([mod], "m", lazy.layout.maximize())) # Toggle a window between minimum and maximum sizes keys.append(Key([mod], "n", lazy.layout.normalize())) keys.append(Key([mod], "o", lazy.layout.maximize())) #keys.append(Key([mod, "shift"], "space", lazy.layout.flip())) keys.append(Key([mod, "shift"], "space", lazy.layout.flip())) keys.append(Key([mod1], "Tab", lazy.layout.next(), desc="Move window focus to other window")) #keys.append(Key([mod, "shift"], "space", lazy.function(switch_screens))) # # Switch between windows # keys.append(Key([mod], "h", lazy.layout.left(), desc="Move focus to left")) # keys.append(Key([mod], "l", lazy.layout.right(), desc="Move focus to right")) # keys.append(Key([mod], "j", lazy.layout.down(), desc="Move focus down")) # keys.append(Key([mod], "k", lazy.layout.up(), desc="Move focus up")) # keys.append(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. # keys.append(Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left")) # keys.append(Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right")) # keys.append(Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down")) # keys.append(Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up")) # # Grow windows. If current window is on the edge of screen and direction # # will be to screen edge - window would shrink. # keys.append(Key([mod, "control"], "h", lazy.function(grow("WWW")), desc="Grow window to the left")) # #keys.append(Key([mod, "control"], "h", lazy.layout.grow(), desc="Grow window to the left")) # #keys.append(Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left")) # #keys.append(Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right")) # #keys.append(Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down")) # #keys.append(Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up")) # keys.append(Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes")) # keys.append(Key([mod], "n", lazy.layout.normalize())) # Restore all windows to default size ratios # 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 keys.append(Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack")) keys.append(Key([mod], "Return", lazy.spawn(myTerm), desc="Launch terminal")) # Toggle between different layouts as defined below keys.append(Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts")) keys.append(Key([mod], "w", lazy.window.kill(), desc="Kill focused window")) keys.append(Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile")) keys.append(Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile")) keys.append(Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget")) ######################################################################## keys.append(Key(["control", "mod1"], "l", lazy.spawn("light-locker-command -l"))) ######################################################################## # Increase number in master pane (Tile)), # Grow size of current window (XmonadTall) # keys.append(Key([mod, "shift"], "l", lazy.layout.grow(), lazy.layout.increase_nmaster())) # Shrink size of current window (XmonadTall), # Decrease number in master pane (Tile) #keys.append(Key([mod, "shift"], "h", lazy.layout.shrink(), lazy.layout.decrease_nmaster())) #keys.append(Key([mod, "shift"], "Left", window_to_prev_group)) # Move window to workspace to the left #keys.append(Key([mod, "shift"], "Right", window_to_next_group)) # Move window to workspace to the right #keys.append(Key([mod, "shift"], "KP_Enter", lazy.window.toggle_floating())) # Toggle floating # Swap panes of split stack (Stack), # Switch which side main pane occupies (XmonadTall) #keys.append(Key([mod, "shift"], "space", lazy.layout.rotate(), lazy.layout.flip())) ######################################################################## # Stack controls #keys.append(Key([mod], "space", lazy.layout.next())) # Switch window focus to other pane(s) of stack #keys.append(Key([mod, "control"], "Return", lazy.layout.toggle_split())) # Toggle between split and unsplit sides of stack #keys.append(Key([mod], "Tab", lazy.next_layout())) # Toggle through layouts #keys.append(Key([mod, "shift"], "c", lazy.window.kill())) # Kill active window # keys.append(Key([mod], "w", lazy.to_screen(2))) # Keyboard focus screen(0) # keys.append(Key([mod], "e", lazy.to_screen(0))) # Keyboard focus screen(1) # keys.append(Key([mod], "r", lazy.to_screen(1))) # Keyboard focus screen(2) #keys.append(Key([mod, "control"], "k", lazy.layout.section_up())) # Move up a section in treetab #keys.append(Key([mod, "control"], "j", lazy.layout.section_down())) # Move down a section in treetab ######################################################################## # GUI Apps #keys.append(Key([mod], "b", lazy.function(app_or_group, "WWW", "firefox"))) keys.append(Key([mod], "b", lazy.function(app_or_group, "SYS", "firefox"))) #keys.append(Key([mod], "b", lazy.function(app_or_group("WWW", "firefox")))) #keys.append(Key([mod], "f", lazy.spawn("pcmanfm"))) #keys.append(Key([mod], "g", lazy.spawn("geany"))) ################################################################################ return keys
def init_keys(): keys = [ Key( [mod], "Return", lazy.spawn(myTerm) # Open terminal ), Key( [mod], "Tab", lazy.next_layout() # Toggle through layouts ), Key( [mod, "shift"], "c", lazy.window.kill() # Kill active window ), Key( [mod, "shift"], "r", lazy.restart() # Restart Qtile ), Key( [mod, "shift"], "q", lazy.shutdown() # Shutdown Qtile ), Key([mod], "w", lazy.to_screen(2) # Keyboard focus screen(0) ), Key([mod], "e", lazy.to_screen(0) # Keyboard focus screen(1) ), Key([mod], "r", lazy.to_screen(1) # Keyboard focus screen(2) ), Key([mod, "control"], "k", lazy.layout.section_up() # Move up a section in treetab ), Key([mod, "control"], "j", lazy.layout.section_down() # Move down a section in treetab ), ### Window controls Key( [mod], "k", lazy.layout.down() # Switch between windows in current stack pane ), Key( [mod], "j", lazy.layout.up() # Switch between windows in current stack pane ), Key( [mod, "shift"], "k", lazy.layout.shuffle_down() # Move windows down in current stack ), Key( [mod, "shift"], "j", lazy.layout.shuffle_up() # Move windows up in current stack ), Key( [mod, "shift"], "l", lazy.layout.grow(), # Grow size of current window (XmonadTall) lazy.layout.increase_nmaster(), # Increase number in master pane (Tile) ), Key( [mod, "shift"], "h", lazy.layout.shrink(), # Shrink size of current window (XmonadTall) lazy.layout.decrease_nmaster(), # Decrease number in master pane (Tile) ), Key( [mod, "shift"], "Left", # Move window to workspace to the left window_to_prev_group ), Key( [mod, "shift"], "Right", # Move window to workspace to the right window_to_next_group ), Key( [mod], "n", lazy.layout.normalize() # Restore all windows to default size ratios ), Key( [mod], "m", lazy.layout.maximize() # Toggle a window between minimum and maximum sizes ), Key( [mod, "shift"], "KP_Enter", lazy.window.toggle_floating() # Toggle floating ), Key( [mod, "shift"], "space", lazy.layout.rotate(), # Swap panes of split stack (Stack) lazy.layout.flip() # Switch which side main pane occupies (XmonadTall) ), ### Stack controls Key( [mod], "space", lazy.layout.next() # Switch window focus to other pane(s) of stack ), Key( [mod, "control"], "Return", lazy.layout.toggle_split() # Toggle between split and unsplit sides of stack ), ### Dmenu Run Launcher Key( ["mod1", "control"], "Return", lazy.spawn("dmenu_run -fn 'UbuntuMono Nerd Font:size=10' -nb '#292d3e' -nf '#bbc5ff' -sb '#82AAFF' -sf '#292d3e' -p 'dmenu:'") ), ### Dmenu scripts launched with ALT + CTRL + KEY Key( ["mod1", "control"], "e", lazy.spawn("./.dmenu/dmenu-edit-configs.sh") ), Key( ["mod1", "control"], "m", lazy.spawn("./.dmenu/dmenu-sysmon.sh") ), Key( ["mod1", "control"], "p", lazy.spawn("passmenu") ), Key( ["mod1", "control"], "r", lazy.spawn("./.dmenu/dmenu-reddio.sh") ), Key( ["mod1", "control"], "s", lazy.spawn("./.dmenu/dmenu-surfraw.sh") ), Key( ["mod1", "control"], "t", lazy.spawn("./.dmenu/dmenu-trading.sh") ), ### My applications launched with SUPER + ALT + KEY Key( [mod, "mod1"], "l", lazy.spawn(myTerm+" -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube") ), Key( [mod, "mod1"], "n", lazy.spawn(myTerm+" -e newsboat") ), Key( [mod, "mod1"], "r", lazy.spawn(myTerm+" -e rtv") ), Key( [mod, "mod1"], "e", lazy.spawn(myTerm+" -e neomutt") ), Key( [mod, "mod1"], "m", lazy.spawn(myTerm+" -e sh ./scripts/toot.sh") ), Key( [mod, "mod1"], "t", lazy.spawn(myTerm+" -e sh ./scripts/tig-script.sh") ), Key( [mod, "mod1"], "f", lazy.spawn(myTerm+" -e sh ./.config/vifm/scripts/vifmrun") ), Key( [mod, "mod1"], "j", lazy.spawn(myTerm+" -e joplin") ), Key( [mod, "mod1"], "c", lazy.spawn(myTerm+" -e cmus") ), Key( [mod, "mod1"], "i", lazy.spawn(myTerm+" -e irssi") ), Key( [mod, "mod1"], "y", lazy.spawn(myTerm+" -e youtube-viewer") ), Key( [mod, "mod1"], "a", lazy.spawn(myTerm+" -e ncpamixer") ), ] return keys
Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'), Key([mod], "d", lazy.spawn( "dmenu_run -fn '{font}:pixelsize=13' -nb '{nb}' -nf '{nf}' -sb '{sb}' -sf '{sf}' -l 20 -p 'Run: '" .format(font=font, nb=colors['color0'], nf=colors['color7'], sb=colors['color4'], sf=colors['color0'])), desc='Run Launcher'), Key([mod], "f", lazy.spawn(myBrowser), desc='Browser'), Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'), Key([mod], "q", lazy.window.kill(), desc='Kill active window'), Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'), Key([mod, "shift"], "e", lazy.shutdown(), desc='Shutdown Qtile'), Key([mod], "x", lazy.spawn("slock"), desc='Screen locker'), Key([mod, "shift"], "x", lazy.spawn("shutdown -h now"), desc='System shutdown'), Key([mod, "control"], "r", lazy.spawn("reboot"), desc='System restart'), # System controls Key([mod], "F1", lazy.spawn('pamixer -t'), desc='Mute volume'), Key([mod], 'F2', lazy.spawn('pamixer --allow-boost -d 5'), desc='Decrease volume by 5%'), Key([mod], 'F3', lazy.spawn('pamixer --allow-boost -i 5'),
}) weather = widget.copy() weather.update({ 'update_interval': 60, 'metric': False, 'format': '{condition_text} {condition_temp}°', }) ##-> Keybindings MOD = 'mod4' keys = [ ## Window Manager Controls Key([MOD, 'control'], 'r', lazy.restart()), Key([MOD, 'control'], 'q', lazy.shutdown()), ## Window Controls Key([MOD], 'w', lazy.window.kill()), Key([MOD], 'Left', lazy.group.prevgroup()), Key([MOD], 'Right', lazy.group.nextgroup()), ## Volume Controls Key([], 'XF86AudioRaiseVolume', lazy.spawn(Commands.volume_up)), Key([], 'XF86AudioLowerVolume', lazy.spawn(Commands.volume_down)), Key([], 'XF86AudioMute', lazy.spawn(Commands.volume_toggle)), ## Application Launchers #Key([MOD], 'r', lazy.spawncmd(prompt=':')), Key([MOD], 'space', lazy.spawn(Commands.dmenu)), Key([MOD], 'n', lazy.spawn('google-chrome')),
Key([mod], 'k', lazy.layout.down()), Key([mod], 'j', lazy.layout.up()), Key([mod], 'space', lazy.layout.next()), Key([mod, 'control'], 'k', lazy.layout.shuffle_down()), Key([mod, 'control'], 'j', lazy.layout.shuffle_up()), Key([mod, 'shift'], 'h', lazy.layout.client_to_previous()), Key([mod, 'shift'], 'l', lazy.layout.client_to_next()), Key([mod, 'shift'], 'space', lazy.layout.rotate()), Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()), Key([mod], '1', lazy.to_screen(1)), Key([mod], '2', lazy.to_screen(2)), Key([mod], 'Tab', lazy.next_layout()), Key([mod], 'x', lazy.window.kill()), Key([mod], 'r', lazy.spawncmd()), Key([mod, 'control'], 'r', lazy.restart()), Key([mod, 'control'], 'q', lazy.shutdown()), # Screen Key([], 'F7', lazy.spawn('xset dpms force off')), Key([], 'XF86MonBrightnessUp', lazy.function(backlight('inc'))), Key([], 'XF86MonBrightnessDown', lazy.function(backlight('dec'))), # Audio Key([], 'XF86AudioMute', lazy.spawn('ponymix toggle')), Key([], 'XF86AudioRaiseVolume', lazy.spawn('ponymix increase 5')), Key([], 'XF86AudioLowerVolume', lazy.spawn('ponymix decrease 5')), Key([], 'XF86AudioPlay', lazy.spawn(music_cmd + 'PlayPause')), Key([], 'XF86AudioNext', lazy.function(next_prev('Next'))), Key([], 'XF86AudioPrev', lazy.function(next_prev('Previous'))), # Apps
widget.Clock('%B %d %a %I:%M %p', fontsize=11, foreground='9c6b34'), ], 22, opacity=0.1)) # our bar is 22px high ] # Super_L (the Windows key) is typically bound to mod4 by default, so we use # that here. mod = "mod4" # The keys variable contains a list of all of the keybindings that qtile will # look through each time there is a key pressed. keys = [ # Log out; note that this doesn't use mod4: that's intentional in case mod4 # gets hosed (which happens if you unplug and replug your usb keyboard # sometimes, or on system upgrades). This way you can still log back out # and in gracefully. Key(["shift", "mod1"], "q", lazy.shutdown()), # toggle between windows just like in unity with 'alt+tab' Key(["mod1","shift"], "Tab", lazy.layout.down()), Key(["mod1"], "Tab", lazy.layout.up()), Key([mod], "h", lazy.layout.previous().when('tile'),lazy.layout.up().when('xmonad-tall')), Key([mod], "l", lazy.layout.previous()), # swap tile positions,(works only on tiles) Key([mod, "shift"], "space", lazy.layout.rotate()), Key([mod, "shift"], "Return",lazy.layout.toggle_split()), # change the layout Key([mod], "j", lazy.nextlayout()),
Key([mod], 'c', lazy.spawn('code')), Key([mod], 'v', lazy.spawn('urxvt -e vifm')), Key([mod], 'g', lazy.spawn('gimp')), Key([mod], 'Return', lazy.spawn('urxvt')), # Window operation keybinds Key([mod], 'k', lazy.layout.down()), Key([mod], 'j', lazy.layout.up()), Key([mod, 'control'], 'k', lazy.layout.shuffle_down()), Key([mod, 'control'], 'j', lazy.layout.shuffle_up()), Key([mod, 'shift'], 'q', lazy.window.kill()), Key([mod], 'f', lazy.window.toggle_fullscreen()), # Qtile operation keybinds Key([mod, 'control'], 'r', lazy.restart()), Key([mod], '0', lazy.shutdown()), ] groups = [Group(i) for i in '123456'] for i in groups: keys.extend([ # Group operation keybinds Key([mod], i.name, lazy.group[i.name].toscreen()), Key([mod, 'shift'], i.name, lazy.window.togroup(i.name)), ]) layouts = [ layout.MonadTall( border_focus=colors['white1'], border_normal=colors['black1'],
# Toggle between the two most recently used groups # TODO :: Write my own version of this that has the same # screen preserving behaviour ("M-<Tab>", lazy.screen.next_group()), ("M-S-<Tab>", lazy.screen.prev_group()), # Close the current window: NO WARNING! ("A-<F4>", lazy.window.kill()), ("A-<Tab>", lazy.layout.next()), ("A-S-<Tab>", lazy.layout.prev()), # .: Sys + Utils :. # # Restart qtile in place and pull in config changes (check config before # doing this with `check-qtile-conf` script to avoid crashes) ("M-<F5>", lazy.restart()), # Shut down qtile. ("M-<Escape>", lazy.shutdown()), ("M-A-l", lazy.spawn("lock-screen")), ("M-A-s", lazy.spawn("screenshot")), ("M-A-<Delete>", lazy.spawn(script("power-menu.sh"))), # Acme editor shortcuts ("M-o", lazy.spawn(os.path.join(ACME_SCRIPT_DIR, "afindfile.sh"))), ("M-s", lazy.spawn( os.path.join(ACME_SCRIPT_DIR, "acme-fuzzy-window-search.sh"))), ] ] keys.extend([ # Brightness Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +2%")), Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 2%-")),
# Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key( [mod, "control"], "Return", lazy.layout.toggle_split() ), Key([mod, "shift"], "Return", lazy.spawn("sakura")), Key([mod], "Tab", lazy.screen.togglegroup()), # Toggle between different layouts as defined below Key([mod], "l", lazy.next_layout()), Key([mod, "shift"], "c", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "r", lazy.spawncmd()), Key([mod, "shift"], "t", lazy.spawn("subl3")), Key([mod, "shift"], "w", lazy.spawn("vivaldi")), Key([mod, "shift"], "v", lazy.spawn("volume")), Key([mod, "shift"], "i", lazy.spawn("eog")), Key([mod, "shift"], "l", lazy.spawn("libreoffice")), Key([mod, "shift"], "g", lazy.spawn("speedcrunch")), Key([mod, "shift"], "h", lazy.spawn("sakura -e mc")), ] groups = [ Group("term1", spawn="sakura -x .fig"), Group("term2"),
def init_keys(self): return [ Key('M-j', lazy.layout.down()), Key('M-k', lazy.layout.up()), Key('M-h', lazy.layout.left()), Key('M-l', lazy.layout.right()), Key('M-S-j', lazy.layout.shuffle_down()), Key('M-S-k', lazy.layout.shuffle_up()), Key('M-S-h', lazy.layout.swap_left()), Key('M-S-l', lazy.layout.swap_right()), Key('A-<Tab>', lazy.next_layout()), Key('M-q', lazy.window.kill()), Key('A-S-r', lazy.spawn("termite --name ranger -e '/usr/bin/tmux new -A -s ranger ranger'")), Key('M-e', lazy.spawn("termite")), Key('M-S-r', lazy.restart()), Key('M-b', lazy.hide_show_bar("all")), Key('M-S-q', lazy.shutdown()), Key("M-r", lazy.spawncmd()), Key('M-a', decrease_master_volume), Key('M-f', increase_master_volume), Key('M-s', decrease_mpd_volume), Key('M-d', increase_mpd_volume), Key('M-v', projectm_toggle), ] + [ Key('A-{}'.format(i), lazy.group[group.name].toscreen()) for i, group in zip((1, 2, 3, 4, 9), self.groups) ] + [ Key('A-S-{}'.format(i), lazy.window.togroup(group.name)) for i, group in zip((1, 2, 3, 4, 9), self.groups) ]