예제 #1
0
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
예제 #2
0
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)
예제 #3
0
파일: config.py 프로젝트: Jdaco/dotfiles
    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
        ]
예제 #4
0
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
예제 #5
0
 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
예제 #6
0
    # Swap panes of split stack
    Key([mod, "shift"], "space", lazy.layout.rotate()),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    # Key([mod], "Return", lazy.spawn("xterm")),
    Key([mod], "Return", lazy.spawn("st")),
    Key([mod], "c", lazy.spawn("chromium")),
    # Key([mod], "b", lazy.spawn("feh --bg-scale ~/Pictures/cheatsheet-big.png")),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),
    Key([mod], "w", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
]

# groups = [Group(i) for i in "asdfuiop"]
groups = [Group(i) for i in "12345678"]

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
예제 #7
0
    ("M-C-p", lazy.spawn("peek")),
    ("M-C-r", lazy.spawn(TERMINAL + ' -e "ranger"')),
    ("M-C-t", lazy.spawn("thunar")),
    ("M-C-v", lazy.spawn(TERMINAL + ' -e "nvim"')),
    ("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)),
    # ("M-S-<slash>", lazy.function(show_scratchpad)),

    # .: Layout / Focus Manipulation :. #
    ("M-f", lazy.window.toggle_fullscreen()),
    # Toggle between the available layouts.
    ("M-<grave>", lazy.next_layout()),
    ("A-<grave>", lazy.prev_layout()),
    # Switch focus between two screens
    ("M-<bracketleft>", lazy.to_screen(0)),
    ("M-<bracketright>", lazy.to_screen(1)),
    # Move the focused group to one of the screens and follow it
    ("M-S-<bracketleft>", switch_screens(0), lazy.to_screen(0)),
    ("M-S-<bracketright>", switch_screens(1), lazy.to_screen(1)),
    # 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.toggle_group()),
    # Close the current window: NO WARNING!
    ("M-S-q", lazy.window.kill()),
    ("M-S-<BackSpace>", lazy.window.kill()),
예제 #8
0
    # 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("urxvt")),
    Key(["shift"], "Return", lazy.spawn("xterm")),
    # Toggle between different layouts as defined below
    Key([mod], "t", lazy.next_layout()),
    Key([mod], "w", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
]

groups = [Group(i) for i in "asdfuiop"]

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)),
    ])
예제 #9
0
    Key('M-<Right>', lazy.screen.next_group(skip_managed=True)),

    Key('M-S-<Left>',  window_to_prev_group()),
    Key('M-S-<Right>', window_to_next_group()),

    Key('M-C-<space>', lazy.window.toggle_floating()),
    Key('M-s', lazy.window.toggle_fullscreen()),

    # Programs
    Key('M-a', lazy.spawn(TERMINAL)),
    Key('M-f', lazy.spawn('firefox')),
    Key('M-t', lazy.spawn('nautilus --no-desktop')),
    Key('M-e', lazy.spawn('emacsclient -c')),

    # Layouts
    Key('M-<space>',   lazy.next_layout()),
    Key('M-S-<space>', lazy.prev_layout()),
    Key('M-h', lazy.layout.decrease_ratio()),
    Key('M-l', lazy.layout.increase_ratio()),

    # Qtile
    Key('M-C-r',   lazy.restart()),
    Key('M-C-q',   lazy.shutdown()),
    Key('M-r',     lazy.spawn('rofi -show run')),
]

groups = [Group(i) for i in '1234567890']

for i in groups:
    keys += [
        Key('M-%s' % i.name, lazy.group[i.name].toscreen()),
예제 #10
0
파일: config.py 프로젝트: Lionelvsv/cfg
myConfig = "/home/dt/.config/qtile/config.py"    # The Qtile config file location

##### KEYBINDINGS #####
keys = [
         ### The essentials
         Key(
             [mod], "Return",
             lazy.spawn(myTerm)                      # Open terminal
             ),
         Key(
             [mod, "shift"], "Return",              # Dmenu Run Launcher
             lazy.spawn("dmenu_run -p 'Run: '")
             ),
         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
             ),
         ### Switch focus to specific monitor (out of three)
         Key([mod], "w",
예제 #11
0
    def init_keys(self):

        # Key alias
        mod = "mod4"
        alt = "mod1"
        altgr = "mod5"

        return [
            # On root
            Key([mod, altgr], "Insert", lazy.restart()),  # Restart Qtile
            Key([mod, altgr], "Delete", lazy.shutdown()),  # Shutdown Qtile
            Key([mod, altgr], "p", lazy.spawncmd()),  # Launch Qtile prompt

            # On window
            Key([mod], "Home",
                lazy.window.bring_to_front()),  # Bring window to front
            Key([mod], "End",
                lazy.group[""].toscreen()),  # Go to minimized windows gruop
            Key([mod, "shift"], "End",
                lazy.window.togroup("")),  # Move to minimized windows group
            Key([mod, "control"], "End", lazy.window.togroup(""), lazy.
                group[""].toscreen()),  # Move with to minimized windows group
            # Key([mod, alt], "End",
            # 	lazy.window.toggle_minimize()),				# Toogle minimize
            Key([mod], "j", lazy.layout.down()),  # Switch to next window
            Key([mod], "k", lazy.layout.up()),  # Switch to previous window
            Key([mod, "shift"], "j", lazy.layout.shuffle_down()
                ),  # Move windows down in current stack
            Key([mod, "shift"], "k",
                lazy.layout.shuffle_up()),  # Move windows up in current stack
            Key([mod, "control"], "j", lazy.layout.client_to_previous()
                ),  # Move window to previous stack side
            Key([mod, "control"], "k", lazy.layout.client_to_next()
                ),  # 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, altgr], "Tab", lazy.group.next_window(),
                lazy.window.bring_to_front()
                ),  # Switch focus to other window + front
            Key([mod, altgr, "shift"], "Tab", lazy.group.prev_window(),
                lazy.window.bring_to_front()
                ),  # Switch focus to other window + front
            Key([mod], "w", lazy.window.kill()),  # Kill active window
            Key([mod, alt], "w", lazy.spawn("xkill")),  # Terminate program
            Key([mod, "shift"], "w", Function.kill_all_windows_minus_current()
                ),  # Kill all windows except current
            Key([mod, "control"], "w",
                Function.kill_all_windows()),  # Kill all windows
            Key([mod, "control"], "Return",
                lazy.window.toggle_floating()),  # Toggle floating

            # On layout
            Key([mod], "backslash", lazy.layout.swap_main()
                ),  # Swap current window to main pane (Xmonad)
            Key([mod], "m",
                lazy.layout.next()),  # Move focus to another stack (Stack)
            Key([mod], "h",
                lazy.layout.shrink()),  # Shrink size of window (Xmonad)
            Key([mod], "l",
                lazy.layout.grow()),  # Grow size of window (Xmonad)
            Key(
                [mod, "shift"],
                "h",
                # lazy.layout.decrease_nmaster(),			# Decrease number in master pane (Tile)
                lazy.layout.shrink_main()
            ),  # Shrink size of main window (Xmonad)
            Key(
                [mod, "shift"],
                "l",
                # lazy.layout.increase_nmaster(),			# Increase number in master pane (Tile)
                lazy.layout.grow_main()),  # Grow 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)
            Key([mod], "Up", lazy.prev_layout()),  # Toggle through layouts
            Key([mod], "Down", lazy.next_layout()),  # Toggle through layouts

            # On group
            Key([mod], "z",
                lazy.screen.togglegroup()),  # Move to previous visited group
            Key([mod, "shift"], "i",
                lazy.next_urgent()),  # Move to next urgent group
            Key([mod], "Left",
                lazy.screen.prev_group()),  # Move to previous group
            Key([mod], "Right",
                lazy.screen.next_group()),  # Move to next group
            Key([mod, "shift"], "Left", Function.window_to_prev_group()
                ),  # Move window to previous group
            Key([mod, "shift"], "Right",
                Function.window_to_next_group()),  # Move window to next group
            Key([mod, "control"], "Left", Function.window_to_prev_group(),
                lazy.screen.prev_group()
                ),  # Move with window to previous group
            Key([mod, "control"], "Right", Function.window_to_next_group(),
                lazy.screen.next_group()),  # Move with window to next group

            # On screen
            Key([mod], "Page_Up",
                lazy.prev_screen()),  # Switch to previous screen
            Key([mod], "Page_Down",
                lazy.next_screen()),  # Switch to next screen
            Key([mod, "shift"], "Page_Up", Function.window_to_prev_screen()
                ),  # Move window to previous screen
            Key([mod, "shift"], "Page_Down", Function.window_to_next_screen()
                ),  # Move window to next screen
            Key([mod, "control"], "Page_Up",
                Function.swap_prev_screen()),  # Swap active groups on screens
            Key([mod, "control"], "Page_Down",
                Function.swap_next_screen()),  # Swap active groups on screens

            # On bar
            Key([mod, alt], "slash",
                lazy.hide_show_bar("all")),  # Toggle all screen bars
            # Key([mod, "shift"], "slash",
            # 	lazy.hide_show_bar("top")),					# Toggle top screen bar
            # Key([mod, "control"], "slash",
            # 	lazy.hide_show_bar("bottom"))				# Toggle bottom screen bar
        ]
예제 #12
0
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"))
	]
