more refinements to vscode + fish + hyprland

This commit is contained in:
2025-12-02 23:04:02 +01:00
parent 625039ee58
commit 8772229192
14 changed files with 281 additions and 266 deletions

View File

@@ -4,14 +4,13 @@ let
# QOL
"mhutchie.git-graph"
"redhat.vscode-yaml"
"github.copilot"
"github.copilot-chat"
# Nix environment selector
"arrterian.nix-env-selector"
# continue.continue
"github.copilot"
"github.copilot-chat"
];
baseSettings = {
# visual
"window.titleBarStyle" = "native";

View File

@@ -13,18 +13,12 @@
programs.fish = {
enable = true;
# enableCompletion = true;
generateCompletions = true;
plugins = [
{
name = "fzf-fish";
src = pkgs.fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "v10.3";
sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
};
}
# add others here
{ name = "fzf"; src = pkgs.fishPlugins.fzf-fish.src; }
{ name = "z"; src = pkgs.fishPlugins.z.src; }
{ name = "pure"; src = pkgs.fishPlugins.pure.src; }
];
functions = {
@@ -47,4 +41,5 @@
fi
'';
};
}

View File

@@ -1,47 +0,0 @@
{pkgs, config, lib, ...}:
let
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
in
{
config = {
services.fusuma = {
enable = true;
settings = {
swipe = {
"3" = {
up = {
command = "exec ${hyprctl} dispatch fullscreen 1";
};
down = {
command = "exec ${lib.getExe config.nix-config.launcher}";
};
};
};
pinch = {
"4" = {
"in" = {
command = "exec ${hyprctl} dispatch togglespecialworkspace magic";
};
"out" = {
command = "exec ${hyprctl} dispatch togglespecialworkspace magic";
};
};
};
hold = {
"5" = {
command = "exec ${lib.getExe config.nix-config.launcher}";
threshold = 0.1;
};
};
threshold = {
pinch = 0.1;
};
};
};
};
}

View File

@@ -2,6 +2,7 @@
imports = [
./autostart.nix
./general.nix
./gestures.nix
./keybinds.nix
./layouts.nix
./packages.nix

View File

@@ -56,12 +56,6 @@ in
sensitivity = 0.5;
};
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 4;
workspace_swipe_touch = true;
};
decoration = {
rounding = 10;
inactive_opacity = 0.9;

View File

@@ -0,0 +1,21 @@
{inputs, pkgs, lib, config, ...}:
let
cfg = config.nix-config.hypr;
in
{
config = {
wayland.windowManager.hyprland = {
settings = {
gesture = [
# 4 finger swipe to switch workspace
"4, horizontal, workspace"
"3, up, fullscreen"
"3, down, float"
"4, vertical, scale: 0.5, special, magic"
];
};
};
};
}

View File

@@ -1,3 +1,4 @@
# Note that some keybindings are delegated to other components, e.g. the quickshell module
{inputs, pkgs, lib, config, ...}:
let
cfg = config.nix-config.hypr;
@@ -5,8 +6,6 @@ in
{
config = {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
settings = {
"$mod" = "SUPER";
@@ -22,9 +21,6 @@ in
# Lock screen
"$mod, l, exec, loginctl lock-session"
# Clipboard management
"$mod, V, exec, cliphist list | ${lib.getExe config.nix-config.launcher} --dmenu | cliphist decode | wl-copy"
# Close window
"$mod, Q, killactive,"
# Force close window
@@ -54,10 +50,10 @@ in
"$mod+Ctrl, right, movetoworkspace, +1"
# Switch workspace
"$mod, left, workspace, prev"
"$mod, right, workspace, next"
"$mod, mouse_down, workspace, prev"
"$mod, mouse_up, workspace, next"
"$mod, left, workspace, e-1"
"$mod, right, workspace, e+1"
"$mod, mouse_down, workspace, e-1"
"$mod, mouse_up, workspace, e+1"
# move to scratch workspace
@@ -79,9 +75,6 @@ in
", XF86Cut, exec, hyprshot -m region -o ~/Pictures/Screenshots"
"Shift, XF86Cut, exec, hyprshot -m window -o ~/Pictures/Screenshots"
# Power menu
", XF86PowerOff, exec, ${lib.getExe config.nix-config.powerMenu}"
# Other pickers using the same launcher
"$mod+Ctrl, space, exec, ${lib.getExe config.nix-config.filePicker}"
"$mod, period, exec, ${lib.getExe config.nix-config.emojiPicker}"
@@ -89,13 +82,6 @@ in
# repeatable bindings
binde = [
# Fn keys
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
# Reshape the window in focus
"$mod, MINUS, resizeactive, -2% -2%"
"$mod, KP_Subtract, resizeactive, -2% -2%"
@@ -133,20 +119,17 @@ in
"$mod, mouse:273, resizewindow"
];
};
extraConfig = ''
bind= , XF86AudioMicMute, submap, player_submap
submap=player_submap
bind=, XF86AudioRaiseVolume, exec, notify-send previous; hyprctl dispatch submap reset
bind=, XF86AudioLowerVolume, exec, notify-send next; hyprctl dispatch submap reset
bind=, XF86AudioMicMute, exec, notify-send pause; hyprctl dispatch submap reset
submap=reset
'';
# extraConfig = ''
# bind= , XF86AudioMicMute, submap, player_submap
# submap=player_submap
# bind=, XF86AudioRaiseVolume, exec, notify-send previous; hyprctl dispatch submap reset
# bind=, XF86AudioLowerVolume, exec, notify-send next; hyprctl dispatch submap reset
# bind=, XF86AudioMicMute, exec, notify-send pause; hyprctl dispatch submap reset
# submap=reset
# '';
};
};
}

