Beispiel #1
0
def get_manage_mode_keys():
    keys = []
    keychords = NAV_KEYS.copy()

    keychords.append(
        Key([], "c", lazy.window.kill(), desc="Kill focused window"), )

    for group in get_groups():
        keychords.append(
            Key([],
                group.name[0],
                lazy.group[group.name].toscreen(),
                desc="Switch to group {}".format(group.name)))
        keychords.append(
            Key(['mod1'],
                group.name[0],
                lazy.window.togroup(group.name, switch_group=True),
                desc="move focused window and jump to group {}".format(
                    group.name)))
        keychords.append(
            Key(['shift'],
                group.name[0],
                lazy.window.togroup(group.name),
                desc="move focused window to group {}".format(group.name)))

    keys.append(KeyChord([MOD, "shift"], "m", keychords, mode="manage"))

    return keys
Beispiel #2
0
def get_kill_mode_keys():
    keys = []
    keychords = NAV_KEYS.copy()
    keychords.append(
        Key([], "Return", lazy.window.kill(), desc="Kill focused window"), )

    keys.append(KeyChord([MOD, "shift"], "c", keychords, mode="kill"))

    return keys
Beispiel #3
0
def get_move_mode_keys():
    keys = []
    keychords = NAV_KEYS.copy()

    for group in get_groups():
        keychords.append(
            Key([],
                group.name[0],
                lazy.window.togroup(group.name),
                desc="move focused window to group {}".format(group.name)))
        keychords.append(
            Key(['mod1'],
                group.name[0],
                lazy.window.togroup(group.name, switch_group=True),
                desc="move focused window and jump to group {}".format(
                    group.name)))

    keys.append(KeyChord([MOD], "m", keychords))

    return keys
Beispiel #4
0
        lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
    Key([], 'XF86MonBrightnessUp', lazy.spawn("brightnessctl set +10%")),
    Key([], 'XF86MonBrightnessDown', lazy.spawn("brightnessctl set 10%-")),

    # screenshot keys
    Key([mod], "Print", lazy.spawn("/home/sammy/.config/scrot/run.sh")),
    Key([mod, "shift"], "Print",
        lazy.spawn("/home/sammy/.config/scrot/run.sh -u")),

    # Launch mode: keyboard shortcuts to launch a bunch of programs.
    KeyChord([mod],
             "p", [
                 Key([], "f", lazy.spawn("firefox")),
                 Key([], "s", lazy.spawn("spotify")),
                 Key([], "d", lazy.spawn("discord")),
                 Key([], "c", lazy.spawn("code")),
                 Key([], "r", lazy.spawn("alacritty -e ranger")),
                 Key([], "t", lazy.spawn("thunar")),
                 Key([], "m", lazy.spawn("multimc"))
             ],
             mode="launch"),
    Key([mod], "g", lazy.spawn("/home/sammy/.config/i3/i3lock"))
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
Beispiel #5
0
def get_keepmod_mod_keys():
    keys = []
    keychords = NEED_MOD_KEYS.copy()
    keys.append(KeyChord([MOD, 'control'], "m", keychords, mode="keepmod"))
    return keys
Beispiel #6
0
 KeyChord([mod], "p", [
     Key([], "e",
         lazy.spawn("./dmscripts/dmconf"),
         desc='Choose a config file to edit'
         ),
     Key([], "i",
         lazy.spawn("./dmscripts/dmscrot"),
         desc='Take screenshots via dmenu'
         ),
     Key([], "k",
         lazy.spawn("./dmscripts/dmkill"),
         desc='Kill processes via dmenu'
         ),
     Key([], "l",
         lazy.spawn("./dmscripts/dmlogout"),
         desc='A logout menu'
         ),
     Key([], "m",
         lazy.spawn("./dmscripts/dman"),
         desc='Search manpages in dmenu'
         ),
     Key([], "o",
         lazy.spawn("./dmscripts/dmqute"),
         desc='Search your qutebrowser bookmarks and quickmarks'
         ),
     Key([], "r",
         lazy.spawn("./dmscripts/dmred"),
         desc='Search reddit via dmenu'
         ),
     Key([], "s",
         lazy.spawn("./dmscripts/dmsearch"),
         desc='Search various search engines via dmenu'
         ),
     Key([], "p",
         lazy.spawn("passmenu"),
         desc='Retrieve passwords with dmenu'
         )
 ])