예제 #13
0
##################### 

    # Swap panes of split stack
    Key([mod, "shift"], "space", lazy.layout.rotate(),
        desc="Swap panes of split stack"),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    Key([mod, "shift"], "Return", lazy.layout.toggle_split(),
        desc="Toggle between split and unsplit sides of stack"),
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),

    Key([mod, "shift"], "r", lazy.restart(), desc="Restart qtile"),
    Key([mod, "shift"], "q", lazy.shutdown(), desc="Shutdown qtile"),
    Key([mod], "r", lazy.spawncmd(),
        desc="Spawn a command using a prompt widget"),
]

######################## WORKSPACES ##########################

group_names = [("WWW", {'layout': 'monadtall'}),
               ("DEV", {'layout': 'monadtall'}),
               ("SYS", {'layout': 'monadtall'}),
               ("DOC", {'layout': 'monadtall'}),
               ("VBOX", {'layout': 'monadtall'}),
예제 #14
0
        lazy.function(update_widget, 'stackitems')),
    Key([mod, 'control'], 'f', lazy.window.toggle_maximize()),
    Key([alt], 'space', lazy.window.toggle_floating()),
    Key([alt, 'control'], 'Up',
        lazy.function(exec_then_update, 'amixer set PCM 5%+', 'volume')),
    Key([alt, 'control'], 'Down',
        lazy.function(exec_then_update, 'amixer set PCM 5%-', 'volume')),

    # 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, 'shift'], 'Tab', lazy.next_layout()),
    Key([mod], 'Tab', lazy.screen.toggle_group()),
    Key([mod, 'shift'], 'w', lazy.window.kill()),
    Key([mod, 'control'], 'r', lazy.restart()),
    Key([mod, 'control'], 'q', lazy.shutdown()),

    # Run programs
    Key([mod], 'Return', lazy.spawn('kitty -1 --name terminal-window')),
    Key([mod], 'r', lazy.spawn('zsh -c "rofi -show run"')),
    Key([mod], 'Print',
        lazy.spawn(f'scrot "qtile.png" -e "mv $f {home}/img/shots/"')),
    # Key([mod], 'Print', lazy.spawn(
    #     f'scrot "%d.%m.%Y[$wx$h]%T.png" -e "mv $f {home}/img/shots/"')),
    Key([mod], 'Escape', lazy.spawn(f'/usr/local/bin/screensaver')),
    # Key(['control'], 'space',
    #     lazy.spawn('xkblayout-state set +1'),
예제 #15
0
import libqtile.widget
from libqtile.dgroups import simple_key_binder

import widgets

mod = "mod4"

keys = [
    # Switch between windows in current stack pane
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod], "f", lazy.window.toggle_floating()),
    Key([mod], "m", lazy.window.toggle_fullscreen()),

    # Move windows up or down in current stack
    Key([mod, "control"], "k", lazy.next_layout()),
    Key([mod, "control"], "j", lazy.prev_layout()),

    # 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("urxvt")),
예제 #16
0
        desc='Volume down.'),
    Key([],
        "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 sset Master 2+ unmute"),
        desc='Volume up.'),
    # Swap panes of split stack
    # Swap panes of split stack
    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    # Key([mod, "shift"], "Return", lazy.layout.toggle_split()),
    Key([mod], "Return", lazy.spawn(TERM), desc='Start a terminal emulator.'),

    # Toggle between different layouts as defined below
    Key([mod], 'space', lazy.next_layout(), desc='Swap layout.'),
    Key([mod, 'shift'],
        'space',
        lazy.window.toggle_floating(),
        desc='Toggle floating window.'),
    Key([mod], "x", lazy.window.kill(), desc='Close window.'),
    Key([mod], 'q', lazy.spawn('keepassx'), desc='Open KeePass'),
    Key([mod], 'w', lazy.spawn('firefox'), desc='Launch web browser.'),
    Key([mod],
        'e',
        lazy.spawn('{} -e ranger'.format(TERM)),
        desc='Launch file explorer.'),
    Key([mod], 't', lazy.spawn('gvim'), desc='Launch text editor.'),
    Key([mod, "control"], "r", lazy.restart(), desc='Restart qtile.'),
    Key([mod, "control"], "q", lazy.shutdown(), desc='Exit qtile.'),
    Key([mod], "r", lazy.spawn('rofi -show run'), desc='Run a command.'),
예제 #17
0
        ([mod], "h", lazy.layout.left()),
        ([mod], "l", lazy.layout.right()),

        # Change window sizes (MonadTall)
        ([mod, "shift"], "l", lazy.layout.grow()),
        ([mod, "shift"], "h", lazy.layout.shrink()),

        # Toggle floating
        ([mod, "shift"], "f", lazy.window.toggle_floating()),

        # Move windows up or down in current stack
        ([mod, "shift"], "j", lazy.layout.shuffle_down()),
        ([mod, "shift"], "k", lazy.layout.shuffle_up()),

        # Toggle between different layouts as defined below
        ([mod, "control"], "Tab", lazy.next_layout()),

        # Kill window
        ([mod], "w", lazy.window.kill()),

        # Restart Qtile
        ([mod, "control"], "r", lazy.restart()),
        ([mod, "control"], "q", lazy.shutdown()),

        # Switch window focus to other pane(s) of stack
        ([mod], "space", lazy.layout.next()),

        # Swap panes of split stack
        ([mod, "shift"], "space", lazy.layout.rotate()),

        # ------------ Apps Configs ------------
