From ef28ddfe7f6e87938125e9d7b17aaf6c4b1921ea Mon Sep 17 00:00:00 2001 From: M1dgard Date: Thu, 12 Jul 2018 00:58:13 +0200 Subject: [PATCH] [i3] Add cool "open" and "macro" modes --- i3/config | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/i3/config b/i3/config index 3ffa09d..fe24d4c 100644 --- a/i3/config +++ b/i3/config @@ -69,6 +69,21 @@ exec_always --no-startup-id setxkbmap \ exec_always --no-startup-id numlockx on +set $macromode "macro: [l]olol" +mode $macromode { + bindsym l mode default, exec --no-startup-id "sleep 0.1; for i in $(seq $(( RANDOM % 5 + 3 ))); do xdotool key l o; done; xdotool key l Return" + # Define your own cool macros here + + # back to normal: Enter, Escape or mod+r + bindsym Return mode "default" + bindsym KP_Enter mode "default" + bindsym Escape mode "default" + bindsym $mod+c mode "default" +} + +bindsym $mod+c mode $macromode + + ################ # Applications # {{{1 ################ @@ -102,6 +117,28 @@ bindsym $mod+XF86Display exec arandr bindsym XF86Display exec --no-startup-id $HOME/.config/i3/monitors.sh +set $openmode "open: [f]irefox, [e]mail, [i]rc, [m]pd client, [M]pd server, [t]or, [g]ucharmap, [j]osm, [a]randr" +mode $openmode { + bindsym f exec firefox, mode default + bindsym e exec claws-mail, mode default + bindsym i exec quasselclient, mode default + bindsym m exec mpdclient, mode default + bindsym shift+m exec --no-startup-id mpd $HOME/.config/mpd/mpd.conf, mode default + bindsym t exec "$HOME/.tor-browser-en/INSTALL/Browser/start-tor-browser --detach", mode default + bindsym g exec gucharmap, mode default + bindsym j exec josm, mode default + bindsym a exec arandr, mode default + + # back to normal: Enter, Escape or mod+r + bindsym Return mode "default" + bindsym KP_Enter mode "default" + bindsym Escape mode "default" + bindsym $mod+o mode "default" +} + +bindsym $mod+o mode $openmode + + set $mpdmode "local mpd: [ ] play/pause, [k/j] prev/next, [h/l] rwnd/ffwd, [u/d] vol, [enter] open client" mode $mpdmode { bindsym space exec --no-startup-id mpc toggle