Beispiel #7
0
    Key([mod], 'r', lazy.spawn('dmenu_history -h 20 -s')),

    # Scripts
    Key([mod, 'shift'], 'e', lazy.spawn('layout')),
    Key([alt, 'shift'], 's',
        lazy.spawn(
            'scrot -p -q 100 /home/aedigo/Documents/Pictures/%Y-%m-%d-%T-screenshot.png'
        )),
    Key([mod, 'shift'], 'u', lazy.spawn('volume inc')),
    Key([mod, 'shift'], 'd', lazy.spawn('volume dec')),
    Key([mod, 'shift'], 'm', lazy.spawn('volume mute')),
    Key([mod, 'control'], 't', lazy.spawn('getHours')),
    Key([mod, 'control'], 'l', lazy.spawn('lockIt')),
    KeyChord([mod, 'shift'], 'p', [
        Key([], 's', lazy.spawn('pomodoro ""')),
        Key([], 'c', lazy.spawn('pomodoro cancel')),
        Key([], 'r', lazy.spawn('pomodoro revision')),
    ]),

    # Terminal Based Apps
    Key([mod, 'shift'], 'r', lazy.spawn(terminal + " -e ttrv")),
    Key([alt], 'n', lazy.spawn(terminal + " -e nnn")),
    Key([mod], 'v',
        lazy.spawn(terminal + ' -e nvim /home/aedigo/.vimwiki/index.md')),
    Key([mod, 'shift'], 't', lazy.spawn(terminal + ' -e gotop')),
]