예제 #18
0
    Key([MOD, "shift"], "f", lazy.window.toggle_floating()),
    Key([MOD, "control"], "f", float_to_front),
    Key([MOD], "f", lazy.window.toggle_fullscreen()),

    # 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)),
    Key([ALT], "Return", lazy.spawn(ALTTERMINAL)),
    Key([MOD], "b", lazy.spawn(BROWSER)),
    Key([ALT], "b", lazy.spawn(ALTBROWSER)),

    # Toggle between different layouts
    Key([MOD], "Tab", lazy.next_layout()),
    Key([MOD], "q", lazy.window.kill()),
    Key([MOD, "shift", "control"], "Up", lazy.prev_screen(),
        lazy.function(lambda x: updateGroupWidgets())),
    Key([MOD, "shift", "control"], "Down", lazy.next_screen(),
        lazy.function(lambda x: updateGroupWidgets())),
    Key([MOD, "shift", "control"], "Right",
        lazy.function(lambda x: next_prev_group(x, next=True)),
        lazy.function(lambda x: updateGroupWidgets()), changeWallpaper),
    Key([MOD, "shift", "control"], "Left",
        lazy.function(lambda x: next_prev_group(x, next=False)),
        lazy.function(lambda x: updateGroupWidgets()), changeWallpaper),
    Key([MOD], "u", lazy.next_urgent(),
        lazy.function(lambda x: updateGroupWidgets())),
    Key([], "XF86AudioMute", lazy.function(lambda x: setMute(2)),
        lazy.function(lambda x: updateVolumeWidgets())),
예제 #19
0
    # Swap panes of split stack
    Key([MOD, 'shift'], 'space', lazy.layout.rotate()),

    # Toggle floating
    Key([MOD], "t", lazy.window.toggle_floating()),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    Key([MOD, 'shift'], 'Return', lazy.layout.toggle_split()),
    Key([MOD], 'Return', lazy.spawn('st')),

    # Toggle between different layouts as defined below
    Key([MOD], 'Tab', lazy.next_layout()),
    Key([MOD, 'shift'], 'Tab', lazy.prev_layout()),
    # Key([MOD], '-', lazy.layout.increase_ratio()),
    # Key([MOD], '=', lazy.layout.decrease_ratio()),
    Key([MOD], 'w', lazy.window.kill()),

    # Lock screen
    Key([MOD], 'l', lazy.spawn('lockscreen')),
    Key([MOD, 'control'], 'r', lazy.restart()),
    Key([MOD, 'control'], 'q', lazy.shutdown()),
    Key([MOD], 'p', lazy.spawncmd()),

    # Launch applications
    Key([MOD], 'c', lazy.spawn('code')),
    Key([MOD], 'f', lazy.spawn('firefox')),
    Key([MOD], 'g', lazy.spawn('google-chrome')),
예제 #20
0
파일: keys.py 프로젝트: Granitas/.dotfiles
 f'M-S-{down}': layout.shuffle_down(),
 f'M-S-{left}': layout.swap_left(),
 f'M-S-{right}': layout.swap_right(),
 # Window Manipulation
 'M-i': layout.grow(),
 'M-m': layout.shrink(),
 'M-n': layout.normalize(),
 'M-o': layout.maximize(),
 'M-S-<space>': layout.flip(),
 'M-<space>': lazy.window.toggle_floating(),
 'M-S-<Return>': 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>': lazy.spawn('pactl set-sink-volume @DEFAULT_SINK@ +2%'),
 '<XF86AudioLowerVolume>': lazy.spawn('pactl set-sink-volume @DEFAULT_SINK@ -2%'),
 # Other
 '<Print>': lazy.spawn('flameshot gui'),
예제 #21
0
def init_keys():
    keys = [
        #### Basics ####
        Key([mod], "Return", lazy.spawn(term)),  # Open Terminal
        Key([mod, "shift"], "Return",
            lazy.spawn(
                'rofi -theme "~/.config/rofi/launcher.rasi" -show drun')),
        Key([mod, "mod1"], "Return",
            lazy.spawn(
                'sudo rofi -theme "~/.config/rofi/launcher.rasi" -show drun')),
        Key([mod], "q", lazy.window.kill()),  # Close Window 
        Key([mod, "shift"], "r", lazy.restart()),  # Restart Qtile
        Key([mod, "shift"], "q", lazy.shutdown()),  # Logout 
        Key([mod], "Escape", lazy.spawn('xkill')),  # Click window to close
        Key([mod], "r", lazy.spawncmd()),  # Close Window 

        #### Widgets
        Key([mod], "h", lazy.spawn('/opt/bin/shortc')),  # Sortcurts widget
        Key([mod], "p", lazy.spawn('/opt/bin/qback')),  # Launcher
        Key([mod], "f", lazy.function(ksearx)),  # WEB Search
        Key([mod], "x", lazy.spawn('/opt/bin/logout')),
        Key([mod], "n", lazy.spawn('/opt/bin/network')),
        Key([mod, "shift"], "w", lazy.spawn('/opt/bin/qback')),
        #### Theming ####
        Key([mod], "w", lazy.spawn('/opt/bin/genwal')
            ),  # Set randwom wallpaper / colors to entire system

        #### Apps ####
        Key([mod], "e", lazy.spawn('nautilus')),  # File manager
        Key([mod, "shift"], "e",
            lazy.spawn(term + '-e ranger')),  # CLI file manager
        Key([mod, "shift"], "a", lazy.function(app_or_group("1", "anydesk"))),
        Key([mod, "shift"], "s", lazy.function(app_or_group('1',
                                                            'simplenote'))),

        ## Group 2 (Organization)
        Key([mod], "m", lazy.function(app_or_group('2', 'mailspring'))),

        ## Group 2 (Social: Whatsapp, Telegram, )
        Key([mod, "shift"], "t",
            lazy.function(app_or_group('3', 'telegram-desktop'))),
        Key([mod, "shift"], "d", lazy.function(app_or_group('3', 'discord'))),

        ## Group 3 (WEB: Firefox)(Admin: Mail, notes, social)
        Key([mod, "shift"], "f", lazy.function(app_or_group('4', 'firefox'))),

        ## Group 4 (Code/Write/Office: visual studio, typora, onlyofice)
        Key([mod], "o", lazy.function(app_or_group("6", 'libreoffice'))),
        Key([mod], "c", lazy.function(app_or_group('5', 'code'))),

        ## Group 5 (Design: Gimp, Inkscape, feh)
        Key([mod], "g", lazy.function(app_or_group('6', 'gimp'))),

        ## Group 6 (Virtual Stuff games)
        Key([mod], "v", lazy.function(app_or_group('8', 'virtualbox'))),
        Key([mod], "b",
            lazy.function(
                app_or_group('8',
                             '/home/gibranlp/albiononline/./Albion-Online'))),

        ## Group 7 (Música)
        Key([mod], "s", lazy.function(ncsp)),

        #### Layouts ####
        Key([mod], "Tab", lazy.layout.down()),  # Change focus of windows down
        Key([mod, "shift"], "Tab",
            lazy.layout.up()),  # Change focus of windows up
        Key([alt], "Tab", lazy.layout.swap_left()),
        Key([alt, "shift"], "Tab", lazy.layout.swap_right()),
        #Key([mod], "h", lazy.layout.left()),
        #Key([mod], "l", lazy.layout.right()),
        #Key([mod], "Up", lazy.layout.down()),
        #Key([mod], "Down", lazy.layout.up()),

        #### Brightness
        Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 5")),
        Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 5")),

        #### Volume
        Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")),
        Key([], "XF86AudioLowerVolume",
            lazy.spawn("amixer -q set Master 5%-")),
        Key([], "XF86AudioRaiseVolume",
            lazy.spawn("amixer -q set Master 5%+")),

        #### Media Control
        #Key([mod], "v", lazy.spawn('/home/gibranlp/MEGA/computerStuff/keyboard/keyboard_activate.sh')),
        #Key([mod], "b", lazy.spawn('/home/gibranlp/MEGA/computerStuff/keyboard/keyboard_deactivate.sh')),
        Key([], "XF86AudioPlay", lazy.spawn("playerctl -p ncspot play-pause")),
        Key([], "XF86AudioNext", lazy.spawn("playerctl -p ncspot next")),
        Key([], "XF86AudioPrev", lazy.spawn("playerctl -p ncspot previous")),
        Key([], "XF86AudioStop", lazy.spawn("playerctl -p ncspot stop")),

        ### Window hotkeys
        Key([alt], "f", lazy.window.toggle_fullscreen()),
        Key([alt, "shift"], "f", lazy.window.toggle_floating()),
        Key([mod], "space", lazy.next_layout()),

        # Resize windows
        Key([mod, "shift"], "Up", lazy.layout.grow()),
        Key([mod, "shift"], "Down", lazy.layout.shrink()),
        Key([mod, "shift"], "space", lazy.layout.flip()),

        # Change focus
        Key([mod], "Up", lazy.layout.up()),
        Key([mod], "Down", lazy.layout.down()),
        Key([mod], "Left", lazy.layout.left()),
        Key([mod], "Right", lazy.layout.right()),

        ### Screenshots
        Key([], "Print", lazy.spawn('screenshot')),
    ]

    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)))
    return keys
