From 68ab6df1d36662b7587d657100e9c6c61b72808f Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Wed, 17 Apr 2024 14:43:43 +0200 Subject: [PATCH] use zsh --- desktop/gnome/default.nix | 4 ++ machines/xps/configuration.nix | 2 +- user/programs/terminal/default.nix | 26 +------ user/programs/terminal/files/bashrc | 9 +-- .../terminal/files/shell/rc.d/01-starship.zsh | 1 + .../terminal/files/shell/rc.d/10-atuin.bash | 1 - .../terminal/files/shell/rc.d/10-atuin.zsh | 1 + .../files/shell/rc.d/10-starship.bash | 1 - user/programs/terminal/files/zshrc | 72 ------------------- 9 files changed, 10 insertions(+), 107 deletions(-) create mode 100644 user/programs/terminal/files/shell/rc.d/01-starship.zsh delete mode 100644 user/programs/terminal/files/shell/rc.d/10-atuin.bash create mode 100644 user/programs/terminal/files/shell/rc.d/10-atuin.zsh delete mode 100644 user/programs/terminal/files/shell/rc.d/10-starship.bash diff --git a/desktop/gnome/default.nix b/desktop/gnome/default.nix index 6a11ea2..a8aaa83 100644 --- a/desktop/gnome/default.nix +++ b/desktop/gnome/default.nix @@ -3,6 +3,7 @@ { boot.plymouth = { enable = true; + theme = "breeze"; }; services = { @@ -41,10 +42,13 @@ programs.dconf.enable = true; + boot.initrd.systemd.enable = true; environment = { systemPackages = [ #pkgs.gnome.dconf-editor + pkgs.plymouth + pkgs.breeze-plymouth pkgs.gnome.networkmanager-openconnect pkgs.numix-icon-theme pkgs.papirus-icon-theme diff --git a/machines/xps/configuration.nix b/machines/xps/configuration.nix index b58173f..194df1d 100644 --- a/machines/xps/configuration.nix +++ b/machines/xps/configuration.nix @@ -31,7 +31,7 @@ "/crypto_keyfile.bin" = null; }; - boot.kernelParams = [ "i915.force_probe=9b41" ]; + boot.kernelParams = [ "i915.force_probe=9b41" "quiet" ]; networking.hostName = "alice-xps"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. diff --git a/user/programs/terminal/default.nix b/user/programs/terminal/default.nix index c2f303e..6267e80 100644 --- a/user/programs/terminal/default.nix +++ b/user/programs/terminal/default.nix @@ -37,6 +37,7 @@ pkgs.duf pkgs.dust pkgs.rustscan + pkgs.zoxide ]; programs = { @@ -56,30 +57,5 @@ ".shellrc/rc.d" = { source = ./files/shell/rc.d; }; - # ".oh-my-zsh" = { - # source = builtins.fetchGit { - # url = "https://github.com/ohmyzsh/ohmyzsh"; - # rev = "b07c8cfe692bc6c7702f0aef5d493b12dfb43392"; - # }; - # }; - # ".config/zsh/custom/plugins/zsh-autosuggestions" = { - # source = builtins.fetchGit { - # url = "https://github.com/zsh-users/zsh-autosuggestions"; - # rev = "c3d4e576c9c86eac62884bd47c01f6faed043fc5"; - # }; - # }; - # ".config/zsh/custom/plugins/zsh-syntax-highlighting" = { - # source = builtins.fetchGit { - # url = "https://github.com/zsh-users/zsh-syntax-highlighting"; - # rev = "143b25eb98aa3227af63bd7f04413e1b3e7888ec"; - # }; - # }; - # - # ".config/zsh/custom/zsh-vi-mode" = { - # source = builtins.fetchGit { - # url = "https://github.com/jeffreytse/zsh-vi-mode"; - # rev = "1f28e1886dc8e49f41b817634d5c7695b6abb145"; - # }; - # }; }; } diff --git a/user/programs/terminal/files/bashrc b/user/programs/terminal/files/bashrc index e334a69..cf9bc4f 100644 --- a/user/programs/terminal/files/bashrc +++ b/user/programs/terminal/files/bashrc @@ -1,15 +1,10 @@ # Load all files from .shell/rc.d directory if [ -d $HOME/.shellrc/rc.d ]; then for file in $HOME/.shellrc/rc.d/*.sh; do - source $file + source $file || echo "Failed to source $file" done -fi -if [ -d $HOME/.shellrc/rc.d ]; then for file in $HOME/.shellrc/rc.d/*.bash; do - source $file + source $file || echo "Failed to source $file" done fi - -[ -f ~/.fzf.bash ] && source ~/.fzf.bash - diff --git a/user/programs/terminal/files/shell/rc.d/01-starship.zsh b/user/programs/terminal/files/shell/rc.d/01-starship.zsh new file mode 100644 index 0000000..af75929 --- /dev/null +++ b/user/programs/terminal/files/shell/rc.d/01-starship.zsh @@ -0,0 +1 @@ +eval "$(starship init zsh)" diff --git a/user/programs/terminal/files/shell/rc.d/10-atuin.bash b/user/programs/terminal/files/shell/rc.d/10-atuin.bash deleted file mode 100644 index 56077d9..0000000 --- a/user/programs/terminal/files/shell/rc.d/10-atuin.bash +++ /dev/null @@ -1 +0,0 @@ -eval "$(atuin init bash)" diff --git a/user/programs/terminal/files/shell/rc.d/10-atuin.zsh b/user/programs/terminal/files/shell/rc.d/10-atuin.zsh new file mode 100644 index 0000000..d6e8cfc --- /dev/null +++ b/user/programs/terminal/files/shell/rc.d/10-atuin.zsh @@ -0,0 +1 @@ +eval "$(atuin init zsh)" diff --git a/user/programs/terminal/files/shell/rc.d/10-starship.bash b/user/programs/terminal/files/shell/rc.d/10-starship.bash deleted file mode 100644 index b6ee6e8..0000000 --- a/user/programs/terminal/files/shell/rc.d/10-starship.bash +++ /dev/null @@ -1 +0,0 @@ -eval "$(starship init bash)" diff --git a/user/programs/terminal/files/zshrc b/user/programs/terminal/files/zshrc index 7995d06..9d65db9 100644 --- a/user/programs/terminal/files/zshrc +++ b/user/programs/terminal/files/zshrc @@ -1,41 +1,10 @@ export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-$HOME/.cache} -export ZSH="$HOME/.oh-my-zsh" -export ZSH_CUSTOM="$HOME/.config/zsh/custom" -ZSH_THEME="robbyrussell" - -plugins=( - git - zsh-autosuggestions - copypath - copyfile - copybuffer - dirhistory - history - z - bgnotify - zsh-syntax-highlighting -) -source $ZSH/oh-my-zsh.sh -export LANG=en_US.UTF-8 - -plugins+=(zsh-vi-mode) -source $ZSH_CUSTOM/zsh-vi-mode/zsh-vi-mode.plugin.zsh - -zvm_after_init() { - FZF_SHARE=/usr/share/fzf - [ -f $FZF_SHARE/completion.zsh ] && . "$FZF_SHARE/completion.zsh" - [ -f $FZF_SHARE/key-bindings.zsh ] && . "$FZF_SHARE/key-bindings.zsh" -} - # Load all files from .shell/rc.d directory if [ -d $HOME/.shellrc/rc.d ]; then for file in $HOME/.shellrc/rc.d/*.sh; do source $file done -fi -# Load all files from .shell/zshrc.d directory -if [ -d $HOME/.shellrc/zshrc.d ]; then for file in $HOME/.shellrc/zshrc.d/*.zsh; do source $file done @@ -46,47 +15,6 @@ if [[ -n "$SSH_CONNECTION" ]] ;then export PINENTRY_USER_DATA="USE_CURSES=1" fi -if [ `tput cols` -gt "70" ]; then -function PRINT_CENTER { - COLS=`tput cols` - OFFSET=$(( ($COLS - $1) / 2 )) - PRE="" - for i in `seq $OFFSET`; do - PRE="$PRE " - done - while IFS= read -r line; do - echo "$PRE$line" - done <<< "$2" -} -PRINT_CENTER 60 " - - ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ - █░▄▄▀█▀▄▄▀█░▄▄░█▄░▄█▀▄▀██░▄░██░██░█░▄▄█░▄▄░█ - █░▀▀▄█░██░█░▀▄░██░██░█▀█░▀▀░▀█░██░█▄▄▀███▄██ - █▄█▄▄██▄▄██░▀▀░██▄███▄█████░███▄▄▄█▄▄▄█░▀▀░█ - ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ - - ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ - ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ - ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ - ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ - ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ - ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ - ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ - ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ - ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ - ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ - ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ -▄▄▄ . ▌ ▐·▪ ▄▄▌ ▄▄▌ ▐ ▄▌▪ ▄▄▄▄▄ ▄ .▄ ▄• ▄▌▄▄▄▄▄ -▀▄.▀·▪█·█▌██ ██• ██· █▌▐███ •██ ██▪▐█ ▄█▀▄ █▪██▌•██ -▐▀▀▪▄▐█▐█•▐█·██ ▪ ██▪▐█▐▐▌▐█· ▐█.▪██▀▀█▐█▌.▐▌█▌▐█▌ ▐█.▪ -▐█▄▄▌ ███ ▐█▌▐█▌ ▄ ▐█▌██▐█▌▐█▌ ▐█▌·██▌▐▀▐█▌.▐▌▐█▄█▌ ▐█▌· - ▀▀▀ . ▀ ▀▀▀.▀▀▀ ▀▀▀▀ ▀▪▀▀▀ ▀▀▀ ▀▀▀ · ▀█▄▀▪ ▀▀▀ ▀▀▀ - - > welcome x_x -" -fi - export PATH=~/.npm-global/bin:$PATH export NODE_PATH=~/.npm-global/lib/node_modules