mouse = [
    Drag([alt],
         'Button1',
         lazy.window.set_position_floating(),
Beispiel #8
0
    Key([], 'XF86AudioMicMute',
        lazy.spawn("pactl set-source-mute @DEFAULT_SOURCE toggle")),
    Key([], 'XF86AudioRaiseVolume',
        lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")),
    Key([], 'XF86AudioLowerVolume',
        lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")),

    # Brightness
    Key([], 'XF86MonBrightnessDown', lazy.spawn("brightnessctl s 10%-")),
    Key([], 'XF86MonBrightnessUp', lazy.spawn("brightnessctl s +10%")),

    # System Mode
    KeyChord([mod, "shift"],
             "s", [
                 Key([], "p", lazy.spawn("systemctl poweroff")),
                 Key([], "r", lazy.spawn("systemctl reboot")),
                 Key([], "l",
                     lazy.spawn("i3lock -i ~/Pictures/wallpapers/current.png"))
             ],
             mode="System"),

    # Others
    Key([mod], "a", lazy.spawn("rofi -show drun")),
    Key([mod], "f", lazy.window.toggle_floating()),
    Key([mod], "Return", lazy.spawn(terminal)),
    # reload_config hasn't been released yet. It'll be needed on Wayland.
    # Key([mod, "shift"], "r", lazy.reload_config()),
    Key([mod, "shift"], "r", lazy.restart()),
    Key([mod, "shift"], "q", lazy.window.kill()),
]

# Groups
Beispiel #9
0
 KeyChord(["control"], "e", [
     Key([],
         "e",
         lazy.spawn("emacsclient -c -a 'emacs'"),
         desc='Launch Emacs'),
     Key([],
         "b",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(ibuffer)'"),
         desc='Launch ibuffer inside Emacs'),
     Key([],
         "d",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"),
         desc='Launch dired inside Emacs'),
     Key([],
         "i",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(erc)'"),
         desc='Launch erc inside Emacs'),
     Key([],
         "m",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(mu4e)'"),
         desc='Launch mu4e inside Emacs'),
     Key([],
         "n",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(elfeed)'"),
         desc='Launch elfeed inside Emacs'),
     Key([],
         "s",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(eshell)'"),
         desc='Launch the eshell inside Emacs'),
     Key([],
         "v",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(+vterm/here nil)'"),
         desc='Launch vterm inside Emacs')
 ]),
Beispiel #10
0
    Key([],
        "XF86AudioPlay",
        lazy.spawn("mocp -G"),
        desc="Toggle between playing and paused"),
    Key([], "XF86AudioStop", lazy.spawn("mocp -s"), desc="Stop playing"),
    Key([], "XF86AudioNext", lazy.spawn("mocp -f"), desc="Play the next song"),
    Key([],
        "XF86AudioPrev",
        lazy.spawn("mocp -r"),
        desc="Play the previous song"),
    Key([mod],
        "s",
        lazy.spawn("school-meetings"),
        desc="Launch school meetings script"),
    KeyChord([mod], "t", [
        Key([], "p", lazy.spawn(terminal + " -e pulsemixer")),
        Key([], "m", lazy.spawn(terminal + " -e mocp")),
    ]),
    KeyChord([mod], "b", [
        Key([], "p", lazy.spawn(private_browser)),
        Key([], "g", lazy.spawn(browser + "https://github.com/GastonGiane")),
        Key([], "t", lazy.spawn(browser + "https://twitter.com/home")),
        Key([], "r", lazy.spawn(browser + "http://rarbggo.org/torrents.php")),
        Key([], "b", lazy.spawn(browser + "https://duckduckgo.com/")),
        Key([], "y", lazy.spawn(browser + "https://youtube.com/")),
        Key([], "m", lazy.spawn(browser + "https://mail.google.com/mail/")),
        Key([], "c",
            lazy.spawn(browser + "https://calendar.google.com/calendar/")),
    ]),
]

mouse = [
Beispiel #11
0
 KeyChord(
     [mod],
     'q',
     [
         KeyChord(
             [],
             's', [
                 Key([], 'r', lazy.restart(), desc='Restart qtile'),
                 Key(['control'], 'q', lazy.shutdown(), desc='Kill qtile')
             ],
             mode='qtile.session'),
         KeyChord([],
                  'l', [
                      Key([], 'plus',
                          lazy.layout.increase_nmaster().when('tile')),
                      Key([], 'minus',
                          lazy.layout.decrease_nmaster().when('tile')),
                      Key([], 'r', lazy.layout.rotate()),
                      Key([], 'Return', lazy.layout.maximize(),
                          lazy.ungrab_all_chords()),
                      Key(['shift'], 'Return', lazy.layout.normalize(),
                          lazy.ungrab_all_chords()),
                      KeyChord([], 't', [
                          Key([], 's', lazy.layout.toggle_split()),
                      ]),
                  ],
                  mode='qtile.layout'),
         KeyChord([],
                  't', [
                      Key([], 's',
                          lazy.function(
                              theme_factory.select_theme_interactively),
                          lazy.ungrab_all_chords()),
                      Key([], 't', lazy.function(
                          theme_factory.switch_light),
                          lazy.ungrab_all_chords()),
                  ],
                  mode='qtile.theme'),
         # Key([mod], 'F1', lazy.spawn(TermCmd(
         # 'bash -c "cat %r; read -n 10 -rs -p \'Press any key to quit\'"' %
         # (HOME + '/.config/qtile/keybindings.md'))),
         # desc='Show keybindings'),
     ],
     mode='qtile'),
Beispiel #12
0
def my_shortcuts():
    return [
        # ---------- KEYBOARD LAYOUT ----------
        Key([mod, "shift"], "d", lazy.spawn("setxkbmap de")),
        Key([mod, "shift"], "e", lazy.spawn("setxkbmap us")),
        # ---------- WINDOW MANAGEMENT ----------
        Key([mod],
            "f",
            lazy.window.toggle_fullscreen(),
            desc="Toggle Fullscreen"),
        Key([mod],
            "k",
            lazy.layout.down(),
            desc="Move focus down in stack pane"),
        Key([mod], "j", lazy.layout.up(), desc="Move focus up in stack pane"),
        Key([mod],
            "h",
            lazy.layout.left(),
            desc="Move focus left in stack pane"),
        Key([mod],
            "l",
            lazy.layout.right(),
            desc="Move focus right in stack pane"),
        Key(
            [mod, "shift"],
            "k",
            lazy.layout.shuffle_down(),
            desc="Move window down in current stack ",
        ),
        Key(
            [mod, "shift"],
            "j",
            lazy.layout.shuffle_up(),
            desc="Move window up in current stack ",
        ),
        Key(
            [mod, "shift"],
            "h",
            lazy.layout.shuffle_left(),
            desc="Move window left in current stack ",
        ),
        Key(
            [mod, "shift"],
            "l",
            lazy.layout.shuffle_right(),
            desc="Move window right in current stack ",
        ),
        Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
        # ---------- FUNCTION KEYS ----------
        Key([], "XF86AudioMute", lazy.spawn("amixer -q set Master toggle")),
        Key([], "XF86AudioLowerVolume",
            lazy.spawn("amixer -q sset Master 3%- unmute")),
        Key([], "XF86AudioRaiseVolume",
            lazy.spawn("amixer -q sset Master 3%+ unmute")),
        # TODO Keyboard Backlight
        # ---------- QTILE ----------
        Key([mod, "shift"],
            "c",
            lazy.window.kill(),
            desc="Kill focused window"),
        Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
        Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
        # ---------- SCRIPTS ----------
        KeyChord(
            [mod],
            "s",
            [
                Key(
                    [],
                    "c",
                    lazy.spawn(
                        "python /home/alex/Coding/pythonscripts/claphands.py"),
                    desc="Clap 👏 Hands",
                ),
                Key(
                    [],
                    "v",
                    lazy.spawn("script-ytv getclip"),
                    desc="Automatically download URL as video",
                ),
                Key(
                    [],
                    "a",
                    lazy.spawn("script-yta getclip"),
                    desc="Automatically download URL as audio",
                ),
            ],
        ),
        # ---------- LAUNCH PROGRAMS ----------
        KeyChord(
            [mod],
            "d",
            [
                Key([], "space", lazy.spawn(terminal), desc="Launch terminal"),
                Key([], "b", lazy.spawn("brave"), desc="Launch Browser"),
                Key(
                    [],
                    "s",
                    lazy.spawn("signal-desktop"),
                    desc="Launch Signal",
                ),
                Key(
                    [],
                    "m",
                    lazy.spawn("element-desktop"),
                    desc="Launch Matrix client Element",
                ),
                Key(
                    [],
                    "t",
                    lazy.spawn("telegram-desktop"),
                    desc="Launch Telegram",
                ),
                Key(
                    [],
                    "k",
                    lazy.spawn("keepassxc"),
                    desc="Launch KeepAssXC",
                ),
                Key([], "d", lazy.spawn("dolphin"), desc="Launch Dolphin"),
                Key([], "f", lazy.spawn("firefox"), desc="Launch Firefox"),
            ],
        ),
        # ---------- ROFI ----------
        KeyChord(
            [mod],
            "space",
            [
                Key(
                    [],
                    "space",
                    lazy.spawn("rofi -show drun"),
                    desc="Spawn a command using a prompt widget",
                ),
                Key(
                    [],
                    "e",
                    lazy.spawn("rofi -show emoji -modi emoji"),
                    desc="Spawn a command using a prompt widget",
                ),
                Key(
                    [],
                    "w",
                    lazy.spawn("rofi -show window"),
                    desc="Spawn a command using a prompt widget",
                ),
                Key(
                    [],
                    "n",
                    lazy.spawn(
                        "rofi-wifi-menu -config ~/dotfiles/rofi/monokai.rasi"),
                    desc="Spawn wifi menu",
                ),
                Key(
                    [],
                    "b",
                    lazy.spawn("rofi-bluetooth"),
                    desc="Spawn bluetooth menu",
                ),
            ],
        ),
        # ---------- EMACS ----------
        KeyChord(
            [mod],
            "i",
            [
                Key(
                    [],
                    "e",
                    lazy.spawn("emacsclient -c -a 'emacs'"),
                    desc="Launch Emacs",
                ),
                Key(
                    [],
                    "s",
                    lazy.spawn("emacs --daemon"),
                    desc="Start Emacs daemon",
                ),
                Key(
                    [],
                    "b",
                    lazy.spawn("emacsclient -c -a 'emacs' --eval '(ibuffer)'"),
                    desc="Launch ibuffer inside Emacs",
                ),
                Key(
                    [],
                    "d",
                    lazy.spawn(
                        "emacsclient -c -a 'emacs' --eval '(dired nil)'"),
                    desc="Launch dired inside Emacs",
                ),
                Key(
                    [],
                    "k",
                    lazy.spawn("pkill emacs"),
                    desc="Kill emacs",
                ),
            ],
        ),
    ]
Beispiel #13
0
        lazy.spawn("rofi -show run"),
        desc='Run command using rofi'),
    KeyChord([mod], "z", [
        Key([],
            "d",
            lazy.spawn("kcmshell5 kscreen"),
            desc='KScreen Display Settings'),
        Key([],
            "m",
            lazy.spawn("clementine"),
            desc='Start Music Player (Clementine)'),
        Key([],
            "k",
            lazy.spawn("keepassxc"),
            desc='Start Password Manager (KeePassXC)'),
        Key([],
            "w",
            lazy.spawn("libreoffice --writer"),
            desc='Start Libre Office Writer'),
        Key([],
            "x",
            lazy.spawn("libreoffice --calc"),
            desc='Start Libre Office Calc'),
        Key([], "c", lazy.spawn("chromium --calc"), desc='St'),
        Key([],
            "q",
            lazy.spawn("qt5ct --calc"),
            desc='Open Qt configuration tool'),
        Key([], "t", lazy.spawn("xterm"), desc='Open Xterm'),
    ]),

    # Application shortcuts
Beispiel #14
0
 KeyChord(
     [mod],
     "r",
     [
         Key(
             [],
             "h",
             lazy.layout.grow_left(),
         ),
         Key(
             [],
             "j",
             lazy.layout.grow_down(),
             lazy.layout.shrink(),
         ),
         Key(
             [],
             "k",
             lazy.layout.grow_up(),
             lazy.layout.grow(),
         ),
         Key(
             [],
             "l",
             lazy.layout.grow_right(),
         ),
         Key(
             [],
             "Left",
             lazy.layout.grow_left(),
         ),
         Key(
             [],
             "Down",
             lazy.layout.grow_down(),
         ),
         Key(
             [],
             "Up",
             lazy.layout.grow_up(),
         ),
         Key(
             [],
             "Right",
             lazy.layout.grow_right(),
         ),
     ],
     mode="resize",
 ),
Beispiel #15
0
             desc='Next'
             ),
         Key([ ],"XF86AudioPrev",
             lazy.spawn("mediaprev"),
             desc='Previous'
             ),

        #My dmenu scripts
         KeyChord([mod], "p", [
         Key([],"k",
             lazy.spawn("choosekeyboardlayout"),
             desc='keyboardlayout'
             ),
         Key([],"c",
             lazy.spawn("editconf"),
             desc='config files'
             ),
         Key([],"a",
             lazy.spawn("audioset"),
             desc='Set audio source'
             ),

         ])

         ### 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),
Beispiel #16
0
    # These lines allow to raise or lower master volume
    # Key([], 'XF86AudioRaiseVolume', lazy.spawn('amixer -D pulse sset Master 5%+')),
    Key([], 'XF86AudioRaiseVolume',
        lazy.spawn('./bashscripts/raise_volume.sh')),
    # Key([], 'XF86AudioLowerVolume', lazy.spawn('amixer -D pulse sset Master 5%-')),
    Key([], 'XF86AudioLowerVolume',
        lazy.spawn('./bashscripts/lower_volume.sh')),
    Key([], 'XF86AudioMute', lazy.spawn('./bashscripts/mute_volume.sh')),
    Key([], 'XF86AudioPlay', lazy.spawn('./dmscripts/audio-control')),
    KeyChord([mod], 'e', [
        Key([],
            'e',
            lazy.spawn("emacsclient -c -a 'emacs'"),
            desc='Launch Emacs'),
        Key([], 'b', lazy.spawn("brave-browser-stable"), desc='Launch Brave'),
        Key([],
            'd',
            lazy.spawn("./bashscripts/toggle_monitors.sh"),
            desc='Restore monitors'),
        Key([], 'f', lazy.spawn("pcmanfm"), desc='Restore monitors'),
    ]),
]

