Add zsh, swap alacritty for kitty

Adds zsh with nix-your-shell support

switch from alacritty to kitty

Add zsh

Fix ZSH, and switch to ZSH from alacritty

Add zsh prompt

Swap any-nix-shell for nix-your-shell
This commit is contained in:
JuliaLange 2024-04-09 15:07:17 -07:00 committed by Julia Lange
parent c97d94408e
commit a07b300be7
4 changed files with 36 additions and 3 deletions

View file

@ -26,6 +26,7 @@
./programs/xonsh
./programs/obs
./programs/kitty
./programs/zsh
# ./services/scripts
./services/timers

View file

@ -1,7 +1,7 @@
$mainMod = SUPER
# Exec programs
bind = $mainMod, return, exec, alacritty
bind = $mainMod, return, exec, kitty
bind = $mainMod SHIFT, return, exec, rofi -show run
bind = $mainMod, P, exec, grimblast --freeze copy area
bind = $mainMod SHIFT, P, exec, grimblast --freeze copysave area

View file

@ -14,7 +14,7 @@ workspace=name:web , monitor:DP-1, persistent:true
workspace=name:med , monitor:DP-1, persistent:true
# Pseudo
workspace=special:mus, persistent:true
workspace=special:scratch, on-created-empty: [float; size 50% 50%; center] alacritty
workspace=special:scratch, on-created-empty: [float; size 50% 50%; center] kitty
windowrule = workspace name:web, librewolf
windowrulev2 = workspace name:med, librewolf,title:Picture-in-Picture
@ -26,6 +26,7 @@ windowrule = workspace name:game, explorer.exe
windowrulev2 = opacity 0.94 fullscreen:0
windowrulev2 = opacity 0.79 override, class:^(Alacritty)$
windowrulev2 = opacity 0.79 override, class:^(kitty)$
windowrulev2 = opacity 1 override, initialTitle:^(Discord Popout)$
windowrulev2 = opacity 1 override, class:^(firefox)$
windowrulev2 = opacity 1 override, class:^(Gimp)$
@ -34,6 +35,6 @@ windowrulev2 = opacity 1 override, class:^(mpv)$
env = HYPR_WORK_DB,$XDG_CACHE_HOME/hypr/workspace.db
exec-once = [workspace special:mus silent;float;size 70% 70%;center] alacritty -e spt
# exec-once = [workspace special:mus silent;float;size 70% 70%;center] mus client
exec-once = [workspace name:chat silent] vesktop
exec-once = [workspace name:chat silent] beeper

31
programs/zsh/default.nix Normal file
View file

@ -0,0 +1,31 @@
{ config, pkgs, ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
dotDir = ".config/zsh";
history.save = 10000;
history.size = 10000;
history.path = "${config.xdg.dataHome}/zsh/history";
initExtra = ''
# Nix-shell
${pkgs.nix-your-shell}/bin/nix-your-shell zsh | source /dev/stdin
# Prompt
autoload -U colors && colors
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr '·*'
zstyle ':vcs_info:*' stagedstr '·+'
zstyle ':vcs_info:git:*' formats '%b%u%c'
export PROMPT="%(0?.%F{white}.%? %F{red})τ%f "
export RPROMPT="%F{yellow}\$vcs_info_msg_0_%f %F{blue}%~%f"
'';
};
}