Advertisement
poetician

fish.conf | colors not yet set

Dec 10th, 2022
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.30 KB | None | 0 0
  1. ###
  2. # https://fishshell.com/docs/current/index.html
  3. # https://github.com/jorgebucaran/cookbook.fish
  4.  
  5. # themes
  6. # https://github.com/oh-my-fish/oh-my-fish/blob/master/docs/Themes.md
  7.  
  8. # Plugins
  9. # https://github.com/jethrokuan/fzf
  10. # https://github.com/IlanCosman/tide.git - fisher install IlanCosman/tide@v5
  11. # https://github.com/jhillyerd/plugin-git
  12.  
  13. # tools
  14. # https://github.com/jorgebucaran/fisher
  15. # https://github.com/oh-my-fish/oh-my-fish
  16. # https://github.com/danhper/fundle
  17.  
  18. #set VIRTUAL_ENV_DISABLE_PROMPT "1"
  19.  
  20. if not status --is-interactive
  21. exit
  22. end
  23.  
  24. # Load private config
  25. if [ -f $HOME/.config/fish/private.fish ]
  26. source $HOME/.config/fish/private.fish
  27. end
  28.  
  29. # Git
  30. if [ -f $HOME/.config/fish/git.fish ]
  31. source $HOME/.config/fish/git.fish
  32. end
  33.  
  34. # Aliases
  35. if [ -f $HOME/.config/fish/alias.fish ]
  36. source $HOME/.config/fish/alias.fish
  37. end
  38.  
  39. # reload fish config
  40. function reload
  41. exec fish
  42. set -l config (status -f)
  43. echo "reloading: $config"
  44. end
  45.  
  46. # User paths
  47. set -e fish_user_paths
  48. set -U fish_user_paths $HOME/.bin $HOME/.local/bin $HOME/Applications $fish_user_paths
  49.  
  50. # Starship prompt
  51. #if command -sq starship
  52. # starship init fish | source
  53. #end
  54.  
  55. # sets tools
  56. set -x EDITOR nano
  57. set -x VISUAL nano
  58. #set -x TERM alacritty
  59. # Sets the terminal type for proper colors
  60. set TERM "xterm-256color"
  61.  
  62. # Suppresses fish's intro message
  63. set fish_greeting
  64. #function fish_greeting
  65. # fish_logo
  66. #end
  67.  
  68. # Prevent directories names from being shortened
  69. set fish_prompt_pwd_dir_length 0
  70. set -x FZF_DEFAULT_OPTS "--color=16,header:13,info:5,pointer:3,marker:9,spinner:1,prompt:5,fg:7,hl:14,fg+:3,hl+:9 --inline-info --tiebreak=end,length --bind=shift-tab:toggle-down,tab:toggle-up"
  71. # "bat" as manpager
  72. set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
  73. set -g theme_nerd_fonts yes
  74.  
  75.  
  76. if status --is-login
  77. set -gx PATH $PATH ~/.bin
  78. end
  79.  
  80. if status --is-login
  81. set -gx PATH $PATH ~/.local/bin
  82. end
  83.  
  84. if type -q bat
  85. alias cat="bat --paging=never"
  86. end
  87.  
  88. if command -sq fzf && type -q fzf_configure_bindings
  89. fzf_configure_bindings --directory=\ct
  90. end
  91.  
  92. if not set -q -g fish_user_abbreviations
  93. set -gx fish_user_abbreviations
  94. end
  95.  
  96. #if type -f fortune >/dev/null
  97. # set -l fortune "fortune -a"
  98. # if type -f lolcat >/dev/null
  99. # set fortune "$fortune | lolcat"
  100. # end
  101. # eval $fortune
  102. # echo
  103. #end
  104.  
  105. if test tree >/dev/null
  106. function l1; tree --dirsfirst -ChFL 1 $argv; end
  107. function l2; tree --dirsfirst -ChFL 2 $argv; end
  108. function l3; tree --dirsfirst -ChFL 3 $argv; end
  109. function ll1; tree --dirsfirst -ChFupDaL 1 $argv; end
  110. function ll2; tree --dirsfirst -ChFupDaL 2 $argv; end
  111. function ll3; tree --dirsfirst -ChFupDaL 3 $argv; end
  112. end
  113.  
  114. if type -q direnv
  115. eval (direnv hook fish)
  116. end
  117.  
  118.  
  119.  
  120. ### FUNCTIONS ###
  121. # Fish command history
  122. function history
  123. builtin history --show-time='%F %T ' | sort
  124. end
  125.  
  126. # Make a backup file
  127. function backup --argument filename
  128. cp $filename $filename.bak
  129. end
  130.  
  131. # recently installed packages
  132. function ripp --argument length -d "List the last n (100) packages installed"
  133. if test -z $length
  134. set length 100
  135. end
  136. expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n $length | nl
  137. end
  138.  
  139. function gl
  140. git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" $argv | fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` --bind "ctrl-m:execute: echo '{}' | grep -o '[a-f0-9]\{7\}' | head -1 | xargs -I % sh -c 'git show --color=always % | less -R'"
  141. end
  142.  
  143. function ex --description "Extract bundled & compressed files"
  144. if test -f "$argv[1]"
  145. switch $argv[1]
  146. case '*.tar.bz2'
  147. tar xjf $argv[1]
  148. case '*.tar.gz'
  149. tar xzf $argv[1]
  150. case '*.bz2'
  151. bunzip2 $argv[1]
  152. case '*.rar'
  153. unrar $argv[1]
  154. case '*.gz'
  155. gunzip $argv[1]
  156. case '*.tar'
  157. tar xf $argv[1]
  158. case '*.tbz2'
  159. tar xjf $argv[1]
  160. case '*.tgz'
  161. tar xzf $argv[1]
  162. case '*.zip'
  163. unzip $argv[1]
  164. case '*.Z'
  165. uncompress $argv[1]
  166. case '*.7z'
  167. 7z $argv[1]
  168. case '*.deb'
  169. ar $argv[1]
  170. case '*.tar.xz'
  171. tar xf $argv[1]
  172. case '*.tar.zst'
  173. tar xf $argv[1]
  174. case '*'
  175. echo "'$argv[1]' cannot be extracted via ex"
  176. end
  177. else
  178. echo "'$argv[1]' is not a valid file"
  179. end
  180. end
  181.  
  182. function less
  183. command less -R $argv
  184. end
  185.  
  186. function cd
  187. builtin cd $argv; and ls
  188. end
  189.  
  190. ### ALIASES ###
  191.  
  192. #list
  193. alias ls='exa -al --color=always --group-directories-first' # my preferred listing
  194. alias la='exa -a --color=always --group-directories-first' # all files and dirs
  195. alias ll='exa -l --color=always --group-directories-first' # long format
  196. alias lt='exa -aT --color=always --group-directories-first' # tree listing
  197. alias l.='exa -a | egrep "^\."'
  198.  
  199. ## Colorize the grep command output for ease of use (good for log files)##
  200. alias grep='grep --color=auto'
  201. alias egrep='egrep --color=auto'
  202. alias fgrep='fgrep --color=auto'
  203.  
  204. #readable output
  205. alias df='df -h'
  206.  
  207. #pacman unlock
  208. alias unlock="sudo rm /var/lib/pacman/db.lck"
  209. alias rmpacmanlock="sudo rm /var/lib/pacman/db.lck"
  210.  
  211. #arcolinux logout unlock
  212. alias rmlogoutlock="sudo rm /tmp/arcologout.lock"
  213.  
  214. #which graphical card is working
  215. alias whichvga="/usr/local/bin/arcolinux-which-vga"
  216.  
  217. #free
  218. alias free="free -mt"
  219.  
  220. #continue download
  221. alias wget="wget -c"
  222.  
  223. #userlist
  224. alias userlist="cut -d: -f1 /etc/passwd | sort"
  225.  
  226. #merge new settings
  227. alias merge="xrdb -merge ~/.Xresources"
  228.  
  229. # Aliases for software managment
  230.  
  231. # pacman
  232. alias pac='sudo pacman --color auto'
  233. alias up='sudo pacman -Syyu'
  234.  
  235. # paru as aur helper - updates everything
  236. alias pksyua="paru -Syu --noconfirm"
  237. alias pal="paru -Syu --noconfirm"
  238.  
  239. #ps
  240. alias psa="ps auxf"
  241. alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
  242.  
  243. #grub update
  244. alias upgrub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
  245. #grub issue 08/2022
  246. alias install-grub-efi="sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi"
  247.  
  248. #add new fonts
  249. alias upfc='sudo fc-cache -fv'
  250.  
  251. #copy/paste all content of /etc/skel over to home folder - backup of config created - beware
  252. #skel alias has been replaced with a script at /usr/local/bin/skel
  253.  
  254. #backup contents of /etc/skel to hidden backup folder in home/user
  255. alias bupskel='cp -Rf /etc/skel ~/.skel-backup-$(date +%Y.%m.%d-%H.%M.%S)'
  256.  
  257. #copy shell configs
  258. alias cb='cp /etc/skel/.bashrc ~/.bashrc && echo "Copied."'
  259. alias cz='cp /etc/skel/.zshrc ~/.zshrc && exec zsh'
  260. alias cf='cp /etc/skel/.config/fish/config.fish ~/.config/fish/config.fish && echo "Copied."'
  261.  
  262. #switch between bash and zsh
  263. alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
  264. alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'"
  265. alias tofish="sudo chsh $USER -s /bin/fish && echo 'Now log out.'"
  266.  
  267. #switch between lightdm and sddm
  268. alias tolightdm="sudo pacman -S lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings --noconfirm --needed ; sudo systemctl enable lightdm.service -f ; echo 'Lightm is active - reboot now'"
  269. alias tosddm="sudo pacman -S sddm --noconfirm --needed ; sudo systemctl enable sddm.service -f ; echo 'Sddm is active - reboot now'"
  270. alias toly="sudo pacman -S ly --noconfirm --needed ; sudo systemctl enable ly.service -f ; echo 'Ly is active - reboot now'"
  271. alias togdm="sudo pacman -S gdm --noconfirm --needed ; sudo systemctl enable gdm.service -f ; echo 'Gdm is active - reboot now'"
  272. alias tolxdm="sudo pacman -S lxdm --noconfirm --needed ; sudo systemctl enable lxdm.service -f ; echo 'Lxdm is active - reboot now'"
  273.  
  274. # kill commands
  275. # quickly kill conkies
  276. alias kc='killall conky'
  277. # quickly kill polybar
  278. alias kp='killall polybar'
  279. # quickly kill picom
  280. alias kpi='killall picom'
  281.  
  282. #hardware info --short
  283. alias hw="hwinfo --short"
  284.  
  285. #audio check pulseaudio or pipewire
  286. alias audio="pactl info | grep 'Server Name'"
  287.  
  288. #skip integrity check
  289. alias paruskip='paru -S --mflags --skipinteg'
  290.  
  291. #check vulnerabilities microcode
  292. alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*'
  293.  
  294. #get fastest mirrors in your neighborhood
  295. alias mr="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
  296. alias mrd="sudo reflector --latest 30 --number 10 --sort delay --save /etc/pacman.d/mirrorlist"
  297. alias mrs="sudo reflector --latest 30 --number 10 --sort score --save /etc/pacman.d/mirrorlist"
  298. alias mra="sudo reflector --latest 30 --number 10 --sort age --save /etc/pacman.d/mirrorlist"
  299.  
  300. #our experimental - best option for the moment
  301. alias mirrorx="sudo reflector --age 6 --latest 20 --fastest 20 --threads 5 --sort rate --protocol https --save /etc/pacman.d/mirrorlist"
  302. alias mirrorxx="sudo reflector --age 6 --latest 20 --fastest 20 --threads 20 --sort rate --protocol https --save /etc/pacman.d/mirrorlist"
  303. alias ram='rate-mirrors --allow-root --disable-comments arch | sudo tee /etc/pacman.d/mirrorlist'
  304. alias rams='rate-mirrors --allow-root --disable-comments --protocol https arch | sudo tee /etc/pacman.d/mirrorlist'
  305.  
  306. #shopt
  307. #shopt -s autocd # change to named directory
  308. #shopt -s cdspell # autocorrects cd misspellings
  309. #shopt -s cmdhist # save multi-line commands in history as single line
  310. #shopt -s dotglob
  311. #shopt -s histappend # do not overwrite history
  312. #shopt -s expand_aliases # expand aliases
  313.  
  314. #youtube download
  315. alias yta-aac="yt-dlp --extract-audio --audio-format aac "
  316. alias yta-best="yt-dlp --extract-audio --audio-format best "
  317. alias yta-flac="yt-dlp --extract-audio --audio-format flac "
  318. alias yta-mp3="yt-dlp --extract-audio --audio-format mp3 "
  319. alias ytv-best="yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 "
  320.  
  321. #Recent Installed Packages
  322. alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
  323. alias riplong="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -3000 | nl"
  324.  
  325. #iso and version used to install ArcoLinux
  326. alias iso="cat /etc/dev-rel | awk -F '=' '/ISO/ {print $2}'"
  327. alias isoo="cat /etc/dev-rel"
  328.  
  329. #Cleanup orphaned packages
  330. alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
  331.  
  332. #clear
  333. alias clean="clear; seq 1 $(tput cols) | sort -R | sparklines | lolcat"
  334.  
  335. #search content with ripgrep
  336. alias rg="rg --sort path"
  337.  
  338. #get the error messages from journalctl
  339. alias jctl="journalctl -p 3 -xb"
  340.  
  341. #nano for important configuration files
  342. #know what you do in these files
  343. alias nlxdm="sudo $EDITOR /etc/lxdm/lxdm.conf"
  344. alias nlightdm="sudo $EDITOR /etc/lightdm/lightdm.conf"
  345. alias npacman="sudo $EDITOR /etc/pacman.conf"
  346. alias ngrub="sudo $EDITOR /etc/default/grub"
  347. alias nconfgrub="sudo $EDITOR /boot/grub/grub.cfg"
  348. alias nmkinitcpio="sudo $EDITOR /etc/mkinitcpio.conf"
  349. alias nmirrorlist="sudo $EDITOR /etc/pacman.d/mirrorlist"
  350. alias narcomirrorlist="sudo $EDITOR /etc/pacman.d/arcolinux-mirrorlist"
  351. alias nsddm="sudo $EDITOR /etc/sddm.conf"
  352. alias nsddmk="sudo $EDITOR /etc/sddm.conf.d/kde_settings.conf"
  353. alias nfstab="sudo $EDITOR /etc/fstab"
  354. alias nnsswitch="sudo $EDITOR /etc/nsswitch.conf"
  355. alias nsamba="sudo $EDITOR /etc/samba/smb.conf"
  356. alias ngnupgconf="sudo $EDITOR /etc/pacman.d/gnupg/gpg.conf"
  357. alias nhosts="sudo $EDITOR /etc/hosts"
  358. alias nhostname="sudo $EDITOR /etc/hostname"
  359. alias nb="$EDITOR ~/.bashrc"
  360. alias nz="$EDITOR ~/.zshrc"
  361. alias nf="$EDITOR ~/.config/fish/config.fish"
  362. alias nneofetch="$EDITOR ~/.config/neofetch/config.conf"
  363.  
  364. #reading logs with bat
  365. alias lcalamares="bat /var/log/Calamares.log"
  366. alias lpacman="bat /var/log/pacman.log"
  367. alias lxorg="bat /var/log/Xorg.0.log"
  368. alias lxorgo="bat /var/log/Xorg.0.log.old"
  369.  
  370. #gpg
  371. #verify signature for isos
  372. alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
  373. alias fix-gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
  374. #receive the key of a developer
  375. alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
  376. alias fix-gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
  377. alias fix-keyserver="[ -d ~/.gnupg ] || mkdir ~/.gnupg ; cp /etc/pacman.d/gnupg/gpg.conf ~/.gnupg/ ; echo 'done'"
  378.  
  379. #fixes
  380. alias fix-perms="sudo chown -R $USER:$USER ~/.config ~/.local"
  381. alias keyfix="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys"
  382. alias key-fix="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys"
  383. alias keys-fix="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys"
  384. alias fixkey="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys"
  385. alias fixkeys="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys"
  386. alias fix-key="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys"
  387. alias fix-keys="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys"
  388. alias fix-pacman-conf="/usr/local/bin/arcolinux-fix-pacman-conf"
  389. alias fix-pacman-keyserver="/usr/local/bin/arcolinux-fix-pacman-gpg-conf"
  390.  
  391. #maintenance
  392. alias big="expac -H M '%m\t%n' | sort -h | nl"
  393. alias dgrada="sudo downgrade --ala-url https://ant.seedhost.eu/arcolinux/"
  394.  
  395. #hblock (stop tracking with hblock)
  396. #use unhblock to stop using hblock
  397. alias unhblock="hblock -S none -D none"
  398.  
  399. #systeminfo
  400. alias probe="sudo -E hw-probe -all -upload"
  401. alias sysfailed="systemctl list-units --failed"
  402.  
  403. #shutdown or reboot
  404. alias ssn="sudo shutdown now"
  405. alias sr="sudo reboot"
  406.  
  407. #update betterlockscreen images
  408. alias bls="betterlockscreen -u /usr/share/backgrounds/arcolinux/"
  409.  
  410. #give the list of all installed desktops - xsessions desktops
  411. alias xd="ls /usr/share/xsessions"
  412. alias xdw="ls /usr/share/wayland-sessions"
  413.  
  414. #wayland aliases
  415. alias wsimplescreenrecorder="wf-recorder -a"
  416.  
  417. #btrfs aliases
  418. alias btrfsfs="sudo btrfs filesystem df /"
  419. alias btrfsli="sudo btrfs su li / -t"
  420.  
  421. #snapper aliases
  422. alias snapcroot="sudo snapper -c root create-config /"
  423. alias snapchome="sudo snapper -c home create-config /home"
  424. alias snapli="sudo snapper list"
  425. alias snapcr="sudo snapper -c root create"
  426. alias snapch="sudo snapper -c home create"
  427.  
  428. #Leftwm aliases
  429. alias lti="leftwm-theme install"
  430. alias ltu="leftwm-theme uninstall"
  431. alias lta="leftwm-theme apply"
  432. alias ltupd="leftwm-theme update"
  433. alias ltupg="leftwm-theme upgrade"
  434.  
  435. #arcolinux applications
  436. #att is a symbolic link now
  437. #alias att="archlinux-tweak-tool"
  438. alias adt="arcolinux-desktop-trasher"
  439. alias abl="arcolinux-betterlockscreen"
  440. alias agm="arcolinux-get-mirrors"
  441. alias amr="arcolinux-mirrorlist-rank-info"
  442. alias aom="arcolinux-osbeck-as-mirror"
  443. alias ars="arcolinux-reflector-simple"
  444. alias atm="arcolinux-tellme"
  445. alias avs="arcolinux-vbox-share"
  446. alias awa="arcolinux-welcome-app"
  447.  
  448. #remove
  449. alias rmgitcache="rm -r ~/.cache/git"
  450.  
  451. #moving your personal files and folders from /personal to ~
  452. function personal
  453. cp -rf /personal/ ~
  454. cp -rf /personal/.* ~
  455. end
  456.  
  457. # git
  458. # using plugin
  459. # omf install https://github.com/jhillyerd/plugin-git
  460. alias undopush "git push -f origin HEAD^:master"
  461.  
  462. # reporting tools - install when not installed
  463.  
  464. #neofetch
  465. #screenfetch
  466. #alsi
  467. #paleofetch
  468. #fetch
  469. #hfetch
  470. #sfetch
  471. #ufetch
  472. #ufetch-arco
  473. #pfetch
  474. #sysinfo
  475. #sysinfo-retro
  476. #cpufetch
  477. colorscript random
  478.  
  479. # colors to set or unset
  480.  
  481. #set fish_color_autosuggestion "#969896"
  482. #set fish_color_cancel -r
  483. #set fish_color_command "#0782DE"
  484. #set fish_color_comment "#f0c674"
  485. #set fish_color_cwd "#008000"
  486. #set fish_color_cwd_root red
  487. #set fish_color_end "#b294bb"
  488. #set fish_color_error "#fb4934"
  489. #set fish_color_escape "#fe8019"
  490. #set fish_color_history_current --bold
  491. #set fish_color_host "#85AD82"
  492. #set fish_color_host_remote yellow
  493. #set fish_color_match --background=brblue
  494. #set fish_color_normal normal
  495. #set fish_color_operator "#fe8019"
  496. #set fish_color_param "#81a2be"
  497. #set fish_color_quote "#b8bb26"
  498. #set fish_color_redirection "#d3869b"
  499. #set fish_color_search_match bryellow background=brblack
  500. #set fish_color_selection white --bold background=brblack
  501. #set fish_color_status red
  502. #set fish_color_user brgreen
  503. #set fish_color_valid_path --underline
  504. #set fish_pager_color_completion normal
  505. #set fish_pager_color_description "#B3A06D" yellow
  506. #set fish_pager_color_prefix normal --bold underline
  507. #set fish_pager_color_prefix white --bold --underline
  508. #set fish_pager_color_progress brwhite --background=cyan
  509. #set fish_color_search_match --background="#60AEFF"
  510.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement