Update keybinds
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -34,9 +34,16 @@
|
||||
in
|
||||
[
|
||||
", Print, exec, ${hyprshot} -m output -m active -f ${filename}"
|
||||
"Shift, Print, exec, ${hyprshot} -m output -m active -f ${filename} -- ${swappyWrapper}"
|
||||
"Ctrl, Print, exec, ${hyprshot} -m output -m active -f ${filename} -- ${swappyWrapper}"
|
||||
|
||||
"$mod, s, exec, ${hyprshot} -m output -m active -f ${filename}"
|
||||
"$mod_Ctrl, s, exec, ${hyprshot} -m output -m active -f ${filename} -- ${swappyWrapper}"
|
||||
|
||||
", XF86SelectiveScreenshot, exec, ${hyprshot} -m region -z -f ${filename}"
|
||||
"Shift, XF86SelectiveScreenshot, exec, ${hyprshot} -m region -z -f ${filename} -- ${swappyWrapper}"
|
||||
"Ctrl, XF86SelectiveScreenshot, exec, ${hyprshot} -m region -z -f ${filename} -- ${swappyWrapper}"
|
||||
|
||||
"$mod_Shift, S, exec, ${hyprshot} -m region -z -f ${filename}"
|
||||
"$mod_Shift_Ctrl, S, exec, ${hyprshot} -m region -z -f ${filename} -- ${swappyWrapper}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -87,9 +87,5 @@ in
|
||||
};
|
||||
|
||||
theme.template."${home}/.config/spotify/theme.css".source = ./theme.css;
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"$mod, s, exec, ${lib.meta.getExe hmConfig.programs.spicetify.spicedSpotify}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -5,7 +5,10 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./display.nix ];
|
||||
imports = [
|
||||
./display.nix
|
||||
./keybinds.nix
|
||||
];
|
||||
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
|
30
hosts/himalia/hardware/keybinds.nix
Normal file
30
hosts/himalia/hardware/keybinds.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
wayland.windowManager.hyprland.settings =
|
||||
let
|
||||
asusctl = "${pkgs.asusctl}/bin/asusctl";
|
||||
in
|
||||
{
|
||||
bindle = [
|
||||
", XF86KbdBrightnessUp, exec, ${asusctl} -n"
|
||||
", XF86KbdBrightnessDown, exec, ${asusctl} -p"
|
||||
];
|
||||
|
||||
bindl =
|
||||
let
|
||||
touchpadHelper = pkgs.writeShellApplication {
|
||||
name = "touchpad-helper";
|
||||
runtimeInputs = with pkgs; [ hyprland ];
|
||||
text = builtins.readFile ./touchpad-helper.sh;
|
||||
};
|
||||
in
|
||||
[
|
||||
", XF86Launch4, exec, ${asusctl} profile -n"
|
||||
", XF86TouchpadToggle, exec, ${touchpadHelper} asuf1209:00-2808:0219-touchpad"
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
22
hosts/himalia/hardware/touchpad-helper.sh
Normal file
22
hosts/himalia/hardware/touchpad-helper.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
HYPRLAND_DEVICE="$1"
|
||||
export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
|
||||
|
||||
enable_touchpad() {
|
||||
echo -n "true" >"$STATUS_FILE"
|
||||
hyprctl keyword "device[$HYPRLAND_DEVICE]:enabled" true
|
||||
}
|
||||
|
||||
disable_touchpad() {
|
||||
echo -n "false" >"$STATUS_FILE"
|
||||
hyprctl keyword "device[$HYPRLAND_DEVICE]:enabled" false
|
||||
}
|
||||
|
||||
if ! [ -f "$STATUS_FILE" ]; then
|
||||
disable_touchpad
|
||||
else
|
||||
if [ "$(<"$STATUS_FILE")" = "true" ]; then
|
||||
disable_touchpad
|
||||
elif [ "$(<"$STATUS_FILE")" = "false" ]; then
|
||||
enable_touchpad
|
||||
fi
|
||||
fi
|
Reference in New Issue
Block a user