Minor edits to keybindings.

This commit is contained in:
Derek Taylor
2019-09-21 15:53:12 -05:00
parent 905fa8e8ec
commit 07f56c714e
2 changed files with 38 additions and 143 deletions

134
.config/qtile/config.py Executable file → Normal file
View File

@@ -97,7 +97,7 @@ def init_keys():
Key([mod, "control"], "j", Key([mod, "control"], "j",
lazy.layout.section_down() # Move down a section in treetab lazy.layout.section_down() # Move down a section in treetab
), ),
# Window controls ### Window controls
Key( Key(
[mod], "k", [mod], "k",
lazy.layout.down() # Switch between windows in current stack pane lazy.layout.down() # Switch between windows in current stack pane
@@ -149,7 +149,7 @@ def init_keys():
lazy.layout.rotate(), # Swap panes of split stack (Stack) lazy.layout.rotate(), # Swap panes of split stack (Stack)
lazy.layout.flip() # Switch which side main pane occupies (XmonadTall) lazy.layout.flip() # Switch which side main pane occupies (XmonadTall)
), ),
# Stack controls ### Stack controls
Key( Key(
[mod], "space", [mod], "space",
lazy.layout.next() # Switch window focus to other pane(s) of stack lazy.layout.next() # Switch window focus to other pane(s) of stack
@@ -158,172 +158,88 @@ def init_keys():
[mod, "control"], "Return", [mod, "control"], "Return",
lazy.layout.toggle_split() # Toggle between split and unsplit sides of stack 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")
),
# Dmenu Run Launcher ### Dmenu Run Launcher
Key( Key(
[mod, "shift"], "Return", ["mod1", "control"], "Return",
# lazy.spawncmd()
lazy.spawn("dmenu_run -fn 'UbuntuMono Nerd Font:size=10' -nb '#292d3e' -nf '#bbc5ff' -sb '#82AAFF' -sf '#292d3e' -p 'dmenu:'") lazy.spawn("dmenu_run -fn 'UbuntuMono Nerd Font:size=10' -nb '#292d3e' -nf '#bbc5ff' -sb '#82AAFF' -sf '#292d3e' -p 'dmenu:'")
), ),
### Dmenu scripts launched with ALT + CTRL + KEY
Key( Key(
[mod1, "control"], "e", ["mod1", "control"], "e",
# lazy.spawncmd()
lazy.spawn("./.dmenu/dmenu-edit-configs.sh") lazy.spawn("./.dmenu/dmenu-edit-configs.sh")
), ),
Key( Key(
[mod1, "control"], "m", ["mod1", "control"], "m",
# lazy.spawncmd()
lazy.spawn("./.dmenu/dmenu-sysmon.sh") lazy.spawn("./.dmenu/dmenu-sysmon.sh")
), ),
Key( Key(
[mod1, "control"], "p", ["mod1", "control"], "p",
# lazy.spawncmd()
lazy.spawn("passmenu") lazy.spawn("passmenu")
), ),
Key( Key(
[mod1, "control"], "r", ["mod1", "control"], "r",
# lazy.spawncmd()
lazy.spawn("./.dmenu/dmenu-reddio.sh") lazy.spawn("./.dmenu/dmenu-reddio.sh")
), ),
Key( Key(
[mod1, "control"], "s", ["mod1", "control"], "s",
# lazy.spawncmd()
lazy.spawn("./.dmenu/dmenu-surfraw.sh") lazy.spawn("./.dmenu/dmenu-surfraw.sh")
), ),
Key( Key(
[mod1, "control"], "t", ["mod1", "control"], "t",
# lazy.spawncmd()
lazy.spawn("./.dmenu/dmenu-trading.sh") lazy.spawn("./.dmenu/dmenu-trading.sh")
), ),
### My applications launched with SUPER + ALT + KEY
Key( Key(
[mod], "KP_End", # Keypad 1 [mod, "mod1"], "l",
lazy.spawn(myTerm+" -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube") lazy.spawn(myTerm+" -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube")
# lazy.spawn(myTerm+" -e lynx -cfg=~/.lynx.cfg -lss=~/.lynx.lss http://www.distrowatch.com")
), ),
Key( Key(
[mod], "KP_Down", # Keypad 2 [mod, "mod1"], "n",
lazy.spawn(myTerm+" -e sh ./scripts/googler-script.sh")
),
Key(
[mod], "KP_Page_Down", # Keypad 3
lazy.spawn(myTerm+" -e newsboat") lazy.spawn(myTerm+" -e newsboat")
), ),
Key( Key(
[mod], "KP_Left", # Keypad 4 [mod, "mod1"], "r",
lazy.spawn(myTerm+" -e rtv") lazy.spawn(myTerm+" -e rtv")
), ),
Key( Key(
[mod], "KP_Begin", # Keypad 5 [mod, "mod1"], "e",
lazy.spawn(myTerm+" -e neomutt") lazy.spawn(myTerm+" -e neomutt")
), ),
Key( Key(
[mod], "KP_Right", # Keypad 6 [mod, "mod1"], "m",
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") lazy.spawn(myTerm+" -e sh ./scripts/toot.sh")
), ),
Key( Key(
[mod], "KP_Page_Up", # Keypad 9 [mod, "mod1"], "t",
lazy.spawn(myTerm+" -e sh ./scripts/tig-script.sh") lazy.spawn(myTerm+" -e sh ./scripts/tig-script.sh")
), ),
# Apps Launched with <SUPER> + <SHIFT> + <KEYPAD 0-9>
Key( Key(
[mod, "shift"], "KP_End", # Keypad 1 [mod, "mod1"], "f",
lazy.spawn(myTerm+" -e sh ./.config/vifm/scripts/vifmrun") lazy.spawn(myTerm+" -e sh ./.config/vifm/scripts/vifmrun")
), ),
Key( Key(
[mod, "shift"], "KP_Down", # Keypad 2 [mod, "mod1"], "j",
lazy.spawn(myTerm+" -e joplin") lazy.spawn(myTerm+" -e joplin")
), ),
Key( Key(
[mod, "shift"], "KP_Page_Down", # Keypad 3 [mod, "mod1"], "c",
lazy.spawn(myTerm+" -e cmus") lazy.spawn(myTerm+" -e cmus")
), ),
Key( Key(
[mod, "shift"], "KP_Left", # Keypad 4 [mod, "mod1"], "i",
lazy.spawn(myTerm+" -e irssi") lazy.spawn(myTerm+" -e irssi")
), ),
Key( Key(
[mod, "shift"], "KP_Begin", # Keypad 5 [mod, "mod1"], "y",
lazy.spawn(myTerm+" -e rtorrent")
),
Key(
[mod, "shift"], "KP_Right", # Keypad 6
lazy.spawn(myTerm+" -e youtube-viewer") lazy.spawn(myTerm+" -e youtube-viewer")
), ),
Key( Key(
[mod, "shift"], "KP_Home", # Keypad 7 [mod, "mod1"], "a",
lazy.spawn(myTerm+" -e ncpamixer") 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 gtop")
),
Key(
[mod, "control"], "KP_Page_Down", # Keypad 3
lazy.spawn(myTerm+" -e nmon")
),
Key(
[mod, "control"], "KP_Left", # Keypad 4
lazy.spawn(myTerm+" -e glances")
),
Key(
[mod, "control"], "KP_Begin", # Keypad 5
lazy.spawn(myTerm+" -e s-tui")
),
Key(
[mod, "control"], "KP_Right", # Keypad 6
lazy.spawn(myTerm+" -e httping -KY --draw-phase localhost")
),
Key(
[mod, "control"], "KP_Home", # Keypad 7
lazy.spawn(myTerm+" -e cmatrix -C cyan")
),
Key(
[mod, "control"], "KP_Up", # Keypad 8
lazy.spawn(myTerm+" -e pianobar")
),
Key(
[mod, "control"], "KP_Page_Up", # Keypad 9
lazy.spawn(myTerm+" -e wopr report.xml")
),
] ]
return keys return keys