예제 #22
0
def init_keys():
    keys = [
        Key(
            [mod],
            "Return",
            lazy.spawn(myTerm)  # Open terminal
        ),
        Key(
            [mod, "shift"],
            "Tab",
            lazy.next_layout()  # Toggle through layouts
        ),
        Key(
            [mod, "shift"],
            "q",
            lazy.window.kill()  # Kill active window
        ),
        Key(
            [mod, "shift"],
            "r",
            lazy.restart()  # Restart Qtile
        ),
        Key(
            [mod, "shift"],
            "Escape",
            lazy.shutdown()  # Shutdown Qtile
        ),
        Key(
            [mod],
            "F1",
            lazy.to_screen(0)  # Keyboard focus screen(1) xD
        ),
        Key(
            [mod],
            "F2",
            lazy.to_screen(1)  # Keyboard focus screen(2) xD
        ),
        Key(
            [mod],
            "F3",
            lazy.to_screen(3)  # Keyboard focus screen(3) xD
        ),
        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],
            "h",
            lazy.layout.right()  # Switch between windows in current stack pane
        ),
        Key(
            [mod],
            "l",
            lazy.layout.left()  # 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"],
            "h",
            lazy.layout.shuffle_left()  # Move windows left in current stack 
        ),
        Key(
            [mod, "shift"],
            "l",
            lazy.layout.shuffle_right()  # Move windows rigth in current stack 
        ),
        Key(
            [mod],
            "Left",
            lazy.layout.grow(),  # Grow size of current window (XmonadTall)
            lazy.layout.increase_nmaster(
            ),  # Increase number in master pane (Tile)
        ),
        Key(
            [mod],
            "Right",
            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],
            "Tab",
            lazy.layout.rotate(),  # Swap panes of split stack (Stack) xD
            lazy.layout.flip(
            )  # Switch which side main pane occupies (XmonadTall)
        ),
        # Stack controls
        Key(
            [mod],
            "o",
            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
        ),

        # GUI Apps
        Key([mod], "w", lazy.function(app_or_group("WWW", "firefox"))),
        Key([mod], "f", lazy.function(app_or_group("SYS", "thunar"))),
        Key([mod], "g", lazy.spawn("geany")),
        Key([mod], "q", lazy.spawn("rofi -show run")),

        # Lock the screen
        Key([mod], "F6",
            lazy.spawn("i3lock -e -f -c 1d2021 && pauseallmpv && mpc pause")),

        #hibernate
        Key([mod], "F8", lazy.spawn("systemctl suspend"),
            lazy.spawn("i3lock -e -f -c 1d2021 && pauseallmpv && mpc pause")),

        #shutdown
        Key([mod], "F9", lazy.spawn("shutdown -h now")),

        #reboot
        Key([mod], "F11", lazy.spawn("reboot")),
        # Apps Launched with <SUPER> + <KEYPAD 0-9> || I Removed It xD
    ]
    return keys
예제 #23
0
    # sometimes, or on ubuntu upgrades). This way you can still log back out
    # and in gracefully.
    Key(["shift", "mod1"], "q",  lazy.shutdown()),

    # I don't ever use floating, but sometimes it is handy to toggle to
    # floating for debugging, so I use the "out of band" mnemonic for this as
    # well.
    Key(["shift", "mod1"], "f",  lazy.window.toggle_floating()),

    Key([mod], "k",              lazy.layout.down()),
    Key([mod], "j",              lazy.layout.up()),
    Key([mod], "h",              lazy.layout.previous()),
    Key([mod], "l",              lazy.layout.next()),
    Key([mod, "shift"], "space", lazy.layout.rotate()),
    Key([mod, "shift"], "Return",lazy.layout.toggle_split()),
    Key(["mod1"], "Tab",         lazy.next_layout()),
    Key([mod, "mod1"], "h",      lazy.to_screen(0)),
    Key([mod, "mod1"], "l",      lazy.to_screen(1)),
    Key([mod], "x",              lazy.window.kill()),
    Key([mod, "shift"], "l",          lazy.layout.swap_left()),

    # interact with prompts
    Key([mod], "r",              lazy.spawncmd()),
    Key([mod], "g",              lazy.togroup()),

    # start specific apps
    Key([mod], "n",              lazy.function(app_or_group("www", "google-chrome"))),
    Key([mod], "m",              lazy.function(app_or_group("music", "clementine"))),
    Key([mod], "c",              lazy.function(app_or_group("io", "pidgin"))),
    Key([mod], "Return",         lazy.spawn("urxvt")),
예제 #24
0
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"))
    ]
