From 2550c9b1953532c0a7e0e4b57f60b1292583596c Mon Sep 17 00:00:00 2001 From: Jimbo Date: Sun, 27 Oct 2024 02:57:53 -0400 Subject: [PATCH] Add zsh vim bindings, change the MPC data, hotkey changes --- modules/home/sway/waybar/default.nix | 2 +- modules/home/utils/zsh/default.nix | 3 ++- modules/system/services/pc/keyd/default.nix | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/home/sway/waybar/default.nix b/modules/home/sway/waybar/default.nix index c3e0629..f7f400a 100644 --- a/modules/home/sway/waybar/default.nix +++ b/modules/home/sway/waybar/default.nix @@ -146,7 +146,7 @@ exec-if = "mpc status | grep -q '^\\[playing\\] \\|^\\[paused\\]'"; exec = pkgs.writeScript "mpvMetadata" '' get_metadata() { - mpc --format "%file%" | head -n 1 | sed -E 's/\.(mp3|mp4|m4a|mov|flac|opus|oga)$//; s/&/&/g' + mpc | head -n 1 } truncate_string() { diff --git a/modules/home/utils/zsh/default.nix b/modules/home/utils/zsh/default.nix index dbef8a8..9b04257 100644 --- a/modules/home/utils/zsh/default.nix +++ b/modules/home/utils/zsh/default.nix @@ -7,7 +7,7 @@ oh-my-zsh = { enable = true; theme = "agnoster"; - plugins = ["git"]; + plugins = [ "git" ]; }; shellAliases = { # NixOS aliases @@ -46,6 +46,7 @@ spotdl = "spotdl --m3u --format opus"; }; initExtra = '' + source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh ${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch setopt HIST_IGNORE_SPACE setopt RM_STAR_WAIT diff --git a/modules/system/services/pc/keyd/default.nix b/modules/system/services/pc/keyd/default.nix index b71dc61..ed48904 100644 --- a/modules/system/services/pc/keyd/default.nix +++ b/modules/system/services/pc/keyd/default.nix @@ -22,6 +22,7 @@ j = "down"; k = "up"; l = "right"; + g = "macro(C-h)"; semicolon = "macro(C-l)"; };