Skip to content

Commit

Permalink
[chore}: update
Browse files Browse the repository at this point in the history
  • Loading branch information
rxyhn committed Jan 1, 2024
1 parent ace1fda commit 4d1e84e
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 18 deletions.
15 changes: 15 additions & 0 deletions home/modules/programs/media.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@
defaultProfiles = ["gpu-hq"];
scripts = [pkgs.mpvScripts.mpris];
};

obs-studio = {
enable = true;
plugins = with pkgs.obs-studioPlugins; [
obs-advanced-scene-switcher
obs-browser
obs-ffmpeg
obs-filters
obs-ndi
obs-streamfx
obs-transitions
obs-v4l2sink
obs-xdg-portal
];
};
};

services = {
Expand Down
5 changes: 5 additions & 0 deletions home/modules/shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@
"--exact"
];
};

thefuck = {
enable = true;
enableZshIntegration = true;
};
};

services = {
Expand Down
66 changes: 48 additions & 18 deletions home/modules/shell/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,82 @@
}: {
programs.zsh = {
enable = true;
enableAutosuggestions = true;
syntaxHighlighting.enable = true;
autocd = true;
dotDir = ".config/zsh";
dirHashes = {
downloads = "$HOME/Downloads";
Documents = "$HOME/Documents";
dl = "$HOME/Downloads";
docs = "$HOME/Documents";
code = "$HOME/Documents/code";
dotfiles = "$HOME/Documents/code/dotfiles";
pictures = "$HOME/Pictures";
videos = "$HOME/Videos";
dots = "$HOME/Documents/code/dotfiles";
pics = "$HOME/Pictures";
vids = "$HOME/Videos";
};
dotDir = ".config/zsh";

autocd = true;
enableAutosuggestions = true;
enableCompletion = true;
syntaxHighlighting.enable = true;

history = {
expireDuplicatesFirst = true;
path = "${config.xdg.dataHome}/zsh_history";
};
initExtra = ''
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end

initExtra = ''
zstyle ':completion:*' completer _complete _ignored _approximate
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' menu select
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' verbose true
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
_comp_options+=(globdots)
'';

shellAliases = with lib;
with pkgs; {
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
cat = "${getExe bat} --style=plain";
du = getExe du-dust;
fzf = getExe skim;
ga = "forgit_add";
gbd = "forgit_branch_delete";
gbl = "forgit_blame";
gcb = "forgit_checkout_branch";
gcf = "forgit_checkout_file";
gclean = "forgit_clean";
gco = "forgit_checkout_commit";
gcp = "forgit_cherry_pick";
gct = "forgit_checkout_tag";
gd = "forgit_diff";
gfu = "forgit_fixup";
gi = "forgit_ignore";
glo = "forgit_log";
grb = "forgit_rebase";
grc = "forgit_revert_commit";
grep = getExe ripgrep;
du = getExe du-dust;
ps = getExe procs;
grh = "forgit_reset_head";
gsp = "forgit_stash_push";
gss = "forgit_stash_show";
la = "${getExe eza} -lah --tree";
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
ps = getExe procs;
tree = "${getExe eza} --tree --icons --tree";
untar = "tar -xvf";
untargz = "tar -xzf";
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
};
shellGlobalAliases = {eza = "eza --icons --git";};

plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.8.0";
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
};
}
];
};
}

0 comments on commit 4d1e84e

Please sign in to comment.