refactor: ponytail audit
This commit is contained in:
1 parent
de8b59ec16
commit
f080ebe36e
57 files changed
+566
-2137
No files matched your search
@@ -1,9 +1,19 @@
|
||||
{
|
||||
browser,
|
||||
launcher,
|
||||
shortcutCommands,
|
||||
swapMonitorWorkspaces,
|
||||
terminal,
|
||||
}:
|
||||
let
|
||||
spawnLocked = command: {
|
||||
spawn-sh = command;
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
withCooldown = action: {
|
||||
${action} = { };
|
||||
_props.cooldown-ms = 150;
|
||||
};
|
||||
in
|
||||
{
|
||||
# Application and utility launchers
|
||||
"Mod+Return" = {
|
||||
@@ -25,46 +35,16 @@
|
||||
};
|
||||
|
||||
# Hardware media, volume, and brightness keys
|
||||
"XF86AudioPlay" = {
|
||||
spawn-sh = "playerctl play-pause";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioStop" = {
|
||||
spawn-sh = "playerctl stop";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioPrev" = {
|
||||
spawn-sh = "playerctl previous";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioNext" = {
|
||||
spawn-sh = "playerctl next";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioRaiseVolume" = {
|
||||
spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86MonBrightnessUp" = {
|
||||
spawn-sh = "brightnessctl s 5%+";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
spawn-sh = "brightnessctl s 5%-";
|
||||
_props.allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioPlay" = spawnLocked "playerctl play-pause";
|
||||
"XF86AudioStop" = spawnLocked "playerctl stop";
|
||||
"XF86AudioPrev" = spawnLocked "playerctl previous";
|
||||
"XF86AudioNext" = spawnLocked "playerctl next";
|
||||
"XF86AudioRaiseVolume" = spawnLocked "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
"XF86AudioLowerVolume" = spawnLocked "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
"XF86AudioMute" = spawnLocked "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86AudioMicMute" = spawnLocked "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
"XF86MonBrightnessUp" = spawnLocked "brightnessctl s 5%+";
|
||||
"XF86MonBrightnessDown" = spawnLocked "brightnessctl s 5%-";
|
||||
|
||||
# Screenshots
|
||||
"Mod+S".screenshot = { };
|
||||
@@ -105,7 +85,7 @@
|
||||
"Mod+Tab".focus-monitor-next = { };
|
||||
"Mod+A" = {
|
||||
_props.repeat = false;
|
||||
spawn = shortcutCommands.swapMonitorWorkspaces;
|
||||
spawn = swapMonitorWorkspaces;
|
||||
_props.hotkey-overlay-title = "Swap Monitor Workspaces";
|
||||
};
|
||||
"Mod+Alt+Tab".move-column-to-monitor-next = { };
|
||||
@@ -124,22 +104,10 @@
|
||||
"Mod+Shift+I".move-workspace-up = { };
|
||||
|
||||
# Mouse workspace navigation
|
||||
"Mod+WheelScrollDown" = {
|
||||
focus-workspace-down = { };
|
||||
_props.cooldown-ms = 150;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
focus-workspace-up = { };
|
||||
_props.cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Alt+WheelScrollDown" = {
|
||||
move-column-to-workspace-down = { };
|
||||
_props.cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Alt+WheelScrollUp" = {
|
||||
move-column-to-workspace-up = { };
|
||||
_props.cooldown-ms = 150;
|
||||
};
|
||||
"Mod+WheelScrollDown" = withCooldown "focus-workspace-down";
|
||||
"Mod+WheelScrollUp" = withCooldown "focus-workspace-up";
|
||||
"Mod+Alt+WheelScrollDown" = withCooldown "move-column-to-workspace-down";
|
||||
"Mod+Alt+WheelScrollUp" = withCooldown "move-column-to-workspace-up";
|
||||
|
||||
# Mouse column navigation and movement
|
||||
"Mod+WheelScrollRight".focus-column-or-monitor-right = { };
|
||||
|
||||
Reference in new issue
Block a user