def init_keys(): 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()), # Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next()), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate()), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes Key([mod, "shift"], "Return", lazy.layout.toggle_split()), Key([mod], "Return", lazy.spawn("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], "l", lazy.spawn("/usr/bin/light-locker-command -l")), Key([mod], "r", lazy.spawncmd()), ] 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.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 conf(groups=None, mod=None): keys = [ Key([mod], "Up", lazy.group.next_window()), Key([mod], "Down", lazy.group.prev_window()), Key([mod], "Right", lazy.screen.next_group()), Key([mod], "Left", lazy.screen.prev_group()), Key([mod], "period", lazy.next_screen()), Key([mod], "comma", lazy.prev_screen()), Key([mod, "shift"], "Up", lazy.layout.increase_ratio()), Key([mod, "shift"], "Down", lazy.layout.decrease_ratio()), Key([mod], "equal", lazy.layout.increase_nmaster()), Key([mod], "minus", lazy.layout.decrease_nmaster()), Key([mod, "shift"], "Return", lazy.layout.shift()), Key([mod], "b", lazy.hide_show_bar()), Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod], "s", lazy.group.setlayout("max")), Key([mod], "t", lazy.group.setlayout("mastertile")), Key([mod], "space", lazy.next_layout()), Key([mod], "Tab", lazy.screen.togglegroup()), Key([mod], "c", lazy.window.kill()), Key([mod], "r", lazy.spawncmd()), Key([mod], "x", lazy.spawn("xautolock -locknow")), Key([mod], "Return", lazy.spawn("termite")), Key([], "XF86KbdBrightnessUp", lazy.spawn("kbdlight up 10")), Key([], "XF86KbdBrightnessDown", lazy.spawn("kbdlight down 10")), Key(["shift"], "XF86KbdBrightnessUp", lazy.spawn("kbdlight max")), Key(["shift"], "XF86KbdBrightnessDown", lazy.spawn("kbdlight set 0")), Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight +5")), Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -5")), Key(["shift"], "XF86MonBrightnessUp", lazy.spawn("xbacklight =100")), Key(["shift"], "XF86MonBrightnessDown", lazy.spawn("xbacklight =0")), Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")), Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")), Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ 1")), Key(["shift"], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ 0")), Key([], "XF86AudioNext", lazy.spawn("mpc next")), Key([], "XF86AudioPrev", lazy.spawn("mpc prev")), Key([], "XF86AudioPlay", lazy.spawn("mpc toggle")), Key([], "XF86AudioPause", lazy.spawn("mpc toggle")), # Key([], "XF86LaunchA", ), # Key([], "XF86LaunchB", ), Key([mod, "shift"], "q", lazy.restart()), ] 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.toggle_floating()), ] for index, grp in enumerate(groups): keys.append(Key([mod], str(index + 1), lazy.group[grp.name].toscreen())) keys.append(Key([mod, "shift"], str(index + 1), lazy.window.togroup(grp.name))) return (keys, mouse)
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(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_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 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 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 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(): return [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.layout.previous()), Key([mod, "shift"], "Tab", lazy.layout.next()), 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], "r", lazy.spawncmd()), Key([mod, "shift"], "c", lazy.window.kill()), Key([mod], "Return", lazy.spawn(term)), Key([mod], "l", lazy.spawn(lock)), Key([mod, "control"], "r", lazy.restart())]
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.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 = [ # 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
# 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()), # Spawn terminal Key([MOD], "Return", lazy.spawn(TERMINAL)), # Toggle between different layouts as defined below Key([MOD], "Tab", lazy.next_layout()), Key([MOD], "w", lazy.window.kill()), Key([MOD, "control"], "r", lazy.restart()), Key([MOD, "control"], "q", lazy.shutdown()), Key([MOD], "r", lazy.spawncmd()), # Spawn bmenu Key([MOD, "control"], "b", lazy.spawn(f"{TERMINAL} -e bmenu")), # Spawn dmenu_run Key([MOD], "c", lazy.spawn("dmenu_run")), # Spawn morce_menu Key([MOD], "z", lazy.spawn("morc_menu")), # Spawn browser Key([MOD], "b", lazy.spawn(BROWSER)), # Spawn File Manager Key([MOD], "F3", lazy.spawn(FILEMANAGER)),
def init_keys(): mod = "mod4" keys = [ Key([mod], "j", lazy.layout.down()), Key([mod], "k", lazy.layout.up()), Key([mod], "h", lazy.layout.left()), Key([mod], "l", lazy.layout.right()), Key([mod, "shift"], "j", lazy.layout.shuffle_down()), Key([mod, "shift"], "k", lazy.layout.shuffle_up()), Key([mod, "shift"], "h", lazy.layout.shuffle_left()), Key([mod, "shift"], "l", lazy.layout.shuffle_right()), Key([mod, "mod1"], "j", lazy.layout.flip_down()), 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([mod, "shift"], "n", lazy.layout.normalize()), Key([mod], "space", lazy.layout.toggle_split()), # Switch between windows in current stack pane #Key([mod], "j", lazy.layout.down()), #Key([mod], "k", lazy.layout.up()), # Move windows up or down in current stack #Key([mod, "control"], "j", lazy.layout.shuffle_down()), #Key([mod, "control"], "k", lazy.layout.shuffle_up()), # Switch window focus to other pane(s) of stack #Key([mod], "space", lazy.layout.next()), # Swap panes of split stack #Key([mod, "shift"], "space", lazy.layout.rotate()), # Toggle between split and unsplit sides of stack. # Split = all windows displayed # Unsplit = 1 window displayed, like Max layout, but still with # multiple stack panes #Key([mod, "shift"], "Return", lazy.layout.toggle_split()), # Open terminal Key([mod], "Return", lazy.spawn(terminal)), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout()), # Kill active window Key([mod, "shift"], "c", lazy.window.kill()), # Restart Qtile Key([mod, "control"], "r", lazy.restart()), # Shutdown Qtile Key([mod, "control"], "q", lazy.shutdown()), # Lock Qtile Key([mod, "control"], "p", lazy.spawn("i3lock -c 1d1f21")), # Suspend Qtile Key([mod, "control"], "x", lazy.spawn("/home/rschwalk/dotfiles/scripts/lock_suspend.sh")), Key([ mod, ], "d", lazy.spawn( "dmenu_run -fn 'Source Code Pro:size=12' -nb '#1d1f21' -nf '#b5bd68' -sb '#81a2be' -sf '#1d1f21' -p 'dmenu:'" )), Key([mod], "r", lazy.spawncmd()), Key([mod], "F5", lazy.spawn("firefox")), Key([mod], "F6", lazy.spawn("thunar")), Key([mod], "F11", lazy.spawn("rofi -show run -fullscreen")), Key([mod], "F12", lazy.spawn("rofi -show run")), Key([mod, "shift"], "F12", lazy.spawn("rofi -show window")), # Keyboard focus screen(0) Key([mod], "w", lazy.to_screen(1)), # Keyboard focus screen(1) Key([mod], "e", lazy.to_screen(0)), #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"], "f", lazy.window.toggle_floating() # Toggle floating ), Key( [], "XF86AudioRaiseVolume", lazy.spawn("amixer -q set Master 2%+") # Volume up ), Key( [], "XF86AudioLowerVolume", lazy.spawn("amixer -q set Master 2%-") # Volume down ), Key( [], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle") # Mute volume ), ] return keys
# .: BSP :. # ("M-<period>", lazy.layout.toggle_split()), ("M-A-<Up>", lazy.layout.flip_up()), ("M-A-<Down>", lazy.layout.flip_down()), ("M-A-<Left>", lazy.layout.flip_left()), ("M-A-<Right>", lazy.layout.flip_right()), # .: Program Launchers :. # ("M-<Return>", lazy.spawn(TERMINAL)), ("M-<semicolon>", lazy.spawn('rofi-apps')), ("M-d", lazy.spawn( "dmenu_run -b -p 'λ' -sb '#83a598' -nb '#504945' -nf '#ebdbb2'")), ("M-n", lazy.spawn('rofi-wifi-menu')), ("M-r", lazy.spawncmd()), # Quick execution of shell commands ("M-w", lazy.spawn('rofi -show window')), ("M-C-a", lazy.spawn("acme")), ("M-C-c", lazy.spawn("chromium-browser")), ("M-C-e", lazy.spawn("emacs")), ("M-C-f", lazy.spawn("firefox")), ("M-C-i", lazy.spawn("python3.6 -m qtconsole")), ("M-C-S-i", lazy.spawn("python3.7 -m qtconsole")), ("M-C-r", lazy.spawn(TERMINAL + ' -e "ranger"')), ("M-C-t", lazy.spawn("thunar")), ("M-C-w", lazy.spawn(TERMINAL + ' -e "weechat"')), # Scratchpad toggles ("M-<slash>", lazy.group['scratchpad'].dropdown_toggle('term')), ("M-S-<slash>", lazy.group['scratchpad'].dropdown_toggle('ipython')), # ("M-<slash>", lazy.window.function(to_scratchpad)),
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
# 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("urxvt")), Key([mod], "r", lazy.spawn("rofi -combi window drun run -show combi")), # 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()), # Key([mod, "control"], "r", lazy.restart()), # Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "c", lazy.spawncmd()), # mod + c ] 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()), # mod1 + shift + letter of group = switch to & move focused window to group Key([mod, "shift"], i.name, lazy.window.togroup(i.name)), ]) layouts = [ layout.MonadWide(),
), # Launching applications # web browser Key([mod], "n", lazy.spawn("google-chrome")), # IRC Chat application Key( [mod], "i", lazy.spawn("~/bin/chat") ), # Terminal Application Key([mod], "Return", lazy.spawn("/usr/bin/urxvt")), # Application Launcher Key([mod], "space", lazy.spawn( "dmenu_run -fn 'Terminus:size=8' -nb '#000000' -nf '#fefefe'")), # Qtile application launcher Key([mod], "r", lazy.spawncmd(prompt=':')), Key([], "Print", lazy.spawn("scrot")), # Change the volume if our keyboard has keys 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") ),
Key([mod, "shift"], "Left", lazy.layout.flip_left()), Key([mod, "shift"], "Right", lazy.layout.flip_right()), Key([mod, "control"], "Down", lazy.layout.grow_down()), Key([mod, "control"], "Up", lazy.layout.grow_up()), Key([mod, "control"], "Left", lazy.layout.grow_left()), Key([mod, "control"], "Right", lazy.layout.grow_right()), Key([mod, "control"], "n", lazy.layout.normalize()), Key([mod], "space", lazy.layout.toggle_split()), # Window hotkeys Key([mod], "f", lazy.window.toggle_fullscreen()), #default Key([mod, "shift"], "f", lazy.window.toggle_floating()), #default Key([mod, "shift"], "k", lazy.window.kill()), # Spec hotkeys Key([mod], "Return", lazy.spawncmd()), # Apps hotkeys Key([mod], "t", lazy.spawn("terminator")), Key([mod], "w", lazy.spawn("google-chrome-stable")), Key([mod], "c", lazy.spawn("terminator -e \"nano -w ~/.config/qtile/config.py\"")), # System hotkeys Key([], "Print", lazy.spawn("scrot -e 'mv $f /home/user/screenshots/'")), Key([mod, "shift", "control"], "h", lazy.spawn("sudo systemctl hibernate")), Key([mod, "shift", "control"], "r", lazy.restart()), Key([mod, "shift", "control"], "q", lazy.shutdown()), Key([mod], "u", lazy.spawn(
Key([MOD, 'control'], 'r', lazy.restart()), Key([MOD, 'control'], 'q', lazy.shutdown()), ## Window Controls Key([MOD], 'q', 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)), Key([MOD], 'Return', lazy.spawn('urxvt')), Key([MOD], 'n', lazy.spawn('chromium')), Key([MOD], 'r', lazy.spawncmd(prompt=':')), ## Layout, group, and screen modifiers Key([MOD], 'k', lazy.layout.up()), Key([MOD], 'j', lazy.layout.down()), #Key([MOD, 'shift'], 'j', lazy.layout.shuffle_up()), #Key([MOD, 'shift'], 'k', lazy.layout.shuffle_down()), #Key([MOD, 'shift'], 'g', lazy.layout.grow()), #Key([MOD, 'shift'], 's', lazy.layout.shrink()), #Key([MOD, 'shift'], 'n', lazy.layout.normalize()), #Key([MOD, 'shift'], 'm', lazy.layout.maximize()), #Key([MOD, 'shift'], 'space', lazy.layout.flip()), Key([MOD], 'h', lazy.layout.previous()), Key([MOD], 'l', lazy.layout.next()), Key([ALT], 'Tab', lazy.nextlayout()),
([mod, "control"], "q", lazy.shutdown()), # Swap panes of split stack ([mod, "shift"], "space", lazy.layout.rotate()), ([mod, "shift"], "Return", lazy.layout.toggle_split()), # ------------ Apps Configs ------------ ([mod], "w", lazy.window.kill()), ([mod], "q", lazy.spawn("rofi-apps")), ([mod], "o", lazy.spawn("ms-office-online")), ([mod], "t", lazy.spawn("teams")), ([mod], "e", lazy.spawn("goneovim")), ([mod], "i", lazy.spawn("kitty")), ([mod], "r", lazy.spawncmd("picom --experimental-backends &")), # ------------ Hardware Configs ------------ # Volume ([], "XF86AudioLowerVolume", lazy.spawn( "pactl set-sink-volume @DEFAULT_SINK@ -5%" )), ([], "XF86AudioRaiseVolume", lazy.spawn( "pactl set-sink-volume @DEFAULT_SINK@ +5%" )), ([], "XF86AudioMute", lazy.spawn( "pactl set-sink-mute @DEFAULT_SINK@ toggle" )), #Brightness ([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")),
# 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 KeyNode([mod4, "shift"], "Return", [], lazy.layout.toggle_split()), KeyNode([mod4], "Return", [], lazy.spawn("urxvt")), # Toggle between different layouts as defined below KeyNode([mod4], "space", [], lazy.next_layout()), # Restart or quit qtile KeyNode([mod4, "control"], "r", [], lazy.restart()), KeyNode([mod4, "control"], "q", [], lazy.shutdown()), # Launch a command KeyNode([mod4], "r", [], lazy.spawncmd()), # toggle visibiliy of above defined DropDown named "term" KeyNode([mod4], 'z', [], lazy.group['scratchpad'].dropdown_toggle('term')), # Lock the screensaver (password) KeyNode([mod4], "F12", [], lazy.function(lock)), # Change the volume if our keyboard has keys KeyNode([], "XF86AudioRaiseVolume", [], lazy.spawn("amixer -c 0 -q set Master 2dB+")), KeyNode([], "XF86AudioLowerVolume", [], lazy.spawn("amixer -c 0 -q set Master 2dB-")), KeyNode([], "XF86AudioMute", [], lazy.spawn("amixer -c 0 -q set Master toggle")), )
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()), Key([MODKEY], 'w', lazy.prev_screen()), Key([MODKEY], 'e', lazy.next_screen()), Key([WIN], '1', lazy.to_screen(0)), Key([WIN], '2', lazy.to_screen(1)), Key([WIN], '3', lazy.to_screen(2)),
def init_keys(self): """""" keys = [ # Qtile commands Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod, "control"], "t", self.change_theme), # 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()), # Resize panels Key([mod], "o", lazy.layout.shrink()), Key([mod], "p", lazy.layout.grow()), # Switch window focus to other pane(s) of stack Key([mod], "Right", lazy.layout.next()), Key([mod], "Left", lazy.layout.previous()), # # 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()), # Terminal Key([mod], "Return", lazy.spawn(TERMINAL)), # Toggle between different layouts # Key([mod], "space", lazy.nextlayout()), Key([mod, "shift"], "Right", lazy.next_layout()), Key([mod, "shift"], "Left", lazy.prev_layout()), # Close window Key([mod, "shift"], "w", lazy.window.kill()), # Launch comands Key([mod], "r", lazy.spawncmd()), Key([mod], "space", lazy.spawncmd()), # Maximize window Key([mod, "shift"], "Up", lazy.window.toggle_floating()), # Full screen Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod], "h", self.turn_off_monitor), # Multimedia Key([], "XF86AudioMute", lazy.spawn(VOLUME_MUTE)), Key([], "XF86AudioLowerVolume", lazy.spawn(VOLUME_DOWN)), Key([], "XF86AudioRaiseVolume", lazy.spawn(VOLUME_UP)), Key([], "XF86MonBrightnessDown", lazy.spawn(BRIGHTNESS_DOWN)), Key([], "XF86MonBrightnessUp", lazy.spawn(BRIGHTNESS_UP)), Key([], "XF86AudioNext", lazy.spawn(AUDIO_NEXT)), Key([], "XF86AudioPrev", lazy.spawn(AUDIO_PREV)), Key([], "XF86AudioPlay", lazy.spawn(AUDIO_PLAY)), # Move window between groups Key([mod, "control", "shift"], "Left", self.window_to_prev_group), Key([mod, "control", "shift"], "Right", self.window_to_next_group), # Change window focus Key([mod, "control"], "Left", self.to_prev_group), Key([mod, "control"], "Right", self.to_next_group), # Change wallpaper #Key([mod], "y", self.change_wallpaper), #Key([mod, "shift", "control"], "l", lazy.layout.grow_right()), #Key([mod, "shift"], "l", lazy.layout.shuffle_right()), #Key([mod, "shift", "control"], "h", lazy.layout.grow_left()), #Key([mod, "shift"], "h", lazy.layout.shuffle_left()), #Key([mod], "s", lazy.layout.toggle_split()), ] return keys
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()), Key([mod], "p", lazy.spawn('rofi -show drun')), # 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
# multiple stack panes Key([mod, "shift"], "Return", lazy.layout.toggle_split()), # Utils # Key(['control'], "Escape", lazy.spawn('xterm -rv')), Key([mod], "Escape", lazy.spawn('terminology')), Key(['control'], "Escape", lazy.spawn('yakuake')), # Toggle between different layouts as defined below Key([mod], "space", lazy.next_layout()), Key(['mod1'], "q", lazy.window.kill()), Key(['control'], "q", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key(["control"], "space", lazy.spawncmd()), # Function keys Key([], 'XF86MonBrightnessUp', lazy.spawn("xbacklight -inc 5")), Key([], 'XF86MonBrightnessDown', lazy.spawn("xbacklight -dec 5")), Key([], 'XF86AudioRaiseVolume', lazy.spawn("pamixer -i 5")), Key([], 'XF86AudioLowerVolume', lazy.spawn("pamixer -d 5")), Key([], 'XF86AudioMute', lazy.spawn("pamixer -m")), Key([mod], 'XF86AudioMute', lazy.spawn("pamixer -u")), ] groups = [Group(i) for i in '12345'] for i in groups: # ctrl + Fn of group = switch to group keys.append(
# Change/modify layouts Key([mod], "grave", lazy.next_layout()), Key([mod, "control"], "Left", lazy.layout.increase_ratio()), Key([mod, "control"], "Right", lazy.layout.decrease_ratio()), # Modify current window Key([mod], "q", lazy.window.kill()), Key([mod, "control"], "f", lazy.window.toggle_fullscreen()), Key([mod, "control"], "Tab", lazy.window.toggle_floating()), Key([mod, "control"], "g", lazy.window.toggle_maximize()), # Qtile system commands Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "space", lazy.spawncmd()), # Audio control Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")), Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")), Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")), # Media control Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")), Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")), Key([], "XF86AudioNext", lazy.spawn("playerctl next")), # Brightness control Key([], "XF86MonBrightnessDown", lazy.spawn("sudo xbacklight -set 1")),
def inkscape_dialogues(window): if ((window.window.get_name() == 'Create new database')): window.floating = True # Super_L (the Windows key) is typically bound to mod4 by default, so we use # that here. mod = "mod4" alt = "mod1" myTerm = "alacritty" keys = [ ##ALT--USED FOR NAV ##########USING ALT############### #Reserved for changing layouts Key([alt], "q", lazy.window.kill()), Key([alt], "o", lazy.spawncmd()), Key([alt], "j", lazy.layout.up(), desc='Move focus up in current stack pane'), Key([alt], "h", lazy.layout.grow(), lazy.layout.increase_nmaster(), desc='Expand window (MonadTall), increase number in master pane (Tile)' ), Key([alt], "l", lazy.layout.shrink(), lazy.layout.decrease_nmaster(), desc='Shrink window (MonadTall), decrease number in master pane (Tile)'
# 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("stterm -f 'FiraMono Nerd Font-14'")), Key([mod], "Return", lazy.spawn("gnome-terminal")), # Toggle between different layouts as defined below #Key([mod], "Tab", lazy.next_layout()), Key([mod], "grave", lazy.next_layout()), Key([mod], "w", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod, "shift"], "r", lazy.spawncmd()), Key([mod], "r", lazy.spawn("rofi -show run")) ] groups = [Group(i) for i in "123456789"] for i in groups: # mod1 + letter of group = switch to group keys.append(Key([mod], i.name, lazy.group[i.name].toscreen())) # mod1 + shift + letter of group = switch to & move focused window to group keys.append(Key([mod, "shift"], i.name, lazy.window.togroup(i.name))) layout_theme = { "border_width": 2, "margin": 6,
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()), ] )
# 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], "h", # lazy.to_screen(1)), # Key([mod], "l", # lazy.to_screen(0)), # Launch specific applications Key([mod], "Return", lazy.spawn("terminator")), Key([mod], "w", lazy.spawn("firefox")), Key([mod], "r", lazy.spawncmd()), # Toggle between different layouts as defined below Key([mod], "space", lazy.nextlayout()), Key([mod], "f", lazy.window.toggle_fullscreen()), Key([mod, "control"], "space", lazy.window.toggle_floating()), Key([mod], "m", lazy.window.toggle_maximize()), Key([mod], "n", lazy.window.toggle_minimize()), # Move between groups
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')), Key([mod], 'z', lazy.window.togroup()), Key([mod], 'b', lazy.spawn('bash -c "/home/filipe/local/bin/backlight_off"')), Key([mod, alt], "Down", lazy.layout.down()), Key([mod, alt], "Up", lazy.layout.up()), Key([mod, alt], "Left", lazy.layout.client_to_next()), Key([mod, alt], "Right", lazy.layout.client_to_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, "shift"], "Return", lazy.layout.toggle_split() ), Key([mod], "Return", lazy.spawn("terminal")), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.nextlayout()), Key([mod], "w", lazy.window.kill()), Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "r", lazy.spawn("dmenu_run")), Key([mod, "shift"], "r", lazy.spawncmd()), ] groups = [Group("a"), Group('s', spawn='firefox-bin', layout='max', matches=[Match(wm_class=['Firefox', 'google-chrome', 'Google-chrome'])]), Group('d'), Group('f'), Group('u', matches=[Match(wm_class=['conky', 'Conky'])]), Group('i'), Group('o'), Group('p', matches=[Match(wm_class=['rhythmbox', 'Rhythmbox'])])] lazy.group['f'].setlayout('floating') auto_fullscreen = False
Key( [mod], "Return", lazy.spawn("/usr/bin/terminator") ), # Application Launcher Key( [mod], "d", #lazy.spawn("dmenu_run -fn 'Terminus:size=8' -nb '#000000' -nf '#fefefe'") lazy.spawn("~/.i3/everpad-note-launch/everpad_note_launch.py") ), # Qtile application launcher Key( [mod], "F2", lazy.spawncmd(prompt=':') ), # Change the volume if our keyboard has keys 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") ),
), Key( [mod], "w", lazy.window.kill() ), Key( [mod, "control"], "r", lazy.restart() ), Key( [mod, "control"], "q", lazy.shutdown() ), Key( [mod], "r", lazy.spawncmd() ), Key( [], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle") ), Key( [], "XF86AudioLowerVolume", lazy.spawn("amixer set Master 5%- unmute") ), Key( [], "XF86AudioRaiseVolume", lazy.spawn("amixer set Master 5%+ unmute") ), Key(
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()), Key([MODKEY], 'w', lazy.prev_screen()), Key([MODKEY], 'e', lazy.next_screen()), Key([WIN], '1', lazy.to_screen(0)), Key([WIN], '2', lazy.to_screen(1)), Key([WIN], '3', lazy.to_screen(2)),
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"]
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")), # Application bindings Key([sup], "Return", lazy.spawn("terminator")), Key([sup], "c", lazy.spawn("chromium")), Key([sup], "p", lazy.spawn("phpstorm")), Key([sup], "s", lazy.spawn("subl3")), ] defaultGroups = { 'chromium': 'web', 'firefox': 'web',
# 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"), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "w", lazy.window.kill(), desc="Kill focused window"), Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"), ] group_names = [("WWW", '6', { 'layout': 'monadtall' }), ("DEV", '7', { 'layout': 'monadtall' }), ("SYS", '8', { 'layout': 'monadtall' }), ("CHAT", '9', { 'layout': 'monadtall' }), ("MUS", '0', { 'layout': 'monadtall' })]
Key([mod], "slash", lazy.switchgroup()), # Key([mod], "r", lazy.spawncmd()), Key([mod], "r", lazy.spawn("rofi -show run")), # Pulse Audio controls Key([], "XF86AudioMute", lazy.spawn("amixer -D pulse sset Master toggle")), Key([], "XF86AudioLowerVolume", lazy.spawn("amixer -D pulse sset Master 5%-")), Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer -D pulse sset Master 5%+")), Key([], "XF86MonBrightnessUp", lazy.spawn('xbacklight -inc 10')), Key([], "XF86MonBrightnessDown", lazy.spawn('xbacklight -dec 10')), # keypad start apps Key([mod], "KP_Insert", lazy.spawncmd(), desc="cmd"), # Keypad 0 Key([mod], "KP_End", lazy.spawn('emacs'), desc="emacs"), # Keypad 1 Key([mod], "KP_Down", lazy.spawn(term + ' -e ranger'), desc="ranger"), # Keypad 2 Key([mod], "KP_Page_Down", lazy.spawn(term + ' -e htop')), # Keypad 3 Key([mod], "KP_Left", lazy.spawn('flatpak run im.gitter.Gitter')), # Keypad 4 Key([mod], "KP_Begin", lazy.spawn('slack')), # Keypad 5 Key([mod], "KP_Right", lazy.spawn(term + ' -e weechat')), # Keypad 6 Key([mod], "KP_Home", lazy.spawn('spotify')), # Keypad 7 Key([mod], "KP_Up", lazy.spawn(browser)), # Keypad 8 Key([mod], "KP_Page_Up", lazy.spawn('google-chrome')), # Keypad 9 # TODO make screenshot current window; # you can drag and draw the region to snap (use mouse) Key([mod], "Print",
altkey = "mod1" myTerm = "alacritty" # My terminal of choice myConfig = "/home/va/.config/qtile/config.py" # The Qtile config file location keys = [ # The essentials Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'), Key([mod, "shift"], "Return", lazy.spawn("rofi -show drun"), desc='Dmenu Run Launcher'), Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'), Key([mod, "shift"], "c", lazy.window.kill(), desc='Kill active window'), Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'), Key([mod, "shift"], "q", lazy.shutdown(), desc='Shutdown Qtile'), Key([ctrl, altkey], "Delete", lazy.spawn("xkill"), desc='Doom Emacs'), Key([mod], "r", lazy.spawncmd(), desc='Keyboard focus to monitor 3'), # Treetab controls Key([mod, "control"], "k", lazy.layout.section_up(), desc='Move up a section in treetab'), Key([mod, "control"], "j", lazy.layout.section_down(), desc='Move down a section in treetab'), # Window controls Key([mod], "k", lazy.layout.down(), desc='Move focus down in current stack pane'), Key([mod],
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 [ # ------------ WINDOW CONFIGS ------------ # Switch between windows in current stack pane Key([mod], "j", lazy.layout.down()), Key([mod], "k", lazy.layout.up()), Key([mod], "h", lazy.layout.left()), Key([mod], "l", lazy.layout.right()), # Change window sizes (MonadTall) Key([mod, "shift"], "l", lazy.layout.grow()), Key([mod, "shift"], "h", lazy.layout.shrink()), # Toggle floating Key([mod, "shift"], "f", lazy.window.toggle_floating()), # Move windows up or down in current stack Key([mod, "shift"], "j", lazy.layout.shuffle_down()), Key([mod, "shift"], "k", lazy.layout.shuffle_up()), # Toggle between different layouts as defined below Key([mod], "Tab", lazy.next_layout()), # Kill window Key([mod], "w", lazy.window.kill()), # Restart Qtile Key([mod, "control"], "r", lazy.restart()), Key([mod, "control"], "q", lazy.shutdown()), Key([mod], "r", lazy.spawncmd()), # Switch window focus to other pane(s) of stack Key([mod], "space", lazy.layout.next()), # Swap panes of split stack Key([mod, "shift"], "space", lazy.layout.rotate()), # ------------ APPS CONFIG ------------ # Menu Key([mod], "m", lazy.spawn("rofi -show run")), # Window Nav Key([mod, "shift"], "m", lazy.spawn("rofi -show")), # Browser Key([mod], "b", lazy.spawn("firefox")), # File Manager Key([mod], "f", lazy.spawn("thunar")), # Terminal Key([mod], "Return", lazy.spawn("alacritty")), # Redshift Key([mod], "r", lazy.spawn("redshift -O 2400")), Key([mod, "shift"], "r", lazy.spawn("redshift -x")), # ------------ HARDWARE CONFIG ------------ # 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([MOD], "Return", lazy.spawn("~/bin/x")), Key([MOD], "Return", lazy.spawn("terminator -p tango")), #Key([MOD], "Tab", lazy.nextlayout()), Key([MOD], "space", lazy.nextlayout()), Key([MOD, 'shift'], "space", lazy.prevlayout()), Key([MOD], "Tab", lazy.group.next_window()), Key([MOD, 'shift'], "Tab", lazy.group.prev_window()), Key([MOD, 'shift'], "c", lazy.window.kill()), Key([MOD], "f", lazy.window.toggle_floating()), Key([MOD], "m", lazy.window.toggle_minimize()), Key([MOD], "x", lazy.window.toggle_maximize()), Key([MOD], "u", lazy.window.toggle_fullscreen()), #Key([MOD], "[", lazy.window.move_floating(-10,0)), #Key([MOD], "]", lazy.window.move_floating(10,0)), Key([MOD, 'shift'], "r", lazy.restart()), Key([MOD], "p", lazy.spawncmd()), #Key([MOD, 'shift'], "Down", lazy.window.down_opacity()), Key([MOD], "z", lazy.window.down_opacity()), Key([MOD], "downarrow", lazy.window.down_opacity()), #Key([MOD, 'shift'], "Up", lazy.window.up_opacity()), Key([MOD], "a", lazy.window.up_opacity()), # The bindings below control Amarok, and my sound volume. Key( [MOD, "shift"], "k", lazy.spawn("amixer -c 1 -q set Speaker 2dB+") ), Key( [MOD, "shift"], "j", lazy.spawn("amixer -c 1 -q set Speaker 2dB-")
import subprocess wmname = 'qtile' mod = 'mod4' alt = 'mod1' term = "gnome-terminal" lock = "i3lock -efb -c333333" # Key bindings keys = [ # Window manager controls Key([mod, 'control'], 'r', lazy.restart()), Key([mod, 'control'], 'q', lazy.shutdown()), Key([mod], 'Return', lazy.spawn("termite -e tmux")), Key([mod], 'w', lazy.window.kill()), Key([alt], 'F2', lazy.spawncmd()), Key([mod], "Tab", lazy.group.next_window()), Key([mod], 'Left', lazy.screen.prev_group()), Key([mod], 'Right', lazy.screen.next_group()), # Layout modification Key([mod, 'control'], 'space', lazy.window.toggle_floating()), # Switch between windows in current stack pane Key([mod, alt], "Up", lazy.layout.down()), Key([mod, alt], "Down", lazy.layout.up()), Key([mod, alt], "Left", lazy.layout.left()), Key([mod, alt], "Right", lazy.layout.right()), # Move windows up or down in current stack
Key([mod], "space", lazy.nextlayout()), Key([mod, "shift"], "Return", lazy.layout.toggle_split()), # add/remove layout parts Key([mod, "shift"], "v", lazy.layout.add()), Key([mod, "control"], "v", lazy.layout.remove()), # size Key([mod, "shift"], "Right", lazy.layout.increase_ratio()), Key([mod, "shift"], "Left", lazy.layout.decrease_ratio()), Key([mod], "w", lazy.window.kill()), Key([mod], "F2", lazy.spawn( "dmenu_run -p run -fn 'terminous-13' -nb '#202020' -nf '#ffffff'")), Key([mod], "r", lazy.spawncmd("Run:")), # imgbin/pastebin Key([mod], "s", lazy.spawn("imgurscropt all edit")), Key([mod, 'shift'], "s", lazy.spawn("imgurscropt window edit")), Key([mod], "p", lazy.spawn("paste_clipboard")), Key([mod, 'shift'], "p", lazy.spawn("paste_clipboard bash")), Key([mod], "z", lazy.spawn("scroting")), #Key([mod, 'shift'], "z", lazy.spawn("scroting window")), # suspend Key([mod, 'shift'], "z", lazy.spawn( "dbus-send --dest=org.freedesktop.PowerManagement "\ "/org/freedesktop/PowerManagement "\ "org.freedesktop.PowerManagement.Suspend")),
lazy.spawn("~/bin/chat") ), # Terminal Application Key( [mod], "Return", lazy.spawn("urxvt") ), # Application Launcher Key( [mod], "space", lazy.spawn("dmenu_run -fn 'Terminus:size=8' -nb '#000000' -nf '#fefefe'") ), # Qtile application launcher Key( [mod], "F2", lazy.spawncmd(prompt='Run') ), Key( [mod], "F3", lazy.spawn("dolphin") ), # Change the volume if our keyboard has keys Key( [], "XF86AudioRaiseVolume", lazy.spawn("amixer -c 0 -q set Master 2dB+") ), Key( [], "XF86AudioLowerVolume", lazy.spawn("amixer -c 0 -q set Master 2dB-") ),
# 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"), Group("term3"),
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('🔈'), widget.Volume(cardid=1, device=None, update_interval=0.2),
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")) ]
Key([mod], "l", lazy.group.nextgroup()), Key([mod], "k", lazy.layout.down()), Key([mod], "j", lazy.layout.up()), Key([mod], "f", lazy.window.toggle_floating()), # layout stuff Key([mod, "shift"], "f", lazy.window.toggle_fullscreen()), Key([mod], "space", lazy.nextlayout()), Key([mod], "Tab", lazy.layout.previous()), Key([mod, "shift"], "Tab", lazy.layout.next()), Key([mod, "shift"], "space", lazy.layout.rotate()), Key([mod, "shift"], "Return", lazy.layout.toggle_split()), Key([mod, "shift"], "Right", lazy.layout.increase_ratio()), Key([mod, "shift"], "Left", lazy.layout.decrease_ratio()), Key([mod], "w", lazy.window.kill()), Key([mod], "F2", lazy.spawn("dmenu_run -p run -fn 'terminous-13' -nb '#202020' -nf '#ffffff'")), Key(["mod4"], "r", lazy.spawncmd("Run:")), Key([mod], "s", lazy.spawn("imgurscropt")), Key([mod, "shift"], "s", lazy.spawn("imgurscropt window")), Key([mod], "p", lazy.spawn("/home/roger/local/bin/paste_clipboard")), Key([mod, "shift"], "p", lazy.spawn("paste_clipboard bash")), Key([mod], "z", lazy.spawn("scroting")), # Key([mod, 'shift'], "z", lazy.spawn("scroting window")), # Suspend Key( [mod, "shift"], "z", lazy.spawn( "dbus-send --dest=org.freedesktop.PowerManagement " "/org/freedesktop/PowerManagement " "org.freedesktop.PowerManagement.Suspend" ),
keys = [ 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'))),
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
lazy.layout.maximize()), Key([sup, shift], "space", lazy.layout.flip()), #Key([sup], "space", #lazy.layout.next()), #Key([sup, shift], "space", #lazy.layout.rotate()), #Key([sup, shift], "Return", #lazy.layout.toggle_split()), # Lauchers Key([sup, shift], "Return", lazy.spawn(terminal)), Key([sup], 'p', lazy.spawncmd(prompt='% ')), # Multimedia Key([sup], 'equal', lazy.spawn(home + "/bin/volume.sh up")), Key([sup], 'minus', lazy.spawn(home + "/bin/volume.sh down")), Key([sup], '0', lazy.spawn(home + "/bin/volume.sh mute")), Key([], 'XF86AudioRaiseVolume', lazy.spawn(home + "/bin/volume.sh up")), Key([], 'XF86AudioLowerVolume', lazy.spawn(home + "/bin/volume.sh down")), Key([], 'XF86AudioMute', lazy.spawn(home + "/bin/volume.sh mute")), Key([sup], "F7",
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) ]