View File

@@ -1,13 +1,25 @@
{pkgs, ...}:
{
home.packages = [
pkgs.kubie
pkgs.kubectl
];
# Add the shell alias
programs.fish.shellAliases = {
k = "kubectl";
};
# set the kubectl autocompletions for fish
# the fish functions are generated by kubectl itself, we do this at compile time and write them a single time to avoid generating them at each shell start
# the command is kubectl completion fish
# which becomes
programs.fish.completions."kubectl" = builtins.readFile "${pkgs.runCommand "kubectl-completion" {} ''
${pkgs.kubectl}/bin/kubectl completion fish > $out
''}";
programs.kubeswitch = {
enable = true;
enableFishIntegration = true;
};
}

View File

@@ -25,4 +25,35 @@
# plugins = {};
};
wayland.windowManager.hyprland = {
settings = {
binde = [
# Brightness
", XF86MonBrightnessDown, exec, dms ipc call brightness decrement 5 \"\""
", XF86MonBrightnessUp, exec, dms ipc call brightness increment 5 \"\""
# Audio volume + playback
", XF86AudioMute, exec, dms ipc call audio mute"
", XF86AudioLowerVolume, exec, dms ipc call audio decrement 5"
", XF86AudioRaiseVolume, exec, dms ipc call audio increment 5"
"$mod, XF86AudioMute, exec, dms ipc call mpris playPause"
"$mod, XF86AudioLowerVolume, exec, dms ipc call mpris previous"
"$mod, XF86AudioRaiseVolume, exec, dms ipc call mpris next"
# also allow the dedicated media keys to control playback
", XF86AudioPlay, exec, dms ipc call mpris playPause"
", XF86AudioPrev, exec, dms ipc call mpris previous"
", XF86AudioNext, exec, dms ipc call mpris next"
];
bind = [
", XF86PowerOff, exec, dms ipc call powermenu toggle"
# used to be ", XF86PowerOff, exec, ${lib.getExe config.nix-config.powerMenu}"
"$mod, V, exec, dms ipc call clipboard toggle"
# used to be "$mod, V, exec, cliphist list | ${lib.getExe config.nix-config.launcher} --dmenu | cliphist decode | wl-copy"
];
};
};
}