View File

@@ -86,7 +86,7 @@ static const char *termcmd[] = { "st", NULL };
static Key keys[] = { static Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
{ MODKEY, XK_KP_Insert, spawn, {.v = dmenucmd } }, { Mod1Mask|ControlMask, XK_Return, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_b, togglebar, {0} },
{ MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } }, { MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
@@ -115,39 +115,18 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
/* Apps Launched with <SUPER> + <KEYPAD 1-9> */ /* Dmenu scripts launched with ALT + CTRL + KEY */
{ MODKEY, XK_KP_End, spawn, CMD("st -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube") }, { Mod1Mask|ControlMask, XK_e, spawn, CMD("./.dmenu/dmenu-edit-configs.sh") },
{ MODKEY, XK_KP_Down, spawn, CMD("st -e sh ./scripts/googler-script.sh") }, { Mod1Mask|ControlMask, XK_m, spawn, CMD("./.dmenu/dmenu-sysmon.sh") },
{ MODKEY, XK_KP_Page_Down, spawn, CMD("st -e newsboat") }, { Mod1Mask|ControlMask, XK_p, spawn, CMD("passmenu") },
{ MODKEY, XK_KP_Left, spawn, CMD("st -e rtv") }, { Mod1Mask|ControlMask, XK_s, spawn, CMD("./.dmenu/dmenu-surfraw.sh") },
{ MODKEY, XK_KP_Begin, spawn, CMD("st -e neomutt") },
{ MODKEY, XK_KP_Right, spawn, CMD("st -e twitch-curses") }, /* Apps Launched with SUPER + ALT + KEY */
{ MODKEY, XK_KP_Home, spawn, CMD("st -e sh ./scripts/haxor-news.sh") }, { MODKEY|Mod1Mask, XK_l, spawn, CMD("st -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube") },
{ MODKEY, XK_KP_Up, spawn, CMD("st -e toot curses") }, { MODKEY|Mod1Mask, XK_i, spawn, CMD("st -e irssi") },
{ MODKEY, XK_KP_Page_Up, spawn, CMD("st -e sh ./scripts/tig-script.sh") }, { MODKEY|Mod1Mask, XK_n, spawn, CMD("st -e newsboat") },
{ MODKEY|Mod1Mask, XK_r, spawn, CMD("st -e rtv") },
{ MODKEY|Mod1Mask, XK_e, spawn, CMD("st -e neomutt") },
/* Apps Launched with <SUPER> + <SHIFT> + <KEYPAD 1-9> */
{ MODKEY|ShiftMask, XK_KP_End, spawn, CMD("st -e ~/.config/vifm/scripts/vifmrun") },
{ MODKEY|ShiftMask, XK_KP_Down, spawn, CMD("st -e joplin") },
{ MODKEY|ShiftMask, XK_KP_Page_Down, spawn, CMD("st -e cmus") },
{ MODKEY|ShiftMask, XK_KP_Left, spawn, CMD("st -e irssi") },
{ MODKEY|ShiftMask, XK_KP_Begin, spawn, CMD("st -e rtorrent") },
{ MODKEY|ShiftMask, XK_KP_Right, spawn, CMD("st -e youtube-viewer") },
{ MODKEY|ShiftMask, XK_KP_Home, spawn, CMD("st -e ncpamixer") },
{ MODKEY|ShiftMask, XK_KP_Up, spawn, CMD("st -e calcurse") },
{ MODKEY|ShiftMask, XK_KP_Page_Up, spawn, CMD("st -e vim /home/dt/dwm/config.h") },
/* Apps Launched with <SUPER> + <CONTROL> + <KEYPAD 1-9> */
{ MODKEY|ControlMask, XK_KP_End, spawn, CMD("st -e htop") },
{ MODKEY|ControlMask, XK_KP_Down, spawn, CMD("st -e gtop") },
{ MODKEY|ControlMask, XK_KP_Page_Down, spawn, CMD("st -e nmon") },
{ MODKEY|ControlMask, XK_KP_Left, spawn, CMD("st -e glances") },
{ MODKEY|ControlMask, XK_KP_Begin, spawn, CMD("st -e s-tui") },
{ MODKEY|ControlMask, XK_KP_Right, spawn, CMD("st -e httping -KY --draw-phase localhost") },
{ MODKEY|ControlMask, XK_KP_Home, spawn, CMD("st -e cmatrix -C cyan") },
{ MODKEY|ControlMask, XK_KP_Up, spawn, CMD("st -e pianobar") },
{ MODKEY|ControlMask, XK_KP_Page_Up, spawn, CMD("st -e wopr report.xml") },
TAGKEYS( XK_1, 0) TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1) TAGKEYS( XK_2, 1)