コード例 #1
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)
コード例 #2
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
        ]
コード例 #3
0
def get_keyboard_hotkey(mod):
    return [
        Key([mod], "k",
            lazy.layout.down()),
        Key([mod], "j",
            lazy.layout.up()),
        Key([mod, "shift"], "k",
            lazy.layout.shuffle_down()),
        Key([mod, "shift"], "j",
            lazy.layout.shuffle_up()),
        Key([mod], "l",
            lazy.layout.grow()),
        Key([mod], "h",
            lazy.layout.shrink()),
        Key([mod], "n",
            lazy.layout.normalize()),
        Key([mod], "o",
            lazy.layout.maximize()),
        Key([mod], "space",
            lazy.nextlayout()),
        Key([mod], "r",
            lazy.function(lambda qtile: DMenu().run(True))),
        Key([mod, "shift"], "r",
            lazy.function(lambda qtile: DMenu().run(False))),
        Key([mod, "control"], "r",
            lazy.spawncmd()),
        Key([mod], "equal",
            lazy.function(inc_volume)),
        Key([mod], "minus",
            lazy.function(dec_volume)),
        Key([mod], "Return",
            lazy.spawn("urxvt")),
        Key([mod], "e",
            lazy.spawn("emacs")),
        Key([mod, "shift"], "q",
            lazy.window.kill()),
        Key([mod, "shift", "control"], "r",
            lazy.restart()),
        Key([mod, "shift", "control"], "q",
            lazy.shutdown()),
        Key([mod, "shift"], "d",
            lazy.hide_show_bar()),
    ]
コード例 #4
0
    Key([mod,"control"],"s",lazy.spawn("systemctl suspend")),

    #Monitor commands: 
    Key([mod], "0", lazy.next_screen() ),
    Key([mod], "apostrophe",switch_screens() ),

    # Sound
    Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")),
    Key([], "XF86AudioLowerVolume", lazy.spawn("amixer set 'Master' 3%-")),
    Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer set 'Master' 3%+")), 
    Key([], "XF86AudioPlay", lazy.spawn("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause")),
    Key([], "XF86AudioNext", lazy.spawn("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next")),
    Key([], "XF86AudioPrev", lazy.spawn("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous")),

    #Brightness
    Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")),
    Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 10%-")),
    Key([mod],"F1", lazy.spawn("bash /home/anyel/.config/qtile/scripts/HDMI1_brightness.sh =")),
    Key([mod],"Up", lazy.spawn("bash /home/anyel/.config/qtile/scripts/HDMI1_brightness.sh +")),
    Key([mod],"Down", lazy.spawn("bash /home/anyel/.config/qtile/scripts/HDMI1_brightness.sh -")),
    #Night light
    Key([mod],"Right",lazy.spawn("redshift -Pg 0.8:0.7:0.8 -O 4800")), 
    Key([mod],"Left",lazy.spawn("redshift -x")),

    #Bar
    Key([mod], "BackSpace" , lazy.hide_show_bar("top")),
    
]


コード例 #5
0
ファイル: config.py プロジェクト: Cardoso1994/dotfiles
aqua = "#689d68"
gray = "#a89984"
darkgray = "#1d2021"