예제 #25
0
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
        ),
        # GUI Apps
        Key([mod], "b", lazy.function(app_or_group("WWW", "firefox"))),
        Key([mod], "f", lazy.spawn("pcmanfm")),
        Key([mod], "g", lazy.spawn("geany")),
        """
            # Apps Launched with <SUPER> + <KEYPAD 0-9>
            Key(
                [mod], "KP_Insert",                                  # Keypad 0
                # lazy.spawncmd()                                    # Qtile Run Dialog
                lazy.spawn("dmenu_run -fn 'UbuntuMono Nerd Font:size=10' -nb '#292d3e' -nf '#bbc5ff' -sb '#82AAFF' -sf '#292d3e' -p 'dmenu:'")
                ),
            Key(
                [mod], "KP_End",                                     # Keypad 1
                lazy.spawn(myTerm+" -e lynx -cfg=~/.lynx.cfg -lss=~/.lynx.lss http://www.distrowatch.com")
                # lazy.spawn(myTerm+" -e lynx -cfg=~/.lynx.cfg -lss=~/.lynx.lss http://www.distrowatch.com")
                ),
            Key(
                [mod], "KP_Down",                                    # Keypad 2
                lazy.spawn(myTerm+" -e sh ./scripts/googler-script.sh")
                ),
            Key(
                [mod], "KP_Page_Down",                               # Keypad 3
                lazy.spawn(myTerm+" -e newsboat")
                ),
            Key(
                [mod], "KP_Left",                                    # Keypad 4
                lazy.spawn(myTerm+" -e rtv")
                ),
            Key(
                [mod], "KP_Begin",                                   # Keypad 5
                lazy.spawn(myTerm+" -e neomutt")
                ),
            Key(
                [mod], "KP_Right",                                   # Keypad 6
                lazy.spawn(myTerm+" -e twitch-curses")
                ),
            Key(
                [mod], "KP_Home",                                    # Keypad 7
                lazy.spawn(myTerm+" -e sh ./scripts/haxor-news.sh")
                ),
            Key(
                [mod], "KP_Up",                                      # Keypad 8
                lazy.spawn(myTerm+" -e sh ./scripts/toot.sh")
                ),
            Key(
                [mod], "KP_Page_Up",                                 # Keypad 9
                lazy.spawn(myTerm+" -e sh ./scripts/tig-script.sh")
                ),
            # Apps Launched with <SUPER> + <SHIFT> + <KEYPAD 0-9>
            Key(
                [mod, "shift"], "KP_End",                            # Keypad 1
                lazy.spawn(myTerm+" -e sh ./.config/vifm/scripts/vifmrun")
                ),
            Key(
                [mod, "shift"], "KP_Down",                           # Keypad 2
                lazy.spawn(myTerm+" -e htop")
                ),
            Key(
                [mod, "shift"], "KP_Page_Down",                      # Keypad 3
                lazy.spawn(myTerm+" -e cmus")
                ),
            Key(
                [mod, "shift"], "KP_Left",                           # Keypad 4
                lazy.spawn(myTerm+" -e irssi")
                ),
            Key(
                [mod, "shift"], "KP_Begin",                          # Keypad 5
                lazy.spawn(myTerm+" -e rtorrent")
                ),
            Key(
                [mod, "shift"], "KP_Right",                          # Keypad 6
                lazy.spawn(myTerm+" -e youtube-viewer")
                ),
            Key(
                [mod, "shift"], "KP_Home",                           # Keypad 7
                lazy.spawn(myTerm+" -e ncpamixer")
                ),
            Key(
                [mod, "shift"], "KP_Up",                             # Keypad 8
                lazy.spawn(myTerm+" -e calcurse")
                ),
            Key(
                [mod, "shift"], "KP_Page_Up",                        # Keypad 9
                lazy.spawn(myTerm+" -e vim /home/dt/.config/qtile/config.py")
                ),
            # Apps Launched with <SUPER> + <CONTROL> + <KEYPAD 0-9>
            Key(
                [mod, "control"], "KP_End",                            # Keypad 1
                lazy.spawn(myTerm+" -e htop")
                ),
            Key(
                [mod, "control"], "KP_Down",                           # Keypad 2
                lazy.spawn(myTerm+" -e glances")
                ),
            Key(
                [mod, "control"], "KP_Page_Down",                      # Keypad 3
                lazy.spawn(myTerm+" -e nmon")
                ),
            Key(
                [mod, "control"], "KP_Left",                           # Keypad 4
                lazy.spawn(myTerm+" -e httping -KY --draw-phase localhost")
                ),
            Key(
                [mod, "control"], "KP_Begin",                          # Keypad 5
                lazy.spawn(myTerm+" -e s-tui")
                ),
            Key(
                [mod, "control"], "KP_Right",                          # Keypad 6
                lazy.spawn(myTerm+" -e sh ./scripts/pianobar.sh")
                ),
            Key(
                [mod, "control"], "KP_Home",                           # Keypad 7
                lazy.spawn(myTerm+" -e cmatrix -C cyan")
                ),
            Key(
                [mod, "control"], "KP_Up",                             # Keypad 8
                lazy.spawn("sh ./scripts/joplin.sh")
                ),
            Key(
                [mod, "control"], "KP_Page_Up",                        # Keypad 9
                lazy.spawn(myTerm+" -e wopr report.xml")
                ),"""
    ]
    return keys
예제 #26
0
def bind_keys(settings) -> List[Key]:
    return [
        # region QTile Control
        Key([settings["mod"], alt], "r", lazy.restart(), desc="Restart QTile"),
        Key([settings["mod"], alt], "q", lazy.shutdown(), desc="Quit QTile"),
        # endregion
        # region Window Control
        Key(
            [settings["mod"], "shift"],
            "c",
            lazy.window.kill(),
            desc="Close window",
        ),
        Key(
            [settings["mod"], "mod1"],
            "Left",
            lazy.screen.prev_group(),
            desc="Switch to next group",
        ),
        Key(
            [settings["mod"], "mod1"],
            "Right",
            lazy.screen.next_group(),
            desc="Switch to previous group",
        ),
        Key(
            [settings["mod"], alt],
            "f",
            lazy.window.toggle_floating(),
            desc="Toggle floating window",
        ),
        # Toggle between different layouts as defined below
        Key([settings["mod"]],
            "grave",
            lazy.next_layout(),
            desc="Switch to next layout"),
        # Move window in stack
        Key(
            [settings["mod"], "shift"],
            "Right",
            lazy.layout.shuffle_down(),
            desc="Move window down in stack",
        ),
        Key(
            [settings["mod"], "shift"],
            "Left",
            lazy.layout.shuffle_up(),
            desc="Move window up in stack",
        ),
        Key(
            [settings["mod"], "shift"],
            "l",
            lazy.layout.shuffle_down(),
            desc="Move window down in stack",
        ),
        Key(
            [settings["mod"], "shift"],
            "h",
            lazy.layout.shuffle_up(),
            desc="Move window up in stack",
        ),
        # Switch between windows in current stack pane
        Key([settings["mod"]], "h", lazy.layout.up(), desc="Previous window"),
        Key([settings["mod"]], "l", lazy.layout.down(), desc="Next window"),
        Key([settings["mod"]],
            "Left",
            lazy.layout.up(),
            desc="Previous window"),
        Key([settings["mod"]], "Right", lazy.layout.down(),
            desc="Next window"),
        # Resize
        Key(
            [settings["mod"], "control"],
            "Right",
            lazy.layout.grow_main(),
            desc="Increase Main Window Size",
        ),
        Key(
            [settings["mod"], "control"],
            "l",
            lazy.layout.grow_main(),
            desc="Increase Main Window Size",
        ),
        Key(
            [settings["mod"], "control"],
            "Left",
            lazy.layout.shrink_main(),
            desc="Decrease Main Window Size",
        ),
        Key(
            [settings["mod"], "control"],
            "h",
            lazy.layout.shrink_main(),
            desc="Decrease Main Window Size",
        ),
        Key(
            [settings["mod"], "control"],
            "Up",
            lazy.layout.grow(),
            desc="Increase Sub Window Size",
        ),
        Key(
            [settings["mod"], "control"],
            "j",
            lazy.layout.grow(),
            desc="Increase Sub Window Size",
        ),
        Key(
            [settings["mod"], "control"],
            "Down",
            lazy.layout.shrink(),
            desc="Decrease Sub Window Size",
        ),
        Key(
            [settings["mod"], "control"],
            "k",
            lazy.layout.shrink(),
            desc="Decrease Sub Window Size",
        ),
        # endregion
    ]
예제 #27
0
파일: config.py 프로젝트: yantene/config
    # スタックでウィンドウを分割表示するかしないかをトグルする
    Key(
        [k_super], 'Return',
        lazy.layout.toggle_split()
    ),

    # gnome-terminal を立ち上げる
    Key([k_super, k_shift], 'Return', 
        lazy.spawn('termite')
    ),

    # コマンド入力欄を表示する
    Key([k_super], 'd', lazy.spawncmd()),

    # レイアウトをトグルする
    Key([k_super], 'Tab', lazy.next_layout()),

    # ウィンドウを kill する
    Key([k_super, k_shift], 'c', lazy.window.kill()),

    # qtile を再起動・終了する
    Key([k_super, k_ctrl], 'r', lazy.restart()),
    Key([k_super, k_ctrl], 'q', lazy.shutdown()),

    # タッチパッド
    Key([], 'XF86TouchpadToggle',
      # VAIO Pro では Fn + F1 で XF86TouchpadToggle イベントが発生しないので使用不可
      lazy.spawn('sh -c \"synclient TouchpadOff=$(synclient -l | grep -c \'TouchpadOff.*=.*0\')\"'),
    ),

    # 音量
