aboutsummaryrefslogtreecommitdiff
path: root/hypr/configs/keybinds.lua
blob: 6e5457ffd423e876862a5a0117b762b83acaa68a (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
local mainMod = "SUPER"

local terminal = "uwsm app -- kitty"
local menu = [[uwsm app -- rofi -font "JetBrainsMono Nerd Font 10" -show drun -run-command 'uwsm app -- {cmd}']]

local hy3 = hl.plugin.hy3

hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal))
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("/home/venkatesh/.config/rofi/scripts/rofi-mpris.sh"))
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd(menu))

hl.bind(
  mainMod .. " + C",
  hl.dsp.exec_cmd(
    [[uwsm app -- rofi -font "JetBrainsMono Nerd Font 10" -modi clipboard:/home/venkatesh/.config/rofi/scripts/cliphist-rofi -show clipboard]]
  )
)

hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen())
hl.bind(mainMod .. " + SHIFT + R", hl.dsp.exec_cmd("hyprctl reload"))

hl.bind(mainMod .. " + W", hy3.change_group("toggletab"))

hl.bind(mainMod .. " + left", hy3.move_focus("l"))
hl.bind(mainMod .. " + right", hy3.move_focus("r"))
hl.bind(mainMod .. " + up", hy3.move_focus("u"))
hl.bind(mainMod .. " + down", hy3.move_focus("d"))

hl.bind(mainMod .. " + SHIFT + left", hy3.move_window("l", { visible = true }))
hl.bind(mainMod .. " + SHIFT + right", hy3.move_window("r", { visible = true }))
hl.bind(mainMod .. " + SHIFT + up", hy3.move_window("u", { visible = true }))
hl.bind(mainMod .. " + SHIFT + down", hy3.move_window("d", { visible = true }))

for i = 1, 10 do
  local key = i % 10

  hl.bind(
    mainMod .. " + " .. key,
    hl.dsp.focus({ workspace = tostring(i) })
  )

  hl.bind(
    mainMod .. " + SHIFT + " .. key,
    hl.dsp.window.move({ workspace = tostring(i) })
  )
end

hl.bind(
  mainMod .. " + SHIFT + SPACE",
  hl.dsp.window.move({ workspace = "11" })
)

hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic"))

hl.bind(
  mainMod .. " + SHIFT + S",
  hl.dsp.window.move({ workspace = "special:magic" })
)

hl.bind(mainMod .. " + mouse_down",
  hl.dsp.focus({ workspace = "e+1" }))

hl.bind(mainMod .. " + mouse_up",
  hl.dsp.focus({ workspace = "e-1" }))

hl.bind(
  "Print",
  hl.dsp.exec_cmd([[grim -g "$(slurp -d)" - | wl-copy]])
)

hl.bind(
  "XF86AudioRaiseVolume",
  hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ +1%")
)

hl.bind(
  "XF86AudioLowerVolume",
  hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ -1%")
)

hl.bind(
  "XF86AudioMute",
  hl.dsp.exec_cmd("pactl set-sink-mute @DEFAULT_SINK@ toggle")
)

hl.bind(
  "XF86AudioMicMute",
  hl.dsp.exec_cmd("pactl set-source-mute @DEFAULT_SOURCE@ toggle")
)

hl.bind(
  mainMod .. " + SUPER_L",
  hl.dsp.exec_cmd("pkill -SIGUSR1 waybar"),
  { ignore_mods = true, transparent = true }
)

hl.bind(
  mainMod .. " + SUPER_L",
  hl.dsp.exec_cmd("pkill -SIGUSR1 waybar"),
  { release = true, transparent = true }
)

hl.bind(
  mainMod .. " + B",
  hl.dsp.exec_cmd("pkill -SIGUSR1 waybar")
)

hl.bind(
  mainMod .. " + F1",
  hl.dsp.exec_cmd("~/.config/hypr/gamemode.sh")
)