[del] Remove ZSH and Add some nvim plugins

This commit is contained in:
Uttarayan Mondal
2024-03-03 12:55:20 +05:30
parent 567fe38ac0
commit 42bf0bb237
14 changed files with 166 additions and 703 deletions

View File

@@ -3,7 +3,8 @@ let
start-tmux = (import ../scripts/start-tmux.nix) pkgs; start-tmux = (import ../scripts/start-tmux.nix) pkgs;
# https://mipmip.github.io/home-manager-option-search/ # https://mipmip.github.io/home-manager-option-search/
lazy = false; lazy = false;
in { in
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./tmux.nix ./tmux.nix
@@ -21,7 +22,7 @@ in {
jq jq
tldr tldr
spotify-player spotify-player
htop-vim bottom
qmk qmk
nodejs nodejs
nix-index nix-index
@@ -144,12 +145,14 @@ in {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
enableNushellIntegration = true; enableNushellIntegration = true;
settings = let flavour = "mocha"; # Replace with your preferred palette settings =
let flavour = "mocha"; # Replace with your preferred palette
in { in {
# Other config here # Other config here
format = "$all"; # Remove this line to disable the default prompt format format = "$all"; # Remove this line to disable the default prompt format
palette = "catppuccin_${flavour}"; palette = "catppuccin_${flavour}";
} // builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub { } // builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin"; owner = "catppuccin";
repo = "starship"; repo = "starship";
rev = "main"; # Replace with the latest commit hash rev = "main"; # Replace with the latest commit hash
@@ -182,7 +185,8 @@ in {
enable = true; enable = true;
config = { theme = "catppuccin"; }; config = { theme = "catppuccin"; };
themes = { themes = {
catppuccin = let flavor = "mocha"; catppuccin =
let flavor = "mocha";
in { in {
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
@@ -195,6 +199,14 @@ in {
}; };
}; };
rbw = {
enable = true;
settings = {
email = "uttarayan21@gmail.com";
base_url = "https://pass.uttarayan.me";
pinenttry = if device.isMac then pkgs.pinentry_mac else pkgs.pinentry-qt;
};
};
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
home-manager = { enable = true; }; home-manager = { enable = true; };
}; };
@@ -204,7 +216,8 @@ in {
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
username = device.user; username = device.user;
homeDirectory = if device.isMac then homeDirectory =
if device.isMac then
lib.mkForce "/Users/${device.user}" lib.mkForce "/Users/${device.user}"
else else
lib.mkForce "/home/${device.user}"; lib.mkForce "/home/${device.user}";

View File

@@ -21,14 +21,18 @@
undofile = true; undofile = true;
}; };
globals = { mapleader = " "; }; globals = {
mapleader = " ";
};
plugins = { plugins = {
lspconfig = { lspconfig = {
enable = true; enable = true;
servers = { servers = {
nil = { nil = {
enable = true; enable = true;
extraConfig = '' extraConfig =
/* lua */
''
settings = { settings = {
['nil'] = { ['nil'] = {
formatting = { formatting = {
@@ -48,7 +52,9 @@
html.enable = true; html.enable = true;
# rust-analyzer.enable = true; # rust-analyzer.enable = true;
}; };
extraLua.pre = '' extraLua.pre =
/* lua */
''
local lsp_zero = require'lsp-zero' local lsp_zero = require'lsp-zero'
local lspconfig = require 'lspconfig' local lspconfig = require 'lspconfig'
lsp_zero.on_attach(function(client, bufnr) lsp_zero.on_attach(function(client, bufnr)
@@ -65,16 +71,32 @@
nvim-dap.enable = true; nvim-dap.enable = true;
todo-comments.enable = true; todo-comments.enable = true;
lualine.enable = true; lualine = {
enable = true;
};
commentary.enable = true; commentary.enable = true;
surround.enable = true; surround.enable = true;
which-key.enable = true; which-key.enable = true;
ufo.enable = true; ufo.enable = true;
fugitive.enable = true; fugitive.enable = true;
markdown-preview = {
enable = true;
autoStart = true;
};
ts-context-commentstring.enable = true;
treesitter = { treesitter = {
enable = true; enable = true;
indent = true; indent = true;
folding = true;
refactor = {
smartRename = {
enable = true;
keymaps = {
smartRename = "<leader>rn";
};
};
};
}; };
mini = { mini = {
@@ -148,6 +170,7 @@
noice-nvim noice-nvim
nvim-web-devicons nvim-web-devicons
]; ];
extraConfigLua = builtins.readFile ./extraConfig.lua; extraConfigLua = builtins.readFile ./extraConfig.lua;
package = pkgs.neovim-nightly; package = pkgs.neovim-nightly;

View File

@@ -133,3 +133,4 @@ require("noice").setup({
lsp_doc_border = true, -- add a border to hover docs and signature help lsp_doc_border = true, -- add a border to hover docs and signature help
}, },
}) })

View File

@@ -9,7 +9,8 @@ let
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch" tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
fi fi
''; '';
in { in
{
programs.tmux = { programs.tmux = {
enable = true; enable = true;
shell = "${pkgs.nushellFull}/bin/nu"; shell = "${pkgs.nushellFull}/bin/nu";
@@ -26,26 +27,32 @@ in {
} }
{ {
plugin = tmuxPlugins.catppuccin; plugin = tmuxPlugins.catppuccin;
extraConfig = '' extraConfig =
/* tmux */
''
set -g @catppuccin_flavour 'mocha' set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_default_text '''''' set -g @catppuccin_window_default_text ''''''
''; '';
} }
{ {
plugin = tmuxPlugins.battery; plugin = tmuxPlugins.battery;
extraConfig = '' extraConfig =
/* tmux */
''
set -g @catppuccin_status_modules_right "battery application session date_time" set -g @catppuccin_status_modules_right "battery application session date_time"
''; '';
} }
]; ];
extraConfig = '' extraConfig =
/* tmux */
''
set -gw mode-keys vi set -gw mode-keys vi
set -g status-keys vi set -g status-keys vi
set -g allow-passthrough on set -g allow-passthrough on
set -ga update-environment TERM set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM set -ga update-environment TERM_PROGRAM
set-option -sg escape-time 10 set -sg escape-time 10
set-option -sa terminal-features ',xterm-256color:RGB' set -sa terminal-features ',wezterm:RGB'

View File

@@ -1,49 +1,17 @@
{ pkgs, ... }: { { pkgs, ... }: {
programs.wezterm = { programs.wezterm = {
enable = true; enable = true;
extraConfig = '' extraConfig = /* lua */
''
local wezterm = require 'wezterm'; local wezterm = require 'wezterm';
return { return {
-- -- font = wezterm.font("Hasklug Nerd Font Mono", { weight = "Regular", stretch = "Normal", style = "Normal" }), term = "wezterm",
-- font = wezterm.font_with_fallback({ font = wezterm.font_with_fallback({
-- "Hasklig", "Hasklig",
-- "Symbols Nerd Font Mono" "Symbols Nerd Font Mono"
-- }), }),
color_scheme = "Catppuccin Mocha", color_scheme = "Catppuccin Mocha",
font_size = 16, font_size = 16,
-- colors = {
-- -- The default text color
-- foreground = "#f8f8f2",
-- -- The default background color
-- -- background = "#282a36",
-- -- Overrides the cell background color when the current cell is occupied by the
-- -- cursor and the cursor style is set to Block
-- cursor_bg = "#f8f8f2",
-- -- Overrides the text color when the current cell is occupied by the cursor
-- cursor_fg = "#000",
-- -- Specifies the border color of the cursor when the cursor style is set to Block,
-- -- or the color of the vertical or horizontal bar when the cursor style is set to
-- -- Bar or Underline.
-- cursor_border = "#52ad70",
-- -- the foreground color of selected text
-- selection_fg = "#ffffff",
-- -- the background color of selected text
-- selection_bg = "#ffffff",
-- -- The color of the scrollbar "thumb"; the portion that represents the current viewport
-- scrollbar_thumb = "#222222",
-- -- The color of the split lines between panes
-- split = "#444444",
-- ansi = { "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2" },
-- brights = { "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff" },
-- -- Arbitrary colors of the palette in the range from 16 to 255
-- indexed = { [136] = "#af8700" },
-- -- Since: nightly builds only
-- -- When the IME, a dead key or a leader key are being processed and are effectively
-- -- holding input pending the result of input composition, change the cursor
-- -- to this color to give a visual cue about the compose state.
-- compose_cursor = "orange",
-- },
initial_cols = 120, initial_cols = 120,
hide_tab_bar_if_only_one_tab = true, hide_tab_bar_if_only_one_tab = true,
window_background_opacity = 0.8, window_background_opacity = 0.8,

View File

@@ -15,7 +15,22 @@
package = pkgs.nix; package = pkgs.nix;
}; };
security.pam.enableSudoTouchIdAuth = true; # security.pam.enableSudoTouchIdAuth = true;
system.patches = [
(pkgs.writeText "pam-reattach.patch"
/* diff */
''
new file mode 100644
index 0000000..e4293c0
--- /dev/null
+++ b/etc/pam.d/sudo_local
@@ -0,0 +1,3 @@
+# sudo_local: local config file which survives system update and is included for sudo
+# uncomment following line to enable Touch ID for sudo
+auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so
'')
];
programs.bash.enable = true; programs.bash.enable = true;
programs.zsh.enable = true; programs.zsh.enable = true;
@@ -40,87 +55,3 @@
} }
]; ];
} }
# {
# description = "Example Darwin system flake";
# inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# # home-manager.url = "github:nix-community/home-manager/master";
# # home-manager.inputs.nixpkgs.follows = "nixpkgs";
# nix-darwin.url = "github:LnL7/nix-darwin";
# nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
# };
# outputs = inputs @ {
# self,
# nix-darwin,
# nixpkgs,
# }: let
# configuration = {pkgs, ...}: {
# # List packages installed in system profile. To search by name, run:
# # $ nix-env -qaP | grep wget
# environment.systemPackages = with pkgs; [
# neovim
# bat
# ripgrep
# fd
# fish
# nushellFull
# tmux
# wezterm
# # yabai
# nerdfonts
# ];
# # Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true;
# # nix.package = pkgs.nix;
# # Necessary for using flakes on this system.
# nix = {
# settings = {
# experimental-features = "nix-command flakes repl-flake";
# max-jobs = 8;
# };
# extraOptions = ''
# build-users-group = nixbld
# extra-nix-path = nixpkgs=flake:nixpkgs
# '';
# # keep-outputs = true
# # keep-derivations = true
# };
# # Create /etc/zshrc that loads the nix-darwin environment.
# # programs.zsh.enable = true; # default shell on catalina
# # programs.fish.enable = true;
# # Set Git commit hash for darwin-version.
# system.configurationRevision = self.rev or self.dirtyRev or null;
# system.keyboard.enableKeyMapping = true;
# system.keyboard.remapCapsLockToControl = true;
# system.keyboard.swapLeftCommandAndLeftAlt = true;
# system.keyboard.userKeyMapping = {
# # Right Command to Option
# HIDKeyboardModifierMappingSrc = 30064771303;
# HIDKeyboardModifierMappingDst = 30064771302;
# # Right Option to command
# HIDKeyboardModifierMappingSrc = 30064771302;
# HIDKeyboardModifierMappingDst = 30064771303;
# };
# fonts.fonts = [(pkgs.nerdfonts.override {fonts = ["Hasklig" "Hack"];})];
# system.defaults.finder.AppleShowAllExtensions = true;
# system.defaults.dock.autohide = true;
# # Used for backwards compatibility, please read the changelog before changing.
# # $ darwin-rebuild changelog
# system.stateVersion = 4;
# # The platform the configuration will be used on.
# nixpkgs.hostPlatform = "aarch64-darwin";
# nix.package = pkgs.nix;
# };
# in {
# # Build darwin flake using:
# # $ darwin-rebuild build --flake .#simple
# darwinConfigurations.Uttarayans-MacBook-Pro = nix-darwin.lib.darwinSystem {
# # system = "aarch64-darwin";
# pkgs = import nixpkgs {system = "aarch64-darwin";};
# modules = [configuration];
# };
# # Expose the package set, including overlays, for convenience.
# # darwinPackages = self.darwinConfigurations.Uttarayans-MacBook-Pro.pkgs;
# };
# }

View File

@@ -1,16 +1,11 @@
{ ... }: { { pkgs, ... }: {
services = { services = {
skhd = { skhd = {
enable = true; enable = true;
skhdConfig = '' skhdConfig = ''
# open terminal, blazingly fast compared to iTerm/Hyper # open terminal, blazingly fast compared to iTerm/Hyper
# alt - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~ alt - return : ${pkgs.wezterm}/bin/wezterm-gui
alt - return : /Applications/WezTerm.app/Contents/MacOS/wezterm
shift + alt - return: pkill mpv shift + alt - return: pkill mpv
# alt + \ : pkill mpv
# open qutebrowser
# alt + shift - return : ~/Scripts/qtb.sh
# open mpv # open mpv
alt - m : open -na /Applications/mpv.app $(pbpaste) alt - m : open -na /Applications/mpv.app $(pbpaste)

View File

@@ -1,190 +0,0 @@
abbr -g ...="../.."
abbr -g ....="../../.."
abbr -g .....="../../../.."
abbr -g ......="../../../../.."
abbr -g grep="rg"
abbr -="cd -"
abbr _="sudo "
abbr 1="cd -"
abbr 2="cd -2"
abbr 3="cd -3"
abbr 4="cd -4"
abbr 5="cd -5"
abbr 6="cd -6"
abbr 7="cd -7"
abbr 8="cd -8"
abbr 9="cd -9"
abbr afind="ack -il"
abbr cat="bat"
abbr cd="z"
abbr g="git"
abbr ga="git add"
abbr gaa="git add --all"
abbr gap="git apply"
abbr gapa="git add --patch"
abbr gau="git add --update"
abbr gav="git add --verbose"
abbr gb="git branch"
abbr gba="git branch -a"
abbr gbD="git branch -D"
abbr gbd="git branch -d"
abbr gbda="git branch --no-color --merged | command grep -vE \"^(\+|\*|\s*(master|develop|dev)\s*\$)\" | command xargs -n 1 git branch -d"
abbr gbl="git blame -b -w"
abbr gbnm="git branch --no-merged"
abbr gbr="git branch --remote"
abbr gbs="git bisect"
abbr gbsb="git bisect bad"
abbr gbsg="git bisect good"
abbr gbsr="git bisect reset"
abbr gbss="git bisect start"
abbr 'gc!'="git commit -v --amend"
abbr gc="git commit -v"
abbr 'gca!'="git commit -v -a --amend"
abbr gca="git commit -v -a"
abbr gcam="git commit -a -m"
abbr 'gcan!'="git commit -v -a --no-edit --amend"
abbr 'gcans!'="git commit -v -a -s --no-edit --amend"
abbr gcb="git checkout -b"
abbr gcd="git checkout develop"
abbr gcf="git config --list"
abbr gcl="git clone --recurse-submodules"
abbr gclean="git clean -id"
abbr gcm="git checkout master"
abbr gcmsg="git commit -m"
abbr 'gcn!'="git commit -v --no-edit --amend"
abbr gco="git checkout"
abbr gcount="git shortlog -sn"
abbr gcp="git cherry-pick"
abbr gcpa="git cherry-pick --abort"
abbr gcpc="git cherry-pick --continue"
abbr gcs="git commit -S"
abbr gcsm="git commit -s -m"
abbr gd="git diff"
abbr gdca="git diff --cached"
abbr gdct="git describe --tags \$(git rev-list --tags --max-count=1)"
abbr gdcw="git diff --cached --word-diff"
abbr gds="git diff --staged"
abbr gdt="git diff-tree --no-commit-id --name-only -r"
abbr gdw="git diff --word-diff"
abbr gf="git fetch"
abbr gfa="git fetch --all --prune"
abbr gfg="git ls-files | grep"
abbr gfo="git fetch origin"
abbr gg="git gui citool"
abbr gga="git gui citool --amend"
abbr ggpull="git pull origin \"\$(git_current_branch)\""
abbr ggpur="ggu"
abbr ggpush="git push origin \"\$(git_current_branch)\""
abbr ggsup="git branch --set-upstream-to=origin/\$(git_current_branch)"
abbr ghh="git help"
abbr gignore="git update-index --assume-unchanged"
abbr gignored="git ls-files -v | grep \"^[[:lower:]]\""
abbr git-svn-dcommit-push="git svn dcommit && git push github master:svntrunk"
abbr gk="\gitk --all --branches"
abbr gke="\gitk --all \$(git log -g --pretty=%h)"
abbr gl="git pull"
abbr glg="git log --stat"
abbr glgg="git log --graph"
abbr glgga="git log --graph --decorate --all"
abbr glgm="git log --graph --max-count=10"
abbr glgp="git log --stat -p"
abbr glo="git log --oneline --decorate"
abbr globurl="noglob urlglobber "
abbr glod="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'"
abbr glods="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short"
abbr glog="git log --oneline --decorate --graph"
abbr gloga="git log --oneline --decorate --graph --all"
abbr glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
abbr glola="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all"
abbr glols="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat"
abbr glp="_git_log_prettily"
abbr glum="git pull upstream master"
abbr gm="git merge"
abbr gma="git merge --abort"
abbr gmom="git merge origin/master"
abbr gmt="git mergetool --no-prompt"
abbr gmtvim="git mergetool --no-prompt --tool=vimdiff"
abbr gmum="git merge upstream/master"
abbr gp="git push"
abbr gpd="git push --dry-run"
abbr 'gpf!'="git push --force"
abbr gpf="git push --force-with-lease"
abbr gpoat="git push origin --all && git push origin --tags"
abbr gpristine="git reset --hard && git clean -dffx"
abbr gpsup="git push --set-upstream origin \$(git_current_branch)"
abbr gpu="git push upstream"
abbr gpv="git push -v"
abbr gr="git remote"
abbr gra="git remote add"
abbr grb="git rebase"
abbr grba="git rebase --abort"
abbr grbc="git rebase --continue"
abbr grbd="git rebase develop"
abbr grbi="git rebase -i"
abbr grbm="git rebase master"
abbr grbs="git rebase --skip"
abbr grev="git revert"
abbr grh="git reset"
abbr grhh="git reset --hard"
abbr grm="git rm"
abbr grmc="git rm --cached"
abbr grmv="git remote rename"
abbr groh="git reset origin/\$(git_current_branch) --hard"
abbr grrm="git remote remove"
abbr grs="git restore"
abbr grset="git remote set-url"
abbr grss="git restore --source"
abbr grt="cd \"\$(git rev-parse --show-toplevel || echo .)\""
abbr gru="git reset --"
abbr grup="git remote update"
abbr grv="git remote -v"
abbr gs="git status"
abbr gsb="git status -sb"
abbr gsd="git svn dcommit"
abbr gsh="git show"
abbr gsi="git submodule init"
abbr gsps="git show --pretty=short --show-signature"
abbr gsr="git svn rebase"
abbr gss="git status -s"
abbr gst="git status"
abbr gsta="git stash push"
abbr gstaa="git stash apply"
abbr gstall="git stash --all"
abbr gstc="git stash clear"
abbr gstd="git stash drop"
abbr gstl="git stash list"
abbr gstp="git stash pop"
abbr gsts="git stash show --text"
abbr gstu="git stash --include-untracked"
abbr gsu="git submodule update"
abbr gsw="git switch"
abbr gswc="git switch -c"
abbr gtl="gtl(){ git tag --sort=-v:refname -n -l \"\${1}*\" }; noglob gtl"
abbr gts="git tag -s"
abbr gtv="git tag | sort -V"
abbr gunignore="git update-index --no-assume-unchanged"
abbr gunwip="git log -n 1 | grep -q -c \"\-\-wip\-\-\" && git reset HEAD~1"
abbr gup="git pull --rebase"
abbr gupa="git pull --rebase --autostash"
abbr gupav="git pull --rebase --autostash -v"
abbr gupv="git pull --rebase -v"
abbr gwch="git whatchanged -p --abbrev-commit --pretty=medium"
abbr gwip="git add -A; git rm \$(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m \"--wip-- [skip ci]\""
abbr history="omz_history"
abbr l="exa -al"
abbr ls="exa"
abbr md="mkdir -p"
abbr mutt="neomutt"
abbr o="xdg-open"
abbr rpc="patch -p0 < ~/.local/share/console.diff"
abbr s="source venv/bin/activate"
abbr t="~/.config/tmux/start-tmux"
abbr vbspwm="v ~/.config/bspwm/bspwmrc"
abbr vc="v ~/.config/nvim/init.vim"
abbr vt="v ~/.config/tmux/tmux.conf"
abbr wget="curl -O"
abbr which-command="whence"
abbr za="zoxide add"
abbr zi="z -i"
abbr zq="zoxide query"
abbr zr="zoxide remove"

View File

@@ -1,36 +0,0 @@
alias ll='exa -al'
alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml'
alias gdb='gdb -nh -x "$XDG_CONFIG_HOME"/gdb/init'
alias nv=nvim
alias v=nvim
alias m=neomutt
alias n=notmuch
alias dotfiles='/usr/bin/git --git-dir=$XDG_DATA_HOME/dotfiles/ --work-tree=$HOME'
alias yarn="yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/yarnrc"
function z() {
builtin cd "$@"
if [[ -z "$VIRTUAL_ENV" ]] ; then
## If env folder is found then activate the vitualenv
if [[ -d ./venv ]] ; then
source ./venv/bin/activate
fi
else
## check the current folder belong to earlier VIRTUAL_ENV folder
# if yes then do nothing
# else deactivate
parentdir="$(dirname "$VIRTUAL_ENV")"
if [[ "$PWD"/ != "$parentdir"/* ]] ; then
deactivate
fi
fi
}
man() {
page=$(/usr/bin/man "$@" | \
col -b)
if ! [ -z "$page" ];then
echo $page | nvim -R -c 'set ft=man nomod nolist' -
fi
}

View File

@@ -1,56 +0,0 @@
# GTK
export GTK_RC_FILES="$XDG_CONFIG_HOME"/gtk-1.0/gtkrc
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
# Notmuch
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc
export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug
# Less
export LESSKEY="$XDG_CONFIG_HOME"/less/lesskey
export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
# Rust
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
export CARGO_HOME="$XDG_DATA_HOME"/cargo
# Android
export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android
export ADB_VENDOR_KEY="$XDG_CONFIG_HOME"/android
export ANDROID_PREFS_ROOT="$XDG_CONFIG_HOME"/android
export ADB_KEYS_PATH="$ANDROID_PREFS_ROOT"
export ANDROID_EMULATOR_HOME="$XDG_DATA_HOME"/android/emulator
# Node
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
export npm_config_prefix=$XDG_DATA_HOME/node_modules
# Wine
export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default
# Java
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
# Python
export PYLINTHOME="$XDG_CACHE_HOME"/pylint
export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/startup.py
# export XAUTHORITY="$XDG_RUNTIME_DIR"/xauthority
export gnome_user_dir="$XDG_CONFIG_HOME"/gnome/apps
# LaTeX
export TEXMFHOME=$XDG_DATA_HOME/texmf
export TEXMFVAR=$XDG_CACHE_HOME/texlive/texmf-var
export TEXMFCONFIG=$XDG_CONFIG_HOME/texlive/texmf-config
# Ruby gems
export GEM_HOME="$XDG_DATA_HOME"/gem
export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
# Pass
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
# GPG
export GPG_TTY=$(tty)

View File

@@ -1,190 +0,0 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
ZSH=/usr/share/oh-my-zsh/
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="spaceship"
SPACESHIP_USER_SHOW="always"
SPACESHIP_EXIT_CODE_SHOW="true"
SPACESHIP_EXIT_CODE_SYMBOL="✘ "
SPACESHIP_DIR_TRUNC="0"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
ZSH_CUSTOM=~/.config/zsh
HISTFILE="$XDG_CACHE_HOME"/zsh/history
ZSH_COMPDUMP=$XDG_CACHE_HOME/zsh/zshcomdump
setopt HIST_IGNORE_SPACE
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(zsh-autosuggestions zsh-syntax-highlighting zsh-vim-mode zsh-abbr histblock)
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
eval $(systemctl --user show-environment | grep SSH_AUTH_SOCK)
export SSH_AUTH_SOCK
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
export PATH="$PATH:/home/fs0c131y/.local/bin:/home/fs0c131y/.local/share/gem/bin:/home/fs0c131y/.local/share/node_modules/bin:/home/fs0c131y/.local/share/cargo/bin"
#if ! pgrep -u "$USER" ssh-agent > /dev/null; then
# ssh-agent > ~/.ssh-agent-thing
#fi
#if [[ ! "$SSH_AUTH_SOCK" ]]; then
# eval "$(<~/.ssh-agent-thing)"
#fi
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# alias ll='exa -al'
#alias tmux='tmux -f ~/.config/tmux/tmux.conf'
source $ZSH_CUSTOM/env
# zoxide
eval "$(zoxide init zsh)"
# use fs insread of find
export FZF_DEFAULT_COMMAND='fd --type f'
ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
if [[ ! -d $ZSH_CACHE_DIR ]]; then
mkdir $ZSH_CACHE_DIR
fi
# eval $(dircolors -p | sed -e 's/DIR 01;34/DIR 01;36/' | dircolors /dev/stdin)
topp() (
$* &>/dev/null &
pid="$!"
trap ':' INT
echo 'CPU MEM'
while sleep 1; do ps --no-headers -o '%cpu,%mem' -p "$pid"; done
kill "$pid"
)
# function cd() {
# builtin cd "$@"
# if [[ -z "$VIRTUAL_ENV" ]] ; then
# ## If env folder is found then activate the vitualenv
# if [[ -d ./venv ]] ; then
# source ./venv/bin/activate
# fi
# else
# ## check the current folder belong to earlier VIRTUAL_ENV folder
# # if yes then do nothing
# # else deactivate
# parentdir="$(dirname "$VIRTUAL_ENV")"
# if [[ "$PWD"/ != "$parentdir"/* ]] ; then
# deactivate
# fi
# fi
# }
function fmpc() {
local song_position
song_position=$(mpc -f "%position%) %artist% - %title%" playlist | \
fzf-tmux --query="$1" --reverse --select-1 --exit-0 | \
sed -n 's/^\([0-9]\+\)).*/\1/p') || return 1
[ -n "$song_position" ] && mpc -q play $song_position
}
# source /usr/share/doc/pkgfile/command-not-found.zsh
source $ZSH/oh-my-zsh.sh
# # start x if not already started
# if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
# exec startx
# elif [[ ! $TERM =~ screen ]]; then
# ~/.config/tmux/start-tmux
# fi
#
source $ZSH_CUSTOM/aliases
PATH="/home/fs0c131y/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/fs0c131y/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/fs0c131y/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/fs0c131y/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/fs0c131y/perl5"; export PERL_MM_OPT;