###############################################################################
# => KEY COMBINATIONS
###############################################################################
keys = [
    # SUPER + FUNCTION KEYS
    Key([mod], "Return", lazy.spawn('st')),
    Key([mod], "Escape", lazy.spawn('xkill')),
    Key([mod], "d",
        lazy.spawn('dmenu_run -i -nb ' + darkgray + ' -nf ' + aqua + ' -sb ' +
                   green + ' -sf ' + darkgray + ' -fn ' +
                   "'Cascadia Code PL:semilight:pixelsize=28'")),
    Key([mod], "b", lazy.hide_show_bar()),
    # TOUCHPAD ON - OFF
    Key([mod], "p",
        lazy.spawn('/home/cardoso/.config/scripts/pad_on_off.sh off')),
    Key([mod], "o",
        lazy.spawn('/home/cardoso/.config/scripts/pad_on_off.sh on')),
    # SUPER + SHIFT KEYS
    Key([mod, "shift"], "Return",
        lazy.spawn("st" + " -e /home/cardoso/.config/vifm/scripts/vifmrun")),
    Key([mod, "shift"], "q", lazy.window.kill()),
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "shift"], "x", lazy.spawn('/home/cardoso/.config/scripts/exit')),
    Key([mod, "shift"], "d",
        lazy.spawn(f'j4-dmenu-desktop --dmenu="dmenu -i' +
                   f" -nb '{darkgray}'" + f" -nf '{aqua}' " +
                   f" -sb '{green}' -sf '{darkgray}' " +
コード例 #6
0
ファイル: config.py プロジェクト: michaelyhe/dotfiles
     desc='Toggle through layouts'
     ),
 Key([mod], "q",
     lazy.window.kill(),
     desc='Kill active window'
     ),
 Key([mod, "control"], "r",
     lazy.restart(),
     desc='Restart Qtile'
     ),
 Key([mod, "control"], "q",
     lazy.shutdown(),
     desc='Shutdown Qtile'
     ),
 Key([mod], "b",
     lazy.hide_show_bar(),
     desc='Toggle bar'
     ),
 ### Lockscreen lol
 Key([mod, "control"], "l",
     lazy.spawn(f"i3lock \
             --insidever-color={CLEAR} \
             --ringver-color={VERIFYING} \
             --insidewrong-color={CLEAR} \
             --ringwrong-color={WRONG} \
             --inside-color={BLANK} \
             --ring-color={DEFAULT} \
             --line-color={BLANK} \
             --separator-color={DEFAULT} \
             --verif-color={TEXT} \
             --wrong-color={TEXT} \
コード例 #7
0
ファイル: config.py プロジェクト: aborilov/dotfiles
     ),
 Key(
     [mod], "o",
     lazy.spawn("pcmanfm")
     ),
 Key(
     [mod], "u",
     lazy.spawn("uzbl-tabbed")
     ),
 Key(
     [mod], "c",
     lazy.spawn("notify-send _")
     ),
 Key(
     [mod], "b",
     lazy.hide_show_bar()
     ),
 # Key([mod], "Return", lazy.spawn("urxvt -e screen -x -R")),
 # Key([mod], "Return", lazy.spawn("sh -c \"tmux ls -F '#{session_name}' | \
                                 # dmenu -l 7\" ")),
 Key([mod], "Return", lazy.spawn("""sh -c "tmux ls -F '#{session_name}' \
                                 | dmenu -l 7 | xargs -I{} urxvtcd -e \
                                 sh -c 'tmux attach -t {} || \
                                 tmux new -s {}'" """)),
 # Key([mod], "Return", lazy.spawn("urxvt")),
 # Key([mod], "Return", lazy.spawn("/tmp/1.sh")),
 # Key([mod], "Return", lazy.spawn("screen -ls | head -n -2 | tail -n +2 | dmenu -l 5 | awk '{print \$1}' | awk -F. '{print \$2}' | xargs urxvt -e screen -R -x")),
 # 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
コード例 #8
0
ファイル: qtile_config.py プロジェクト: buyaoshushu/myrc
    # Swap panes of split stack
    Key("M-S-<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("M-S-<Return>", lazy.layout.toggle_split()),
    Key("M-<Return>", lazy.spawn("lilyterm")),
    Key("M-d", lazy.spawn("rofi -show run")),
    Key("M-f", lazy.spawn("rofi -show")),
    # Toggle between different layouts as defined below
    Key("M-<Tab>", lazy.next_layout()),
    Key("M-w", lazy.window.kill()),
    Key("M-S-f", lazy.hide_show_bar()),
    Key("M-C-r", lazy.restart()),
    Key("M-C-q", lazy.shutdown()),
    Key("M-C-f", lazy.window.toggle_floating()),
    Key("M-r", lazy.spawncmd()),
]


def init_groups():
    def _inner(key, name, match):
        keys.append(Key("M-" + key, lazy.group[name].toscreen()))
        keys.append(Key("M-S-" + key, lazy.window.togroup(name)))
        return Group(name, matches=match)

    #groups = [("1", "1")]
    #groups = [(str(i), "0" + str(i)) for i in range(1, 10)]
コード例 #9
0
    battery_text = battery.copy()
    battery_text.update({
        'low_foreground': 'FF0000',
        'charge_char': "↑ ",
        'discharge_char': "↓ ",
        'format': '{char}{hour:d}:{min:02d}',
        })


##-> Keybindings
mod = 'mod4'
keys = [
    ## Window Manager Controls
    Key([mod, 'control'], 'r', lazy.restart()),
    Key([mod, 'control'], 'q', lazy.spawn(Commands.dmenu_session)),
    Key([mod, "shift"], "x", lazy.hide_show_bar("top")),
    Key([mod, 'shift'], 'w', lazy.window.kill()),
    Key([mod, 'shift'], "Tab", lazy.next_screen()),

    ## Window Controls
    Key([mod], "n", lazy.layout.reset()), # normalize is useless
    Key([mod], "o", z_maximize),
    Key([mod, "shift"], "space", lazy.layout.flip()),
    # Switch window focus to other pane(s) of stack
    Key( [mod], "space", lazy.layout.next()),
    Key( [mod], "k", lazy.layout.down()),
    Key( [mod], "j", lazy.layout.up()),
    # Move windows up or down in current stack
    Key( [mod, "control"], "k", lazy.layout.shuffle_down()),
    Key( [mod, "control"], "j", lazy.layout.shuffle_up()),
    Key([mod, "shift"], "l", lazy.layout.grow()),
コード例 #10
0
     desc='Launches Emacs'),
 Key([mod], "a", lazy.spawn("firefox"), desc='Launches Firefox'),
 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, "shift"],
     "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'),
 # Hide topbar
 Key([mod], "z", lazy.hide_show_bar("top"), desc='Hide bar'),
 Key([mod, "shift"], "q", lazy.shutdown(), desc='Shutdown Qtile'),
 ### Window controls
 Key([mod],
     "k",
     lazy.layout.down(),
     desc='Move focus down in current stack pane'),
 Key([mod],
     "j",
     lazy.layout.up(),
     desc='Move focus up in current stack pane'),
 Key([mod, "shift"],
     "k",
     lazy.layout.shuffle_down(),
     desc='Move windows down in current stack'),
 Key([mod, "shift"],
コード例 #11
0
    # n deixa do tamanho original, e m maimiza o foco
    Key([mod], 'n', lazy.layout.normalize()),
    Key([mod, "shift"], "n", lazy.layout.reset()),
    Key([mod], "m", lazy.layout.maximize()),
    #shift+m muda para o layout max, e volta ao original
    Key([mod, "shift"], "m", fullwm),
    Key([mod], 't', lazy.window.toggle_floating()),
    #espaço vai para proximo layout
    #shift vai para o modo fullscreen,diferente do m, ele tira a barra e é full screen total(muda no navegador
    #por exemplo)
    #control volta para o layout anterior
    Key([mod], "space", lazy.next_layout()),
    Key([mod, "shift"], "space", lazy.window.toggle_fullscreen()),
    Key([mod, "control"], "space", lazy.prev_layout()),
    #b some com a barra de cima e de baixo
    Key([mod], "b", lazy.hide_show_bar("top")),
    Key([mod], "b", lazy.hide_show_bar("bottom")),

    #comandos
    Key([mod], "Return", lazy.spawn("terminator")),
    Key([mod], "f", lazy.spawn("firefox")),
    Key([mod], "Print",
        lazy.spawn("scrot -e 'mv $f ~/pictures/screenshots/'")),
    Key([mod], "q", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    #lança o launcher
    Key([mod], "d",
        lazy.spawn(
            "rofi -show run -lines 2 -eh 1 -width 100 -padding 0 -opacity '95' -bw 0 -bc '$bg-color' -bg '$bg-color' -fg '$text-color' -hlbg '$bg-color' -hlfg '#9575cd' -font 'System San Francisco Display 10' -location 1 —auto-select"
        )),
コード例 #12
0
ファイル: config.py プロジェクト: alexander-neville/dotfiles
        "l",
        lazy.layout.grow_right(),
        desc="Grow window to the right"),
    Key([mod, "shift"], "j", lazy.layout.grow_down(), desc="Grow window down"),
    Key([mod, "shift"], "k", lazy.layout.grow_up(), desc="Grow window up"),
    Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),

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

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

    # Applications
    Key([mod],
        "p",
        lazy.spawn("application_launcher.sh"),
        desc="Spawn a command using a prompt widget"),
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    #Key([mod], "e", lazy.spawn("emacsclient -c"), desc="Launch emacs"),
    Key([mod], "e", lazy.spawn("emacs"), desc="Launch emacs"),
    Key([mod], "f", lazy.spawn("pcmanfm"), desc="Launch a file browser"),
    Key([mod], "s", lazy.spawn("brave"), desc="Launch a web browser"),
コード例 #13
0
ファイル: config.py プロジェクト: CaptainEureka/dotfiles
# KEYBINDINGS
keys = [
    # The essentials
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches Terminal'),
    Key([mod, "shift"],
        "Return",
        lazy.spawn(
            "rofi -show drun -modi drun,file-browser,window,run -theme appslist"
        ),
        desc='Rofi 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"], "c", lazy.shutdown(), desc='Shutdown Qtile'),
    Key([mod, "shift"], "e", lazy.hide_show_bar(), desc='Toggle bar'),
    # 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'),
    # Move focus to next/prev group
    Key([mod, "control"],
        "Right",
        lazy.screen.next_group(),
        desc='Move focus to next group'),
    Key([mod, "control"],
        "Left",
        lazy.screen.prev_group(),
        desc='Move focus to previous group'),
    # Window controls
    Key([mod],
コード例 #14
0
ファイル: config.py プロジェクト: cocuh/.dotfiles
    # Switch window focus to other pane(s) of stack
    Key([mod], "space", lazy.layout.swap_left()),

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

    # Toggle between different layouts
    Key([mod], "Tab", lazy.next_layout()),
    # window close
    Key([mod, "shift"], "q", lazy.window.kill()),
    # disable floating
    Key([mod], "t", lazy.window.toggle_floating()),

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

groups = [Group(name) for name in "1234567890-="]

for g in groups:
    key_name = {
        '-': 'minus',
        '=': 'equal',
    }.get(g.name, g.name)

    # mod1 + letter of group = switch to group
    keys.append(
        Key([mod], key_name, lazy.group[g.name].toscreen())
    )
コード例 #15
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
        ]
コード例 #16
0
        ([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], "Tab", lazy.next_layout()),
        ([mod, "shift"], "Tab", lazy.prev_layout()),

        # Toggle show or hide top bar
        ([mod, "shift"], "f", lazy.hide_show_bar("top")),

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

        # Switch focus of monitors
        ([mod], "period", lazy.next_screen()),
        ([mod], "comma", lazy.prev_screen()),

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

        # ------------ Rofi Configs ------------
        ([mod], "a", lazy.spawn(home + '/.config/rofi/bin/applet_apps')),
コード例 #17
0
    Key("M-n", lazy.layout.reset()),
    Key("M-S-<space>", lazy.layout.flip()),

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

    # Switch between monitors
    Key("M-<comma>", lazy.prev_screen()),
    Key("M-<period>", lazy.next_screen()),

    Key("M-<Return>", lazy.spawn("kitty -e tmux")),
    Key("A-S-<space>", z_next_keyboard),
    Key("M-<Tab>", lazy.next_layout()),
    Key("M-S-w", lazy.window.kill()),

    Key("M-S-x", lazy.hide_show_bar("top")),
    Key("M-C-x", lazy.hide_show_bar("bottom")),

    Key("M-C-r", lazy.restart()),
    Key("M-C-f", lazy.window.toggle_floating()),

    # Sound
    Key('<XF86AudioRaiseVolume>', lazy.spawn(Commands.volume_up)),
    Key('<XF86AudioLowerVolume>', lazy.spawn(Commands.volume_down)),
    Key('M-<Up>', lazy.spawn(Commands.volume_up)),
    Key('M-<Down>', lazy.spawn(Commands.volume_down)),
    Key('<XF86AudioMute>', lazy.spawn(Commands.volume_toggle)),
    Key('<XF86AudioMicMute>', lazy.spawn(Commands.mic_toggle)),

    # Other FN keys
    Key('<XF86MonBrightnessUp>', lazy.spawn(Commands.brightness_up)),
コード例 #18
0
import os
import socket
import subprocess
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
from libqtile.lazy import lazy
from typing import List  # noqa: F401

mod = "mod4"  # Sets mod key to SUPER/WINDOWS
alt = "mod1"
myTerm = "alacritty"  # My terminal of choice

keys = [
    # The essentials
    Key([mod], "t", lazy.hide_show_bar("top"), desc="Toggle bar"),
    Key([mod], "b", lazy.spawn("brave"), desc="Toggle bar"),
    Key([mod], "v", lazy.spawn("vlc"), desc="Toggle bar"),
    Key([mod], "c", lazy.spawn('colors')),
    Key([mod, "shift"], "e", lazy.spawn('emacs'), desc="Opens emacs"),
    Key([mod], "r", lazy.spawn('rofi -show run'), desc="Opens rofi"),
    Key([alt],
        "Tab",
        lazy.screen.togglegroup(),
        desc="Alt+tab for toggling groups"),
    Key([mod], "f", lazy.toggle_fullscreen(), desc="Toggles Fullscreen"),
    Key([],
        "Print",
        lazy.spawn('flameshot gui'),
        desc="Screenshot with flameshot"),
    Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
コード例 #19
0
ファイル: config.py プロジェクト: ayamir/dwm-dotfiles
 Key(
     [mod],
     "Tab",
     lazy.next_layout(),
     desc="Toggle through layouts",
 ),
 Key(
     [mod, "shift"],
     "Tab",
     lazy.prev_layout(),
     desc="Toggle through layouts",
 ),
 Key(
     [mod],
     "b",
     lazy.hide_show_bar("top"),
     desc="Kill focused window",
 ),
 Key(
     [mod],
     "q",
     lazy.window.kill(),
     desc="Kill focused window",
 ),
 Key(
     [mod, "shift"],
     "q",
     lazy.spawn("xkill"),
     desc="Force kill window",
 ),
 Key(
コード例 #20
0
ファイル: config.py プロジェクト: findNextStep/mydot
    Key([super_l, alt_l], "k", lazy.layout.shrink(), lazy.layout.shuffle_up()),
    Key([super_l, alt_l], "h", lazy.layout.shuffle_left()),
    Key([super_l, alt_l], "l", lazy.layout.shuffle_right()),
    Key([mod, control], "n", lazy.layout.normalize()),
    Key([mod, control], "o", lazy.layout.maximize()),
    Key([mod, control], "space", lazy.layout.flip()),
    Key([alt_l], "Tab", lazy.group.next_window(),
        lazy.function(lambda x: focus_transset(x.currentWindow))),
    Key([mod], 'c', lazy.window.kill(), lazy.group.next_window(),
        lazy.function(lambda x: focus_transset(x.currentWindow))),
    Key([mod, super_l], 'r', lazy.restart()),
    Key([mod], "space", lazy.function(toggle_layout)),
    Key([mod, shift], 'space', lazy.group.setlayout(layouts[2].name)),
    Key([mod], 't', lazy.window.toggle_floating()),
    Key([mod], 'F12', lazy.window.toggle_fullscreen()),
    Key([mod], 'n', lazy.hide_show_bar('bottom')),
]

keys.extend([
    Key([mod, shift], 'q', lazy.shutdown()),
    Key([mod, shift], 'r', lazy.restart()),
])


def open_web(url):
    return lazy.spawn('firefox ' + url)


m = PyMouse()

コード例 #21
-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)
     ]