예제 #28
0
        lazy.spawn('amixer -q -D pulse sset Master 5%-')),
    Key([], 'XF86AudioMute',
        lazy.spawn('amixer -q -D pulse sset Master toggle')),
    Key([], 'XF86MonBrightnessUp', lazy.spawn('light -A 5')),
    Key([], 'XF86MonBrightnessDown', lazy.spawn('light -U 5')),
    Key([win, 'shift'], 'm', lazy.window.toggle_fullscreen()),

    # 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([win], "Return", lazy.function(toggle_keyboard_layout())),
    Key([win], "Return", lazy.spawn(terminal)),

    # Toggle between different layouts as defined below
    Key([win], "Tab", lazy.next_layout()),
    Key([win], "w", lazy.window.kill()),
    Key([win, "control"], "r", lazy.restart()),
    Key([win, "control"], "q", lazy.shutdown()),
    Key([win, alt], "r",
        lazy.spawn('rofi -show window -theme {}'.format(rofi_theme))),
    Key([win], "r", lazy.spawn('rofi -show run -theme {}'.format(rofi_theme))),
]

groups = [
    ScratchPad("scratchpad", [DropDown("term", terminal, opacity=0.8)]),
    Group('a',
          matches=[
              Match(wm_class=["Chromium", "chromium"]),
              Match(wm_class=["google-chrome", "Google-chrome"]),
              Match(wm_class=["Firefox"]),
예제 #29
0
    Key([mod, "shift"], "period", lazy.function(window_to_previous_screen)),
    Key([mod, "shift"], "comma", lazy.function(window_to_next_screen)),

# SUPER + FUNCTION KEYS
    Key([mod], "f", lazy.window.toggle_fullscreen()),
    Key([mod], "q", lazy.window.kill()),


# SUPER + SHIFT KEYS
    Key([mod, "shift"], "q", lazy.window.kill()),
    Key([mod, "shift"], "r", lazy.restart()),


# QTILE LAYOUT KEYS
    Key([mod], "n", lazy.layout.normalize()),
    Key([mod], "space", lazy.next_layout()),

# CHANGE FOCUS
    Key([mod], "Up", lazy.layout.up()),
    Key([mod], "Down", lazy.layout.down()),
    Key([mod], "Left", lazy.layout.left()),
    Key([mod], "Right", lazy.layout.right()),
    Key([mod], "k", lazy.layout.up()),
    Key([mod], "j", lazy.layout.down()),
    Key([mod], "h", lazy.layout.left()),
    Key([mod], "l", lazy.layout.right()),


# RESIZE UP, DOWN, LEFT, RIGHT
    Key([mod, "control"], "l",
        lazy.layout.grow_right(),
예제 #30
0
def make_keys(base_mods, *entries):
    keys = []
    for entry in entries:
        key, handler = entry[-2:]
        modifiers = base_mods + list(entry[:-2] if len(entry) > 2 else [])
        keys.append(Key(modifiers, key, handler))
    return keys


keys = xf86_keys() + group_keys + spawner_keys
keys = keys + make_keys(
    [consts.MODKEY],  # base modifiers for all entries

    # high-level management
    ("space", lazy.next_layout()),                      # cycle layouts
    ("q", lazy.window.kill()),                          # kill window
    ("r", lazy.restart()),                              # restart qtile
    ("w", lazy.function(theme.regen)),
    ("shift", "l", lazy.shutdown()),                    # kill qtile

    # floating management
    ("t", lazy.window.disable_floating()),              # embed float
    ("shift", "t", lazy.window.enable_floating()),      # pop tile

    # focus
    ("k", lazy.layout.down()),                          # focus left
    ("j", lazy.layout.up()),                            # focus right

    # movement
    ("shift", "k", lazy.layout.shuffle_down()),         # move tile left
예제 #31
0
FONTSIZE = 15
SCREEN_SIZE = 25

keys = [
    # The essentials
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
    Key(
        [mod],
        "space",
        # lazy.spawn("dmenu_run -p 'Run: '"),
        lazy.spawn(
            "rofi -combi-modi window,drun,ssh -theme solarized -font 'hack 15' -show combi -icon-theme 'Papirus' -show-icons"
        ),
        desc='Run Launcher'),
    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"], "Escape", lazy.shutdown(), desc='Shutdown Qtile'),
    # Switch focus to specific monitor (out of three)
    Key([mod], "w", lazy.to_screen(0), desc='Keyboard focus to monitor 1'),
    Key([mod], "e", lazy.to_screen(1), desc='Keyboard focus to monitor 2'),
    # Switch focus of monitors
    Key([mod], "period", lazy.next_screen(),
        desc='Move focus to next monitor'),
    Key([mod], "comma", lazy.prev_screen(), desc='Move focus to prev monitor'),
    # Switch between windows
    Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
    Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
    Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
    Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
예제 #32
0
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
예제 #33
0
mod = "mod4"                                     # Sets mod key to SUPER/WINDOWS
myTerm = "alacritty"                             # My terminal of choice

keys = [
         ### The essentials
         Key([mod], "Return",
             lazy.spawn(myTerm+" -e fish"),
             desc='Launches My Terminal'
             ),
         Key([mod, "shift"], "Return",
             lazy.spawn("dmenu_run -p 'Run: '"),
             # lazy.spawn("rofi -show drun -config ~/.config/rofi/themes/dt-dmenu.rasi -display-drun \"Run: \" -drun-display-format \"{name}\""),
             desc='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(["control", "shift"], "e",
예제 #34
0
layouts = [
    layout.MonadTall(**layout_theme),
    layout.MonadWide(**layout_theme),
    layout.Max(**layout_theme),
    layout.Tile(**layout_theme),
]

floating_layout = layout.Floating(**layout_theme)

# ====================================================
# Known functions
# ====================================================
registered_functions = {
    # Group Functions
    'next_layout': lazy.next_layout(),
    'prev_layout': lazy.prev_layout(),
    'next_window': lazy.group.next_window(),
    'prev_window': lazy.group.prev_window(),
    'next_group': lazy.screen.next_group(),
    'prev_group': lazy.screen.prev_group(),
    'toggle_group': lazy.screen.toggle_group(),
    # Window Functions
    'window_kill': lazy.window.kill(),
    'toggle_floating': lazy.window.toggle_floating(),
    'toggle_fullscreen': lazy.window.toggle_fullscreen(),
    'toggle_maximize': lazy.window.toggle_maximize(),
    'toggle_minimize': lazy.window.toggle_minimize(),
    # Layout Functions
    'layout_next': lazy.layout.next(),
    'layout_prev': lazy.layout.previous(),
예제 #35
0
    #EzKey('A-l', lazy.layout.right()),
    EzKey('A-j', lazy.layout.down()),
    EzKey('A-k', lazy.layout.up()),
    EzKey('A-S-h', lazy.layout.swap_left()),
    EzKey('A-S-l', lazy.layout.swap_right()),
    EzKey('A-S-j', lazy.layout.shuffle_down()),
    EzKey('A-S-k', lazy.layout.shuffle_up()),
    EzKey('A-l', lazy.layout.grow_main()),
    EzKey('A-h', lazy.layout.shrink_main()),
    EzKey('A-n', lazy.layout.normalize()),
    EzKey('A-o', lazy.layout.maximize()),
    EzKey('A-t', lazy.window.toggle_floating()),
    EzKey('A-<Tab>', lazy.layout.next()),
    EzKey('A-S-<Tab>', lazy.layout.next()),
    EzKey('A-S-<space>', lazy.layout.flip()),
    EzKey('A-<space>', lazy.next_layout()),
    EzKey('A-S-<Return>', lazy.spawn('x-terminal-emulator')),
    EzKey('A-w', lazy.window.kill()),
    EzKey('A-q', lazy.restart()),
    EzKey('A-S-q', lazy.shutdown()),
    EzKey('A-p', lazy.spawncmd())
]

groups = [Group(i) for i in "1234567890"]

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))
예제 #36
0
 Key([mod], "F12", lazy.spawn('rofikb')),
 #########################
 # SUPER + SHIFT KEYS    #
 #########################
 Key([mod, "shift"], "m", lazy.spawn(
     "dmenu_run -i -nb '#191919' -nf \
     '#fea63c' -sb '#fea63c' -sf \
     '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'")),
 Key([mod, "shift"], "q", lazy.shutdown()),
 Key([mod, "shift"], "r", lazy.restart()),
 Key([mod, "shift"], "Return", lazy.spawn('thunar')),
 Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc="sas"),
 Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
 Key([mod, "shift"], "Left", lazy.layout.shuffle_left()),
 Key([mod, "shift"], "Right", lazy.layout.shuffle_right()),
 Key([mod], "Tab", lazy.next_layout(), desc="next layout."),
 Key([mod], "space", lazy.prev_layout(), desc="previous layout."),
 #########################
 # CONTROL + ALT KEYS    #
 #########################
 Key(["mod1", "control"], "a", lazy.spawn('atom'), desc="Open atom."),
 Key(["mod1", "control"], "b", lazy.spawn('thunar'), desc="Open thunar."),
 Key(["mod1", "control"], "c", lazy.spawn('Catfish'), desc="Open catfish."),
 Key(["mod1", "control"], "e", lazy.spawn('evolution'),
     desc="Open evolution."),
 Key(["mod1", "control"], "f", lazy.spawn('firefox'), desc="Open firefox."),
 Key(["mod1", "control"], "g", lazy.spawn(
     'chromium -no-default-browser-check'),
     desc="Open chromium no default check."),
 Key(["mod1", "control"], "i", lazy.spawn('nitrogen'),
     desc="Open nitrogen."),
예제 #37
0
파일: config.py 프로젝트: C0reFast/dotFiles
    # Key([mod], 'k', 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()),

    # Switch groups
    Key([mod], 'Left', lazy.screen.prev_group()),
    Key([mod], 'Right', lazy.screen.next_group()),
    # Key([mod], '`', lazy.screen.next_group()),

    # Cycle layouts
    Key([mod], 'Up', lazy.next_layout()),
    Key([mod], 'Down', lazy.prev_layout()),

    # Change window focus
    Key([mod], 'Tab', lazy.layout.next()),
    Key([mod, 'shift'], 'Tab', lazy.layout.previous()),

    # Switch focus to other screens
    Key([mod], 'h', lazy.to_screen(0)),  # left
    Key([mod], 'l', lazy.to_screen(1)),  # right

    # Commands: Application Launchers
    Key([mod], 'space', lazy.spawn(Commands.dmenu)),
    Key([mod], 'n', lazy.spawn(Commands.browser)),
    Key([mod], 'm', lazy.spawn(Commands.mail)),
    Key([mod], 'e', lazy.spawn(Commands.file_manager)),
예제 #38
0
	Key([mod], 'l', lazy.spawn('xlock')),
	Key([], 'XF86Launch1', lazy.spawn('xlock')),
	Key([], 'XF86AudioMute', lazy.spawn('amixer -D pulse set Master toggle')),
	#Key([], 'XF86AudioMicMute', lazy.spawn('amixer -D pulse set Master toggle')),
	Key([], 'XF86AudioRaiseVolume', lazy.spawn('amixer -c 0 -q set Master 2dB+')),
	Key([], 'XF86AudioLowerVolume', lazy.spawn('amixer -c 0 -q set Master 2dB-')),
	# Switch groups
	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
예제 #39
0
    Key(
        [mod], "k",
        lazy.layout.down()
    ),
    Key(
        [mod], "j",
        lazy.layout.up()
    ),

    Key([mod], "f", lazy.window.toggle_floating()),
    Key([mod], "m", lazy.window.toggle_fullscreen()),

    # Move windows up or down in current stack
    Key(
        [mod, "control"], "k",
        lazy.next_layout()
    ),
    Key(
        [mod, "control"], "j",
        lazy.prev_layout()
    ),

    # Switch window focus to other pane(s) of stack
    Key(
        [mod], "space",
        lazy.layout.next()
    ),

    # Swap panes of split stack
    Key(
        [mod, "shift"], "space",
예제 #40
0
파일: config.py 프로젝트: xarvh/sys
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()),
        ]
    )
예제 #41
0
파일: config.py 프로젝트: filinep/.dotfiles
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')),
    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()),
예제 #42
0
    Key("M-C-k", lazy.layout.grow_up()),
    Key("M-C-h", lazy.layout.grow_left()),
    Key("M-C-l", lazy.layout.grow_right()),
    
    Key("M-S-<Return>", lazy.layout.toggle_split()),
    Key("M-n", lazy.layout.normalize()),

    # Switch window focus to other pane(s) of stack
    Key("M-<Tab>", lazy.layout.next()),
    Key("M-z", lazy.next_screen()),

    # Swap panes of split stack
    Key("M-S-<Tab>", lazy.layout.rotate()),

    # Toggle between different layouts as defined below
    Key("M-m", lazy.next_layout()),
    Key("M-w", lazy.window.kill()),

    # Restart qtile (Reload config)
    Key("M-C-r", lazy.restart()),

    # Logout/quit qtile
    Key("M-C-q", lazy.shutdown()),
    
    # Command launchers
    Key("M-<space>", lazy.spawncmd()),
    Key("M-<Return>", lazy.spawn("urxvt")),
    Key("M-f", lazy.spawn("firefox")),
]

groups = [Group(i) for i in ['web','code','term','4','5','6','7','music','chat']]
예제 #43
0
    Key([super_key], "l", lazy.layout.right()),
    Key([super_key], "j", lazy.layout.up()),
    Key([super_key], "k", lazy.layout.down()),
    Key([super_key, "shift"], "h", lazy.layout.swap_left()),
    Key([super_key, "shift"], "l", lazy.layout.swap_right()),
    Key([super_key, "shift"], "j", lazy.layout.shuffle_down()),
    Key([super_key, "shift"], "k", lazy.layout.shuffle_up()),
    Key([super_key], "i", lazy.layout.grow()),
    Key([super_key], "m", lazy.layout.shrink()),
    Key([super_key], "n", lazy.layout.normalize()),
    Key([super_key], "o", lazy.layout.maximize()),
    Key([super_key, "shift"], "space", lazy.layout.flip()),

    # layouts
    Key([super_key], "Down", lazy.prev_layout()),
    Key([super_key], "Up", lazy.next_layout()),

    # window handling
    Key([alt_key], "F4", lazy.window.kill()),
    Key([super_key], "x", lazy.window.kill()),
    Key([super_key], "w", lazy.window.toggle_floating()),
    Key([super_key], "m", lazy.layout.maximize()),

    # ~ Audio
    Key([], "XF86AudioRaiseVolume", lazy.function(media_raise_volume)),
    Key([super_key], "equal", lazy.function(media_raise_volume)),
    Key([], "XF86AudioLowerVolume", lazy.function(media_lower_volume)),
    Key([super_key], "minus", lazy.function(media_lower_volume)),
    Key([], "XF86AudioMute", lazy.spawn("amixer -D pulse set Master toggle")),
    Key([], "XF86AudioPlay", lazy.function(media_playpause)),
    Key([], "XF86AudioNext", lazy.function(media_next)),
예제 #44
0
    Key([mod, "shift"], "Up", lazy.layout.shuffle_up()),
    Key([mod, "shift"], "Left", lazy.layout.shuffle_left()),
    Key([mod, "shift"], "Right", lazy.layout.shuffle_right()),
    Key([mod, "control"], "Left", switch_screens(0), lazy.next_screen()),
    Key([mod, "control"], "Right", switch_screens(1), lazy.next_screen()),
    Key([mod, alt], "Down", lazy.layout.grow_down()),
    Key([mod, alt], "Up", lazy.layout.grow_up()),
    Key([mod, alt], "Left", lazy.layout.grow_left()),
    Key([mod, alt], "Right", lazy.layout.grow_right()),

    # Switch window focus to other pane(s) of stack
    Key([mod], "space", lazy.layout.next()),
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),

    # Toggle between different layouts as defined below
    Key([mod, "control"], "space", lazy.next_layout()),
    # Toggle Floating
    Key([mod, "shift"], "space", lazy.window.toggle_floating()),
    # Toggle Fullscreen
    Key([mod], "f", lazy.window.toggle_fullscreen()),


    Key([mod], "q", lazy.window.kill()),
    Key([mod], "d", lazy.spawncmd()),

    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "shift"], "Escape", lazy.shutdown()),

    # Launch applications
    Key([mod], "Return", lazy.spawn(TERMINAL)),
    Key([mod], "e", lazy.spawn('thunar')),
