Compare commits
No commits in common. "5503a6d3c12d6fd7949f9981d93b6b97b5fff5c1" and "f7cae059be4c2496c90762130822b32fa16447e3" have entirely different histories.
5503a6d3c1
...
f7cae059be
1 changed files with 30 additions and 65 deletions
|
|
@ -64,9 +64,9 @@ end)
|
||||||
|
|
||||||
-- Environment variables stored in ~/.config/uwsm/env and ~/.config/uwsm/env-hyprland
|
-- Environment variables stored in ~/.config/uwsm/env and ~/.config/uwsm/env-hyprland
|
||||||
|
|
||||||
----------------
|
---------------------
|
||||||
--- SETTINGS ---
|
--- LOOK AND FEEL ---
|
||||||
----------------
|
---------------------
|
||||||
|
|
||||||
-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables
|
-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables
|
||||||
|
|
||||||
|
|
@ -180,10 +180,6 @@ hl.config({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
---------------
|
|
||||||
--- DEVICES ---
|
|
||||||
---------------
|
|
||||||
|
|
||||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#per-device-input-config
|
-- https://wiki.hypr.land/Configuring/Basics/Variables/#per-device-input-config
|
||||||
|
|
||||||
hl.device({
|
hl.device({
|
||||||
|
|
@ -263,7 +259,7 @@ hl.permission({ binary = "/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland",
|
||||||
|
|
||||||
-- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Uncommon-tips-and-tricks/#per-layout-bindings
|
-- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Uncommon-tips-and-tricks/#per-layout-bindings
|
||||||
local function layout_bind(bind_table)
|
local function layout_bind(bind_table)
|
||||||
return function()
|
return function ()
|
||||||
local workspace = hl.get_active_special_workspace() or hl.get_active_workspace()
|
local workspace = hl.get_active_special_workspace() or hl.get_active_workspace()
|
||||||
if not workspace then
|
if not workspace then
|
||||||
return
|
return
|
||||||
|
|
@ -275,30 +271,7 @@ local function layout_bind(bind_table)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param workspace_name string
|
|
||||||
---@param window_cmd string
|
|
||||||
---@param window_rules table
|
|
||||||
local function scratchpad(workspace_name, window_cmd, window_rules)
|
|
||||||
if window_rules["workspace"] then
|
|
||||||
window_rules["workspace"] = "special:" .. workspace_name
|
|
||||||
end
|
|
||||||
return function()
|
|
||||||
hl.dispatch(hl.dsp.workspace.toggle_special(workspace_name))
|
|
||||||
local activeSpecialWorkspace = hl.get_active_special_workspace()
|
|
||||||
|
|
||||||
if activeSpecialWorkspace ~= nil and activeSpecialWorkspace.name == "special:" .. workspace_name then
|
|
||||||
if activeSpecialWorkspace.is_empty then
|
|
||||||
hl.dispatch(hl.dsp.exec_cmd(window_cmd, window_rules))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
hl.bind("SUPER + RETURN", hl.dsp.exec_cmd(terminal))
|
hl.bind("SUPER + RETURN", hl.dsp.exec_cmd(terminal))
|
||||||
hl.bind("SUPER + ALT + C",
|
|
||||||
scratchpad("calculator", "kitty calculator ipython --no-banner",
|
|
||||||
{ float = true, size = { "(monitor_w*0.3)", "(monitor_h*0.4)" }, center = true }))
|
|
||||||
hl.bind("SUPER + ALT + V", scratchpad("btop", "kitty btop btop", {}))
|
|
||||||
hl.bind("SUPER + Q", hl.dsp.exec_cmd(browser))
|
hl.bind("SUPER + Q", hl.dsp.exec_cmd(browser))
|
||||||
hl.bind("SUPER + W", hl.dsp.window.close())
|
hl.bind("SUPER + W", hl.dsp.window.close())
|
||||||
hl.bind("SUPER + SHIFT + ALT + Q", hl.dsp.exit())
|
hl.bind("SUPER + SHIFT + ALT + Q", hl.dsp.exit())
|
||||||
|
|
@ -310,16 +283,13 @@ hl.bind("SUPER + SHIFT + F", hl.dsp.window.fullscreen({ mode = "fullscreen" }))
|
||||||
-- Hyprlock
|
-- Hyprlock
|
||||||
hl.bind("SUPER + CTRL + ALT + L", hl.dsp.exec_cmd(hyprlock))
|
hl.bind("SUPER + CTRL + ALT + L", hl.dsp.exec_cmd(hyprlock))
|
||||||
-- Cliphist
|
-- Cliphist
|
||||||
hl.bind("SUPER + V",
|
hl.bind("SUPER + V", hl.dsp.exec_cmd("pkill fuzzel || cliphist list | uwsm-app -- fuzzel -d -w 75 --select-index 1 | cliphist decode | wl-copy"))
|
||||||
hl.dsp.exec_cmd(
|
|
||||||
"pkill fuzzel || cliphist list | uwsm-app -- fuzzel -d -w 75 --select-index 1 | cliphist decode | wl-copy"))
|
|
||||||
-- Hyprshot
|
-- Hyprshot
|
||||||
hl.bind("SUPER + SHIFT + S", hl.dsp.exec_cmd(hyprshot .. "-m region --clipboard-only"))
|
hl.bind("SUPER + SHIFT + S", hl.dsp.exec_cmd(hyprshot .. "-m region --clipboard-only"))
|
||||||
hl.bind("SUPER + SHIFT + CTRL + S", hl.dsp.exec_cmd(hyprshot .. "-m window --clipboard-only"))
|
hl.bind("SUPER + SHIFT + CTRL + S", hl.dsp.exec_cmd(hyprshot .. "-m window --clipboard-only"))
|
||||||
hl.bind("SUPER + SHIFT + ALT + S", hl.dsp.exec_cmd(hyprshot .. "-m output --clipboard-only"))
|
hl.bind("SUPER + SHIFT + ALT + S", hl.dsp.exec_cmd(hyprshot .. "-m output --clipboard-only"))
|
||||||
hl.bind("SUPER + SHIFT + B",
|
hl.bind("SUPER + SHIFT + B",
|
||||||
hl.dsp.exec_cmd(
|
hl.dsp.exec_cmd("pkill fuzzel || bluetoothctl -- connect \"$(bluetoothctl -- devices Paired | cut -f2- -d ' ' | uwsm-app -- fuzzel -d -l 8 | cut -f1 -d ' ')\""))
|
||||||
"pkill fuzzel || bluetoothctl -- connect \"$(bluetoothctl -- devices Paired | cut -f2- -d ' ' | uwsm-app -- fuzzel -d -l 8 | cut -f1 -d ' ')\""))
|
|
||||||
hl.bind("SUPER + SHIFT + A", hl.dsp.exec_cmd("sh ~/scripts/select-audio-sink.sh"))
|
hl.bind("SUPER + SHIFT + A", hl.dsp.exec_cmd("sh ~/scripts/select-audio-sink.sh"))
|
||||||
|
|
||||||
-- Move focus
|
-- Move focus
|
||||||
|
|
@ -361,18 +331,12 @@ end
|
||||||
hl.bind("SUPER + SHIFT + CTRL + TAB", hl.dsp.workspace.move({ monitor = "+1" }))
|
hl.bind("SUPER + SHIFT + CTRL + TAB", hl.dsp.workspace.move({ monitor = "+1" }))
|
||||||
|
|
||||||
-- Laptop multimedia keys for volume and LCD brightness
|
-- Laptop multimedia keys for volume and LCD brightness
|
||||||
hl.bind("XF86AudioRaiseVolume",
|
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && ~/scripts/volume-control.sh"), { locked = true, repeating = true })
|
||||||
hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && ~/scripts/volume-control.sh"),
|
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && ~/scripts/volume-control.sh"), { locked = true, repeating = true })
|
||||||
{ locked = true, repeating = true })
|
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && ~/scripts/volume-control.sh"), { locked = true, repeating = true })
|
||||||
hl.bind("XF86AudioLowerVolume",
|
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true })
|
||||||
hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && ~/scripts/volume-control.sh"),
|
|
||||||
{ locked = true, repeating = true })
|
|
||||||
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && ~/scripts/volume-control.sh"),
|
|
||||||
{ locked = true, repeating = true })
|
|
||||||
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"),
|
|
||||||
{ locked = true, repeating = true })
|
|
||||||
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s 5%+"), { locked = true, repeating = true })
|
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s 5%+"), { locked = true, repeating = true })
|
||||||
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 5%-"), { locked = true, repeating = true })
|
hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl s 5%-"), { locked = true, repeating = true })
|
||||||
|
|
||||||
-- Requires playerctl
|
-- Requires playerctl
|
||||||
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
|
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
|
||||||
|
|
@ -383,8 +347,8 @@ hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true
|
||||||
{{- if eq .chezmoi.hostname "wkz-lapdog" }}
|
{{- if eq .chezmoi.hostname "wkz-lapdog" }}
|
||||||
|
|
||||||
-- Stylus
|
-- Stylus
|
||||||
hl.bind("SUPER + F20", hl.dsp.send_shortcut({ mods = "CTRL", key = "Z" })) -- Single-click
|
hl.bind("SUPER + F20", hl.dsp.send_shortcut({mods = "CTRL", key = "Z"})) -- Single-click
|
||||||
hl.bind("SUPER + F19", hl.dsp.send_shortcut({ mods = "CTRL + SHIFT", key = "Z" })) -- Double-click
|
hl.bind("SUPER + F19", hl.dsp.send_shortcut({mods = "CTRL + SHIFT", key = "Z"})) -- Double-click
|
||||||
hl.bind("SUPER + F18", hl.dsp.exec_cmd("pkill wvkbd-deskintl || uwsm-app -- wvkbd-deskintl")) -- Press & hold
|
hl.bind("SUPER + F18", hl.dsp.exec_cmd("pkill wvkbd-deskintl || uwsm-app -- wvkbd-deskintl")) -- Press & hold
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
@ -399,8 +363,9 @@ hl.bind("SUPER + F18", hl.dsp.exec_cmd("pkill wvkbd-deskintl || uwsm-app -- wvkb
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
name = "no-border-single-window",
|
name = "no-border-single-window",
|
||||||
match = {
|
match = {
|
||||||
workspace = "w[1]s[false]",
|
workspace = "w[1]",
|
||||||
class = "negative:^(steam)$"
|
class = "negative:^(steam)$",
|
||||||
|
title = "negative:Steam"
|
||||||
},
|
},
|
||||||
|
|
||||||
border_size = 0
|
border_size = 0
|
||||||
|
|
@ -410,7 +375,7 @@ hl.window_rule({
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
name = "no-border-fullscreen",
|
name = "no-border-fullscreen",
|
||||||
match = {
|
match = {
|
||||||
workspace = "f[1-2]s[false]"
|
workspace = "f[1-2]",
|
||||||
},
|
},
|
||||||
|
|
||||||
border_size = 0
|
border_size = 0
|
||||||
|
|
@ -420,44 +385,44 @@ hl.window_rule({
|
||||||
name = "pavucontrol-float",
|
name = "pavucontrol-float",
|
||||||
match = {
|
match = {
|
||||||
class = "^(org.pulseaudio.pavucontrol)$",
|
class = "^(org.pulseaudio.pavucontrol)$",
|
||||||
title = "^(Volume Control)$"
|
title = "^(Volume Control)$",
|
||||||
},
|
},
|
||||||
|
|
||||||
float = 1,
|
float = 1,
|
||||||
center = 1,
|
center = 1,
|
||||||
size = {
|
size = {
|
||||||
"0.35*monitor_w",
|
"0.35*monitor_w",
|
||||||
"0.4*monitor_h"
|
"0.4*monitor_h",
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
name = "showmethekey-float",
|
name = "showmethekey-float",
|
||||||
match = {
|
match = {
|
||||||
class = "^(showmethekey-gtk)$"
|
class = "^(showmethekey-gtk)$",
|
||||||
},
|
},
|
||||||
|
|
||||||
float = 1,
|
float = 1,
|
||||||
border_size = 0
|
border_size = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
name = "steam-popup-float",
|
name = "steam-popup-float",
|
||||||
match = {
|
match = {
|
||||||
class = "^(steam)$",
|
class = "^(steam)$",
|
||||||
title = "negative:Steam"
|
title = "negative:Steam",
|
||||||
},
|
},
|
||||||
|
|
||||||
float = 1
|
float = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
name = "gaming",
|
name = "gaming",
|
||||||
match = {
|
match = {
|
||||||
class = "^(steam_app_\\d+|cs2)$"
|
class = "^(steam_app_\\d+|cs2)$",
|
||||||
},
|
},
|
||||||
|
|
||||||
workspace = 10,
|
workspace = 10,
|
||||||
immediate = 1,
|
immediate = 1,
|
||||||
fullscreen = 1
|
fullscreen = 1,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue