aboutsummaryrefslogtreecommitdiff
path: root/config.dot/awesome.link/keys.lua
blob: d74e18789cdc50c24e43b5432d51399edda0d8d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
-- Key bindings
globalkeys = awful.util.table.join(root.keys(),
    -- Unused
    --awful.key({ modkey, }, "t", function () awful.spawn("command") end, {description = "", group = "client"}),

    -- Xlock
    awful.key({ modkey, }, "Print", function () awful.spawn("xlock") end, {description = "", group = "client"}),

    -- Xrandr
    -- See https://awesomewm.org/recipes/xrandr/
    awful.key({ modkey, }, "F7",
        function ()
            xrandr.xrandr()

            -- See https://awesomewm.org/apidoc/classes/gears.timer.html
            --     https://www.reddit.com/r/linux/comments/6odeur/i3_automatically_resize_wallpaperconky_on/
            --     https://github.com/ritave/xeventbind
            -- Any idea why this timer runs before intended?
            --gears.timer {
            --  timeout     = 10,
            --  autostart   = true,
            --  single_shot = true,
            --  call_now    = false,
            --  callback    = awful.spawn("xconky refresh")
            --}
        end,
        {description = "toggle display", group = "client"}
    ),

    -- Volume
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.spawn("amixer set Master 9%+",    false) end, {description = "volume up",   group = "client"}),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.spawn("amixer set Master 9%-",    false) end, {description = "volume down", group = "client"}),
    awful.key({ }, "XF86AudioMute",        function () awful.spawn("amixer set Master toggle", false) end, {description = "mute",        group = "client"}),

    -- Brightness
    awful.key({ }, "XF86MonBrightnessDown", function () awful.util.spawn("xbrightness -10%") end),
    awful.key({ }, "XF86MonBrightnessUp",   function () awful.util.spawn("xbrightness +10%") end),

    -- Hibernate
    awful.key({  }, "XF86Launch1", function () awful.spawn("xhibernate") end, {description = "", group = "client"}),

    -- Misc applications
    --awful.key({ modkey, }, "a", function () awful.spawn("thunar")                         end, {description = "thunar",             group = "client"}),
    awful.key({ modkey, }, "a", function () awful.spawn("terminal ranger load")             end, {description = "ranger",             group = "client"}),
    awful.key({ modkey, }, "b", function () awful.spawn("dangling-archive")                 end, {description = "dangling-archive",   group = "client"}),
    awful.key({ modkey, }, "c", function () awful.spawn("terminal xcalendar")               end, {description = "calendar",           group = "client"}),
    awful.key({ modkey, }, "d", function () awful.spawn("terminal shell local media")       end, {description = "media",              group = "client"}),
    awful.key({ modkey, }, "e", function () awful.spawn("screenshot")                       end, {description = "screenshot",         group = "client"}),
    awful.key({ modkey, }, "g", function () awful.spawn("gallery")                          end, {description = "image gallery",      group = "client"}),
    --awful.key({ modkey, }, "g", function () awful.spawn("vmg")                            end, {description = "vmg",                group = "client"}),
    awful.key({ modkey, }, "h", function () awful.spawn("terminal chat")                    end, {description = "chat",               group = "client"}),
    --awful.key({ modkey, }, "i", function () awful.spawn("geeqie load")                    end, {description = "geeqie",             group = "client"}),
    awful.key({ modkey, }, "i", function () awful.spawn("screenshot -s")                    end, {description = "region screenshot",  group = "client"}),
    awful.key({ modkey, }, "l", function () awful.spawn("gpick -s -p")                      end, {description = "gpick",              group = "client"}),
    awful.key({ modkey, }, "m", function () awful.spawn("terminal xmail")                   end, {description = "mail",               group = "client"}),
    --awful.key({ modkey, }, "n", function () awful.spawn("terminal news")                  end, {description = "news",               group = "client"}),
    --awful.key({ modkey, }, "o", function () awful.spawn("chromium-browser --incognito")   end, {description = "chromium",           group = "client"}),
    awful.key({ modkey, }, "o", function () awful.spawn("terminal-session-chooser")         end, {description = "session-chooser",    group = "client"}),
    awful.key({ modkey, }, "p", function () awful.spawn("terminal keyringer default sclip") end, {description = "keyringer",          group = "client"}),
    --awful.key({ modkey, }, "s", function () awful.spawn("spoolpaste")                     end, {description = "spoolpaste",         group = "client"}),
    awful.key({ modkey, }, "s", function () awful.spawn("xsuspend")                         end, {description = "suspend",            group = "client"}),
    awful.key({ modkey, }, "t", function () awful.spawn("terminal ssh-agent-loadkey")       end, {description = "ssh-agent-loadkey",  group = "client"}),
    awful.key({ modkey, }, "u", function () awful.spawn("qrpaste")                          end, {description = "qrpaste",            group = "client"}),
    awful.key({ modkey, }, "v", function () awful.spawn("terminal vim")                     end, {description = "editor",             group = "client"}),
    --awful.key({ modkey, }, "x", function () awful.spawn("terminal wicd-curses")           end, {description = "network",            group = "client"}),
    awful.key({ modkey, }, "x", function () awful.spawn("terminal nmtui connect")           end, {description = "network",            group = "client"}),
    awful.key({ modkey, }, "y", function () awful.spawn("xclip-clean")                      end, {description = "clear clipboard",    group = "client"}),
    awful.key({ modkey, }, "z", function () awful.spawn("terminal shell root")              end, {description = "root",               group = "client"}),

    -- Clipboard between virtual machines
    awful.key({ modkey, "" }, "Up",   function () awful.spawn("kvmx-spice-copy")           end, {description = "kvmx-copy",      group = "client"}),
    awful.key({ modkey, "" }, "Down", function () awful.spawn("kvmx-spice-paste")          end, {description = "kvmx-paste",     group = "client"}),
    --awful.key({ modkey, "" }, "Down", function () awful.spawn("terminal kvmx-clipboard") end, {description = "kvmx-clipboard", group = "client"}),

    -- Virtual environments: powerup
    awful.key({ modkey, "Control" }, "a", function () awful.spawn("kvmx up accounting")              end, {description = "vm: accounting",                 group = "client"}),
    awful.key({ modkey, "Control" }, "c", function () awful.spawn("kvmx up commerce")                end, {description = "vm: commerce",                   group = "client"}),
    awful.key({ modkey, "Control" }, "d", function () awful.spawn("kvmx up doc")                     end, {description = "vm: doc",                        group = "client"}),
    awful.key({ modkey, "Control" }, "e", function () awful.spawn("kvmx up test")                    end, {description = "vm: test",                       group = "client"}),
    awful.key({ modkey, "Control" }, "f", function () awful.spawn("kvmx up funny")                   end, {description = "vm: funny",                      group = "client"}),
    awful.key({ modkey, "Control" }, "h", function () awful.spawn("kvmx up home")                    end, {description = "vm: home",                       group = "client"}),
    awful.key({ modkey, "Control" }, "k", function () awful.spawn("kvmx up work")                    end, {description = "vm: work",                       group = "client"}),
    awful.key({ modkey, "Control" }, "m", function () awful.spawn("kvmx up messenger")               end, {description = "vm: messenger",                  group = "client"}),
    awful.key({ modkey, "Control" }, "o", function () awful.spawn("kvmx up messenger-old")           end, {description = "vm: messenger-old",              group = "client"}),
    awful.key({ modkey, "Control" }, "s", function () awful.spawn("kvmx up sunny")                   end, {description = "vm: sunny" ,                     group = "client"}),
    awful.key({ modkey, "Control" }, "v", function () awful.spawn("kvmx up vnc")                     end, {description = "vm: vnc",                        group = "client"}),
    awful.key({ modkey, "Control" }, "v", function () awful.spawn("kvmx disposable vpn")             end, {description = "vm: vpn disposable",             group = "client"}),
    awful.key({ modkey, "Control" }, "x", function () awful.spawn("kvmx disposable tor")             end, {description = "vm: tor disposable",             group = "client"}),
    awful.key({ modkey, "Control" }, "w", function () awful.spawn("kvmx up web")                     end, {description = "vm: web",                        group = "client"}),

    -- Virtual environments: suspend
    awful.key({ modkey, "Shift"   }, "a", function () awful.spawn("kvmx suspend accounting")         end, {description = "vm: down: accounting",           group = "client"}),
    awful.key({ modkey, "Shift"   }, "c", function () awful.spawn("kvmx suspend commerce")           end, {description = "vm: down: commerce",             group = "client"}),
    awful.key({ modkey, "Shift"   }, "d", function () awful.spawn("kvmx suspend doc")                end, {description = "vm: down: doc",                  group = "client"}),
    awful.key({ modkey, "Shift"   }, "e", function () awful.spawn("kvmx suspend test")               end, {description = "vm: down: test",                 group = "client"}),
    awful.key({ modkey, "Shift"   }, "f", function () awful.spawn("kvmx suspend funny")              end, {description = "vm: down: funny",                group = "client"}),
    awful.key({ modkey, "Shift"   }, "h", function () awful.spawn("kvmx suspend home")               end, {description = "vm: down: home",                 group = "client"}),
    awful.key({ modkey, "Shift"   }, "k", function () awful.spawn("kvmx suspend work")               end, {description = "vm: down: work",                 group = "client"}),
    awful.key({ modkey, "Shift"   }, "m", function () awful.spawn("kvmx suspend messenger")          end, {description = "vm: down: messenger",            group = "client"}),
    awful.key({ modkey, "Shift"   }, "o", function () awful.spawn("kvmx suspend messenger-old")      end, {description = "vm: down: messenger-old",        group = "client"}),
    awful.key({ modkey, "Shift"   }, "s", function () awful.spawn("kvmx suspend sunny")              end, {description = "vm: down: sunny",                group = "client"}),
    awful.key({ modkey, "Shift"   }, "v", function () awful.spawn("kvmx suspend vnc")                end, {description = "vm: down: vnc",                  group = "client"}),
    awful.key({ modkey, "Shift"   }, "w", function () awful.spawn("kvmx suspend web")                end, {description = "vm: down: web",                  group = "client"}),

    -- Virtual environments: poweroff
    awful.key({ modkey, "Mod1"   }, "a", function () awful.spawn("kvmx poweroff accounting")         end, {description = "vm: down: accounting",           group = "client"}),
    awful.key({ modkey, "Mod1"   }, "c", function () awful.spawn("kvmx poweroff commerce")           end, {description = "vm: down: commerce",             group = "client"}),
    awful.key({ modkey, "Mod1"   }, "d", function () awful.spawn("kvmx poweroff doc")                end, {description = "vm: down: doc",                  group = "client"}),
    awful.key({ modkey, "Mod1"   }, "e", function () awful.spawn("kvmx poweroff test")               end, {description = "vm: down: test",                 group = "client"}),
    awful.key({ modkey, "Mod1"   }, "f", function () awful.spawn("kvmx poweroff funny")              end, {description = "vm: down: funny",                group = "client"}),
    awful.key({ modkey, "Mod1"   }, "h", function () awful.spawn("kvmx poweroff home")               end, {description = "vm: down: home",                 group = "client"}),
    awful.key({ modkey, "Mod1"   }, "k", function () awful.spawn("kvmx poweroff work")               end, {description = "vm: down: work",                 group = "client"}),
    awful.key({ modkey, "Mod1"   }, "m", function () awful.spawn("kvmx poweroff messenger")          end, {description = "vm: down: messenger",            group = "client"}),
    awful.key({ modkey, "Mod1"   }, "o", function () awful.spawn("kvmx poweroff messenger-old")      end, {description = "vm: down: messenger-old",        group = "client"}),
    awful.key({ modkey, "Mod1"   }, "s", function () awful.spawn("kvmx poweroff sunny")              end, {description = "vm: down: sunny",                group = "client"}),
    awful.key({ modkey, "Mod1"   }, "v", function () awful.spawn("kvmx poweroff vnc")                end, {description = "vm: down: vnc",                  group = "client"}),
    awful.key({ modkey, "Mod1"   }, "w", function () awful.spawn("kvmx poweroff web")                end, {description = "vm: down: web",                  group = "client"})
)

-- Set keys
root.keys(globalkeys)