예제 #45
0
    # 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 a terminal.
    Key([mod], 'Return', lazy.spawn(_hso.terminal())),

    # Screen lock.
    Key([mod], 'Escape', lazy.spawn('dm-tool lock')),

    # Toggle between different layouts as defined below.
    Key([mod, 'shift'], 'Tab', lazy.prev_layout()),
    Key([mod], 'Tab', lazy.next_layout()),

    # Move between groups.
    Key([mod], 'grave', lazy.screen.prev_group()),
    Key([mod], 'BackSpace', lazy.screen.next_group()),
    Key([mod, 'shift'], 'grave', lazy.screen.toggle_group()),

    Key([mod], 'w', lazy.window.kill()),

    Key([mod, 'control'], 'r', lazy.restart()),
    Key([mod, 'control'], 'q', lazy.shutdown()),
    Key([mod], 'r', lazy.spawncmd()),
]


_groups_keys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']
예제 #46
0
    # Switch window focus to other pane(s) of stack
    Key([mod], 'space', lazy.layout.next()),

    # Swap panes of split stack
    Key([mod, 'shift'], 'space', lazy.layout.rotate()),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()),
    Key([mod], 'Return', lazy.spawn('xterm')),

    # Toggle between different layouts as defined below
    Key([mod], 'Tab', lazy.next_layout()),
    Key([mod], 'q', lazy.window.kill()),
    Key([mod, 'shift'], 'r', lazy.restart()),
    Key([mod, 'shift'], 'q', lazy.shutdown()),
    Key([mod], 'r', lazy.spawncmd()),

    # toggle floating mode
    Key([mod], 'f', lazy.window.toggle_floating()),

    # Media 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')),