group_names = [("", {
    'layout': 'monadtall'
}), ("", {
    'layout': 'max'
}), ("", {
    'layout': 'monadtall'
}), ("", {
    'layout': 'monadtall'
Beispiel #17
0
    Key("M-S-<F2>", lazy.window.togroup("edit")),
    Key("M-S-<F3>", lazy.window.togroup("shell")),
    Key("M-S-<F4>", lazy.window.togroup("tools")),
    Key("M-S-<F5>", lazy.window.togroup("scan")),
    Key("M-S-<F6>", lazy.window.togroup("ent")),
    Key("M-S-4", lazy.window.togroup("read")),
    Key("M-S-c", lazy.window.togroup("im")),
    Key("M-S-<Escape>", lazy.window.togroup("scratch")),
    Key("M-f", lazy.window.toggle_fullscreen()),
    Key("M-<F12>", lazy.window.kill()),

    # Programs shortcuts
    Key("M-S-<Return>", lazy.spawn("alacritty")),
    Key("M-S-p",
        lazy.spawn("rofi -modi combi -show combi -combi-modi run,drun")),
    KeyChord([mod], "d", [Key("p", lazy.spawn("@projectsBinary@ open"))]),
    Key("M-S-q", lazy.restart()),
]

screens = [
    Screen(
        bottom=bar.Bar(
            [
                widget.CurrentLayoutIcon(scale=0.65),
                widget.GroupBox(
                    font="Iosevka Bold",
                    fontsize=12,
                    border_width=2,
                    disable_drag=True,
                    highlight_method="line",
                    highlight_color=['#000000', '#000000'],
Beispiel #18
0
             ),
         Key(["control", "mod1"], "l", #next pane
             lazy.spawn("/usr/bin/myscripts/prev_tmux_pane.sh"),
             ),
        #KEYS_GROUP Launch terminal based programs using the key chord CONTROL+e followed by 'key'
         KeyChord([mod], "z", [
                 Key([], "e", #Launch vifm
                     lazy.spawn(fileManager),
                desc='Open vifm file manager'
                 ),
                 Key([], "h", #Launch htop
                     lazy.spawn(sysmon),
                 desc='Open HTOP'
                 ),
                 Key([], "r", #Launch ranger
                     lazy.spawn("kitty  ranger"),
                 desc='Open RANGER'
                 ),
                 Key([], "v", #Launch your terminal editor
                     lazy.spawn(editor),
                 desc='launch your terminal editor'
                 ),
                 Key([], "t", #change rofi theme
                     lazy.spawn("rofi-theme-selector"),
                 desc='change rofi theme'
                 ),
         ]),
          


                #KEYS_GROUP Dmenu scripts launched using the key chord SUPER+p followed by 'key'
         KeyChord([mod], "p", [
Beispiel #19
0
                "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.%s"
                % cmd)

    return f


keys = [
    # System keychords
    KeyChord(
        [mod],
        "s",
        [  #                 [S]
            Key([], "s",
                lazy.spawn("xfce4-settings-manager")),  # settings        (S)
            Key([], "l",
                lazy.spawn("betterlockscreen -l dim")),  # lockscreen      (L)
            Key([], "x", lazy.spawn("xkill")),  # xkill           (X)
            Key([], "q", lazy.shutdown()),  # exit            (Q)
            Key([], "r", lazy.restart()),  # restart         (R)
            Key(["shift"], "q", lazy.spawn(
                "systemctl -i poweroff")),  # quit-systen     (Shift-Q)
            Key(["shift"], "r",
                lazy.spawn("systemctl reboot")),  # reboot-systen   (Shift-R)
        ]),

    # Apps keychords
    KeyChord(
        [mod],
        "a",
        [  #                 [A]
            Key([], "a", lazy.spawncmd(prompt='$')),  # prompt          (A)
            Key([], "k", lazy.spawn("kitty")),  # kitty           (K)
Beispiel #20
0
 KeyChord(["control"], "e", [
     Key([],
         "e",
         lazy.spawn("emacsclient -c -a 'emacs'"),
         desc='Launch Emacs'),
     Key([],
         "b",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(ibuffer)'"),
         desc='Launch ibuffer inside Emacs'),
     Key([],
         "d",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"),
         desc='Launch dired inside Emacs'),
     Key([],
         "i",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(erc)'"),
         desc='Launch erc inside Emacs'),
     Key([],
         "m",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(mu4e)'"),
         desc='Launch mu4e inside Emacs'),
     Key([],
         "n",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(elfeed)'"),
         desc='Launch elfeed inside Emacs'),
     Key([],
         "s",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(eshell)'"),
         desc='Launch the eshell inside Emacs'),
     Key([],
         "v",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(+vterm/here nil)'"),
         desc='Launch vterm inside Emacs')
 ]),
Beispiel #21
0
    #     desc="Next keyboard layout"
    # ),
    Key(
        [shift],
        "Alt_L",
        lazy.widget["keyboardlayout"].next_keyboard(),
        desc="Next keyboard layout",
    ),
    #
    # Changing UI
    #
    KeyChord(
        [mod],
        "t",
        [
            Key([], "b", lazy.hide_show_bar("all"), desc="Toggle bars"),
            Key([], "z", lazy.hide_show_bar("all"), desc="Toggle bars"),
        ],
        mode="Toggle",
    ),
])

keys.extend([
    Key([mod], "q", lazy.window.kill(), desc="Close focused Window"),
    # Toggle windows states
    Key([mod],
        "F11",
        lazy.window.toggle_fullscreen(),
        desc="Toggle Fullscreen"),
    Key([mod], "f", lazy.window.toggle_floating(), desc="Toggle Floating"),
    Key([mod], "m", lazy.window.toggle_maximize(), desc="Toggle Maximize"),
Beispiel #22
0
     lazy.layout.flip(),
     desc="Switch which side main pane occupies (XmonadTall)"),
 Key([mod],
     "space",
     lazy.layout.next(),
     desc="Switch window focus to other pane(s) of stack"),
 Key([mod, "control"],
     "Return",
     lazy.layout.toggle_split(),
     desc="Toggle between split and unsplit sides of stack"),
 ### Emacs programs launched using hte key chord CTRL+e followed by 'key'
 KeyChord(["control"], "e", [
     Key([],
         "e",
         lazy.spawn("emacsclient -c -a 'emacs'"),
         desc="Launch Emacs"),
     Key([],
         "d",
         lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"),
         desc="Launch dired inside Emacs")
 ]),
 ### Dmenu scripts launched using the key chord SUPER+p followed by 'key'
 KeyChord([mod], "p", [
     Key([],
         "i",
         lazy.spawn(dmscripts + "dmscrot"),
         desc="Take screenshots via dmenu"),
     Key([],
         "k",
         lazy.spawn(dmscripts + "dmkill"),
         desc="Kill processes via dmenu"),
     Key([], "l", lazy.spawn(dmscripts + "dmlogout"), desc="A logout menu"),
Beispiel #23
0
 # Some app shortcuts
 EzKey("M-w", spawn_or_focus(BROWSER)),
 EzKey("M-<Return>", lazy.spawn(TERMINAL)),
 EzKey("M-C-<Return>", lazy.spawn(FILE_MANAGER)),
 EzKey("M-c", spawn_or_focus("signal-desktop")),
 EzKey("M-r", lazy.spawn(LAUNCHER)),
 EzKey("M-d", spawn_or_focus("discord")),
 EzKey("M-s", spawn_or_focus("spotify")),
 EzKey("M-g", spawn_or_focus("steam-native")),
 EzKey("M-p", lazy.spawn("passmenu.sh")),
 # KeyChords for some special actions
 KeyChord(
     [MOD],
     "k",
     [
         EzKey("c", lazy.spawn(f"{TERMINAL} -e connmanctl")),
         EzKey("u", lazy.spawn(f"{TERMINAL} -e yay -Syu")),
         EzKey("b", lazy.spawn(f"{TERMINAL} -e bluetoothctl")),
     ],
 ),
 # ScratchPads
 EzKey("M-S-<Return>", lazy.group["scratchpad"].dropdown_toggle("terminal")),
 EzKey("M-n", lazy.group["scratchpad"].dropdown_toggle("newsboat")),
 EzKey("M-<Escape>", lazy.group["scratchpad"].hide_all()),
 # Spotify controls, lacking real media keys on 65% keyboard
 EzKey("M-8", lazy.spawn(f"{MUSIC_CTRL}PlayPause")),
 EzKey("M-9", lazy.spawn(f"{MUSIC_CTRL}Next")),
 EzKey("M-7", lazy.spawn(f"{MUSIC_CTRL}Previous")),
 # Media volume keys
 EzKey("<XF86AudioMute>", lazy.widget["volumectrl"].mute()),
 EzKey("M-S-m", lazy.widget["volumectrl"].mute()),  # Extra keybind
Beispiel #24
0
    #  Key([mod], "d", lazy.spawncmd(prompt="Run command")),
    Key([mod], "d", lazy.spawn("dmenu_run -l 20 -p 'Run command:'")),

    # toggle dunst notifications
    Key([mod], "F1", lazy.spawn("dunst-toggle.sh")),
    Key([mod], "F2", lazy.spawn("dunstctl history-pop")),
    Key([mod], "F3", lazy.spawn("dunstctl close")),
    Key([mod, "shift"], "F3", lazy.spawn("dunstctl close-all")),

#  Key Chords ------------------------------------------------------------------

    # Take Screenshots
    KeyChord([mod], 's', [
        Key([mod], 's', lazy.spawn("screenshot.sh")),
        Key([mod], 'w', lazy.spawn("screenshot.sh window")),
        Key([mod], 'f', lazy.spawn("screenshot.sh full")),
        Key([mod], 'v', lazy.spawn("screenshot.sh view")),
        Key([mod], 'e', lazy.spawn("screenshot.sh view")),
        Key([mod], 'r', lazy.spawn("screenshot.sh resize")),
    ], mode="Screenshot"),

    # System Operations
    KeyChord([mod], 'o', [
        Key([mod], "q", lazy.shutdown()),
        # screen brightness
        Key([], '1', lazy.spawn('xbacklight -set  10')),
        Key([], '2', lazy.spawn('xbacklight -set  20')),
        Key([], '3', lazy.spawn('xbacklight -set  30')),
        Key([], '4', lazy.spawn('xbacklight -set  40')),
        Key([], '5', lazy.spawn('xbacklight -set  50')),
        Key([], '6', lazy.spawn('xbacklight -set  60')),
        Key([], '7', lazy.spawn('xbacklight -set  70')),
Beispiel #25
0
#!/usr/bin/env python3

from libqtile import hook
from libqtile.config import Click, Drag, Key, KeyChord, Match
from libqtile.lazy import lazy

from base_config import mod, mod_alt, HOME
from macro_scripts import MACRO_HOME
from lazy_utils import (ProgramFilter, match_prog, send_key_xdt)

xournal_bindings = [
    KeyChord([mod, 'shift'], 'x', [
        # ...
    ], mode='xournal'),
]

xournalpp_bindings = [
    KeyChord([mod], 'x', [
        Key([mod], 's',
            lazy.spawn(MACRO_HOME + '/macro_wacom_warp_focus.fish')),
        KeyChord([], 't', [
            Key([], 't', lazy.function(send_key_xdt, 'Ctrl+Shift+P')),  # pen
            Key([], 'p', lazy.function(send_key_xdt, 'Ctrl+Shift+P')),  # pen
            Key([], 'e', lazy.function(send_key_xdt, 'Ctrl+Shift+E')),  # er..
            Key([], 'h', lazy.function(send_key_xdt, 'Ctrl+Shift+H')),  # high
            Key(['shift'], 't',
                lazy.ungrab_all_chords(),
                lazy.function(send_key_xdt, 'Ctrl+Shift+T')),  # text
            Key([], 'i',
                lazy.ungrab_all_chords(),
                lazy.function(send_key_xdt, 'Ctrl+Shift+I')),  # img
Beispiel #26
0
    Key([mod], "x", lazy.spawn("slock")),
    Key([], "Print", lazy.spawn("flameshot gui")),
    Key(["mod1", "shift"], "p",
        lazy.spawn(
            "rofi -show power -modi power:~/.config/rofi/power-menu.sh -width 10 -lines 5"
        )),
    Key(["mod1", "shift"], "c",
        lazy.spawn("sh -c 'CM_LAUNCHER=rofi clipmenu'")),
    KeyChord([mod], "s", [
        Key([], "space",
            lazy.spawn(
                "sh -c 'xkb-switch -s us; rofi -modi drun -show drun -icon-theme \"Papirus\" -show-icons'"
            )),
        Key([], "r",
            lazy.spawn(
                "sh -c 'xkb-switch -s us; rofi -modi drun -show drun -icon-theme \"Papirus\" -show-icons'"
            )),
        Key([], "c", lazy.spawn("code")),
        Key([], "i", lazy.spawn("insomnia")),
        Key([], "f", lazy.spawn("firefox")),
        Key([], "g", lazy.spawn("chromium")),
        Key([], "m", lazy.spawn("spotify")),
        Key([], "n", lazy.spawn("nemo")),
    ]),
]

groups = [
    Group("1", matches=[Match(wm_class=["firefox"])]),
    Group("2",
          matches=[
              Match(wm_class=["TelegramDesktop", "Skype", "discord", "Slack"])
          ]),
Beispiel #27
0
    Key([mod, "shift"], "l", lazy.layout.shuffle_right(),
        desc="Move window to the right"),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down(),
        desc="Move window down"),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),

    # Grow windows. If current window is on the edge of screen and direction
    # will be to screen edge - window would shrink.
    KeyChord(
        [mod], "r", [
            Key([], "j", lazy.layout.grow_down(),
                desc="Move the edge dwon"),
            Key([], "k", lazy.layout.grow_up(),
                desc="Move the edge up"),
            Key([], "h", lazy.layout.grow_left(),
                desc="Move the edge to the left"),
            Key([], "l", lazy.layout.grow_right(),
                desc="Move the edge to the right"),
            Key([], "n", lazy.layout.normalize(),
                desc="Normalize the size"),
            ],
        mode="Resize"
        ),

    # 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], "s", lazy.layout.toggle_split(),
        desc="Toggle between split and unsplit sides of stack"),
    Key([mod, "shift"], "space", lazy.window.toggle_floating(),
Beispiel #28
0
 ),
 Key(
     [mod],
     "Tab",
     lazy.layout.next(),
     desc="Switch window focus to other pane(s) of stack",
 ),
 #         Key([mod, "shift"], "space",
 #             lazy.layout.toggle_split(),
 #             desc='Toggle between split and unsplit sides of stack'
 #             ),
 # Emacs programs launched using the key chord CTRL+e followed by 'key'
 KeyChord(
     ["control"],
     "e",
     [
         Key([], "e", lazy.spawn("emacsclient -c -a 'emacs'"), desc="Launch Emacs"),
     ],
 ),
 # Dmenu scripts launched using the key chord SUPER+p followed by 'key'
 KeyChord(
     [mod],
     "p",
     [
         Key(
             [],
             "e",
             lazy.spawn("./dmscripts/dm-confedit"),
             desc="Choose a config file to edit",
         ),
         Key(
Beispiel #29
0
    Key([], 'd', lazy.window.togroup('Dev', switch_group=True)),
    Key([], 'h', lazy.window.togroup('Home', switch_group=True)),
    Key([], 'w', lazy.window.togroup('Web', switch_group=True)),
    Key([], 'p', lazy.window.togroup('Python', switch_group=True)),
    Key([], 'i', lazy.window.togroup('IM', switch_group=True)),
    Key([], 's', lazy.window.togroup('Sys', switch_group=True)),
    Key([], 'm', lazy.window.togroup('Misc', switch_group=True)),
]

w_commands = [
    Key([], 'q', lazy.window.kill(), desc='Kill'),
    Key([], 'k', lazy.window.kill(), desc='Kill'),
    Key([], 'space', lazy.window.toggle_fullscreen(), desc='Toggle fullscreen'),
    Key([], 'w', lazy.spawn('rofi -show window'), desc='$Rofi windows'),
    KeyChord([mod], 'r', resize_commands, mode='Resize'),
    KeyChord([], 'r', resize_commands, desc='Resize', mode='Resize'),
    KeyChord([mod], 'm', win_move_commands, mode='Win Move'),
    KeyChord([], 'm', win_move_commands, desc='Move', mode='Win Move'),
    KeyChord([mod], 's', to_group_commands),
    KeyChord([], 's', to_group_commands, desc='Send to Group'),
]

r_commands = [
    Key([], 'd', lazy.spawn('rofi -show drun'), desc='$Rofi drun'),
    Key([], 'e', lazy.spawn('emacs'), desc='Emacs'),
    Key([], 'f', lazy.spawn('nautilus'), desc='Files'),
    Key([], 'r', lazy.spawn('konsole -e ranger'), desc='Ranger'),
    Key([], 'v', lazy.spawn('konsole -e nvim'), desc='Nvim'),
    Key([], 'w', lazy.spawn('chromium'), desc='Web (chromium)'),
    Key([], 'q', lazy.spawn('qutebrowser'), desc='Qutebrowser'),
Beispiel #30
0
    Key([mod],
        "XF86AudioRaiseVolume",
        lazy.spawn("amixer sset Master 15%+"),
        desc="Increase volume by 15%"),
    Key([],
        "XF86AudioLowerVolume",
        lazy.spawn("amixer sset Master 5%-"),
        desc="Decrease volume by 5%"),
    Key([mod],
        "XF86AudioLowerVolume",
        lazy.spawn("amixer sset Master 15%-"),
        desc="Decrease volume by 15%"),
    KeyChord([mod], "d", [
        Key([], "s", lazy.spawn(expanduser("~/scripts/dpower"))),
        Key([], "p", lazy.spawn(expanduser("~/scripts/bw"))),
        Key([], "m", lazy.spawn(expanduser("~/scripts/dman"))),
        Key([], "k", lazy.spawn(expanduser("~/scripts/dkill"))),
        Key([], "c", lazy.spawn(expanduser("~/scripts/dcol"))),
        Key([], "w", lazy.spawn(expanduser("~/scripts/dsearch"))),
    ]),
    KeyChord([mod], "s", [
        Key([], "a", lazy.spawn(expanduser("~/scripts/dsearch archwiki"))),
        Key([], "p", lazy.spawn(expanduser("~/scripts/dsearch aur"))),
        Key([], "d", lazy.spawn(expanduser("~/scripts/dsearch duckduckgo"))),
        Key([], "g", lazy.spawn(expanduser("~/scripts/dsearch google"))),
        Key([], "r", lazy.spawn(expanduser("~/scripts/dsearch reddit"))),
        Key([], "s", lazy.spawn(expanduser("~/scripts/dsearch startpage"))),
        Key([], "u", lazy.spawn(
            expanduser("~/scripts/dsearch urbandictionary"))),
        Key([], "y", lazy.spawn(expanduser("~/scripts/dsearch youtube")))
    ])
]