예제 #47
0
파일: config.py 프로젝트: yantene/config
    Key([k_super], 'space', lazy.layout.next()),

    # スタックペインを入れ替える
    Key([k_super, k_shift], 'space', lazy.layout.rotate()),

    # スタックでウィンドウを分割表示するかしないかをトグルする
    Key([k_super], 'Return', lazy.layout.toggle_split()),

    # gnome-terminal を立ち上げる
    Key([k_super, k_shift], 'Return', lazy.spawn('termite')),

    # コマンド入力欄を表示する
    Key([k_super], 'd', lazy.spawncmd()),

    # レイアウトをトグルする
    Key([k_super], 'Tab', lazy.next_layout()),

    # ウィンドウを kill する
    Key([k_super, k_shift], 'c', lazy.window.kill()),

    # qtile を再起動・終了する
    Key([k_super, k_ctrl], 'r', lazy.restart()),
    Key([k_super, k_ctrl], 'q', lazy.shutdown()),

    # タッチパッド
    Key(
        [],
        'XF86TouchpadToggle',
        # VAIO Pro では Fn + F1 で XF86TouchpadToggle イベントが発生しないので使用不可
        lazy.spawn(
            'sh -c \"synclient TouchpadOff=$(synclient -l | grep -c \'TouchpadOff.*=.*0\')\"'
예제 #48
0
    Key([WIN, CTRL], 'j', lazy.layout.shuffle_up()),

    # Switch window focus to other pane(s) of stack
    Key([WIN], TAB, lazy.layout.next()),

    # Swap panes of split stack
    Key([WIN, 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([WIN, SHIFT], RETURN, lazy.layout.toggle_split()),

    # Toggle between different layouts as defined below
    Key([WIN], SPACE, lazy.next_layout()),
    Key([WIN], 'w', lazy.window.kill()),
    Key([WIN, CTRL], 'r', lazy.restart()),
    Key([WIN, CTRL], 'q', lazy.shutdown()),
    Key([WIN], 'r', lazy.spawncmd()),

    # Volume control
    Key([WIN], 'Up', lazy.spawn('amixer -c 1 -q set Master 2dB+')),
    Key([WIN], 'Down', lazy.spawn('amixer -c 1 -q set Master 2dB-')),

    # Brightness control
    Key([WIN], 'Right', lazy.spawn('xbacklight -inc 10')),
    Key([WIN], 'Left', lazy.spawn('xbacklight -dec 10')),

    # Applications hotkeys
    Key([WIN], RETURN, lazy.spawn('urxvt')),
예제 #49
0
    ),

    # 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, "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")),
]
예제 #50
0
파일: config.py 프로젝트: freddez/yoga
    Key([mod], "Right",
        lazy.layout.expand_branch()),  # for tree layout
    Key([mod, "shift"], "Left",
        lazy.layout.move_left()),
    Key([mod, "shift"], "Right",
        lazy.layout.move_right()),
    Key([mod, "control"], "Left",
        lazy.layout.decrease_ratio()),
    Key([mod, "control"], "Right",
        lazy.layout.increase_ratio()),
    # Switch window focus to other pane(s) of stack
    Key(
        [mod], "space",
        lazy.layout.next()
    ),
    Key([mod, "shift"], "Tab", lazy.next_layout()),
    Key([mod], "comma", lazy.layout.increase_nmaster()),
    Key([mod], "semicolon", lazy.layout.decrease_nmaster()),

    #Key([mod], "Tab", lazy.group.next_window()),

    Key([mod], "n", lazy.layout.up()),

    Key([mod], "Prior", lazy.layout.up()),
    Key([mod], "Next", lazy.layout.down()),
    # Key([mod, "control"], "Prior", lazy.layout.shift_up()),
    # Key([mod, "control"], "Next", lazy.layout.shift_down()),

    Key([mod], "Tab", lazy.group.prev_window()),
    Key([mod, "shift"], "Return", lazy.layout.rotate()),
    Key([mod, "shift"], "space", lazy.layout.toggle_split()),
예제 #51
0
파일: config.py 프로젝트: bogobog/qtile
        [mod, "mod1"], "Up",
        lazy.layout.grow()
    ),
    Key(
        [mod, "mod1"], "Down",
        lazy.layout.shrink()
    ),

    # Swap panes of split stack
    Key(
        [mod, "shift"], "Down",
        lazy.window.enable_minimize()
    ),

    # 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.spawn("dmenu_run -i -fn '-*-droid sans-medium-*-*-*-13-*-*-*-*-*-*-*' -nb '#737373' -nf '#000000'")),

    # lock screen
    Key([mod], "l", lazy.spawn( home + "/bin/qtile/lock.sh" ) ),

]

groups = [ Group(i) for i in "kwdmc" ]

for i in groups:
    # mod1 + letter of group = switch to group
예제 #52
0
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
예제 #53
0
파일: config.py 프로젝트: yanganto/qtile
    # Swap panes of split stack
    Key([mod], "Tab", 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()),

    # 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")),
]
예제 #54
-1
파일: config.py 프로젝트: Jdaco/dotfiles
 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)
     ]