feat: move to fish shell
parent
a8ee4fd02d
commit
5098fe48e7
|
@ -1 +0,0 @@
|
|||
/home/radio/projects/guile/radix/files/fish/completions/
|
|
@ -1 +0,0 @@
|
|||
/home/radio/projects/guile/radix/files/fish/conf.d
|
|
@ -1 +0,0 @@
|
|||
/home/radio/projects/guile/radix/files/fish/config.fish
|
|
@ -0,0 +1,3 @@
|
|||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
/home/radio/projects/guile/radix/files/fish/fish_variables
|
|
@ -0,0 +1,31 @@
|
|||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:3400
|
||||
SETUVAR fish_color_autosuggestion:555\x1ebrblack
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:blue
|
||||
SETUVAR fish_color_comment:red
|
||||
SETUVAR fish_color_cwd:green
|
||||
SETUVAR fish_color_cwd_root:red
|
||||
SETUVAR fish_color_end:green
|
||||
SETUVAR fish_color_error:brred
|
||||
SETUVAR fish_color_escape:brcyan
|
||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_host_remote:yellow
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:brcyan
|
||||
SETUVAR fish_color_param:cyan
|
||||
SETUVAR fish_color_quote:yellow
|
||||
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||
SETUVAR fish_pager_color_completion:normal
|
||||
SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
|
||||
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
|
@ -1 +0,0 @@
|
|||
/home/radio/projects/guile/radix/files/fish/functions
|
|
@ -1,3 +0,0 @@
|
|||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
/gnu/store/7cr97ng3k22xxnaq8gjyap67h09gch14-fish-config.fish
|
|
@ -8,7 +8,7 @@
|
|||
(local-file "../../../files/fish/fish_variables"))
|
||||
|
||||
(define functions-greeting
|
||||
(plain-file "../../../files/fish/functions/fish_greeting.fish"))
|
||||
(local-file "../../../files/fish/functions/fish_greeting.fish"))
|
||||
|
||||
(define functions-prompt
|
||||
(local-file "../../../files/fish/functions/fish_prompt.fish"))
|
||||
|
|
117
radio.scm
117
radio.scm
|
@ -3,17 +3,17 @@
|
|||
#|GNU |# (gnu)
|
||||
(gnu home)
|
||||
(gnu home services)
|
||||
#|Guix |# (guix colors)
|
||||
#|Radix|# (radix packages fonts)
|
||||
(radix packages wm)
|
||||
(radix home services)
|
||||
(radix utils)
|
||||
((radix files fish) #:prefix file:fish-)
|
||||
#|SRFI |# (srfi srfi-13)
|
||||
(srfi srfi-26))
|
||||
|
||||
(use-package-modules
|
||||
#|A|# admin
|
||||
#|B|# base bash bittorrent browser-extensions
|
||||
#|B|# base bittorrent browser-extensions
|
||||
#|C|# c calendar
|
||||
#|D|# disk
|
||||
#|E|# emacs emacs-xyz
|
||||
|
@ -23,7 +23,7 @@
|
|||
#|L|# linux
|
||||
#|M|# mail maths mes messaging minetest
|
||||
#|P|# package-management password-utils pdf plotutils pulseaudio python-xyz
|
||||
#|S|# scheme ssh suckless
|
||||
#|S|# scheme shells ssh suckless
|
||||
#|T|# telegram tex text-editors tor toys
|
||||
#|V|# version-control video
|
||||
#|W|# web-browsers wm
|
||||
|
@ -39,88 +39,9 @@
|
|||
(define alarm-clock-job
|
||||
#~(job "30 6 * * *" "mpv --shuffle $XDG_MUSIC_DIR"))
|
||||
|
||||
#|Dotfiles|#
|
||||
(define bash-functions
|
||||
(plain-file "bash_functions"
|
||||
(format #f "~@{~a~%~}"
|
||||
#|Spawn terminal independent applications from the terminal|#
|
||||
"tf() { setsid -f \"$@\" >/dev/null 2>&1 & disown; }"
|
||||
|
||||
#|Make doas work as doas su when runned without arguments alone |#
|
||||
"doas() { [ $# -eq 0 ] && $(which doas) -s || $(which doas) \"$@\"; }"
|
||||
|
||||
#|Use kakoune as manpage reader|#
|
||||
"man() { kak -e \"evaluate-commands man $1\"; }"
|
||||
|
||||
#|Easily send files to the 0x0 pastebin|#
|
||||
"zxz(){ printf \"$1\\n$(curl -F file=@$1 http://0x0.st)\\n\"; }")))
|
||||
|
||||
(define bashrc
|
||||
(plain-file "bashrc"
|
||||
(format #f "~@{~a~%~}"
|
||||
#|Source system-wide file|#
|
||||
"[ -f /etc/bashrc ] && source /etc/bashrc"
|
||||
|
||||
#|Adds `~/.local/bin/ to $PATH|#
|
||||
"export PATH=\"$PATH:$(du $HOME/.local/bin/ \\"
|
||||
" | cut -f2 \\"
|
||||
" | tr '\\n' ':' \\"
|
||||
" | sed 's/:*$//')\""
|
||||
|
||||
"export SHELL"
|
||||
|
||||
#|If not running interactively, source /etc/profile if
|
||||
we are in a ssh session otherwise, don't do anything|#
|
||||
"if [[ $- != *i* ]]; then"
|
||||
" [[ -n \"$SSH_CLIENT\" ]] && source /etc/profile"
|
||||
" return"
|
||||
"fi"
|
||||
|
||||
#|PS1 definition|#
|
||||
(let* ((blue (cut colorize-string <> (color BLUE)))
|
||||
(reset (cut colorize-string <> (color RESET))))
|
||||
(string-append "PS1="
|
||||
"'${GUIX_ENVIRONMENT:+[" (blue "env") " ${GUIX_ENVIRONMENT}]\\n}"
|
||||
(blue "\\u") " at " (blue "\\W") " "
|
||||
"$(git branch &>/dev/null && git branch 2>/dev/null | "
|
||||
"sed -n \"s/* \\(.*\\)/on " (blue "\\1") (reset " /p\")> ") "'"))
|
||||
|
||||
#|Colors for TTY|#
|
||||
(format #f "[ \"$TERM\" = \"linux\" ] && {\\~%~
|
||||
~:{ echo -en \"\\e]P~@(~x~)\"'~a'~%~}~
|
||||
}"
|
||||
(map list (iota 16)
|
||||
`(#|black |# "070707"
|
||||
#|darkred |# "df6760"
|
||||
#|darkgreen |# "8be760"
|
||||
#|brown |# "ffd17a"
|
||||
#|darkblue |# "9688d9"
|
||||
#|darkmagenta|# "86adff"
|
||||
#|darkcyan |# "86adff"
|
||||
#|darkgrey |# "f1f1f1"
|
||||
|
||||
#|lightgrey |# "070707"
|
||||
#|red |# "df6760"
|
||||
#|green |# "8be760"
|
||||
#|brown |# "ffd17a"
|
||||
#|blue |# "9688d9"
|
||||
#|magenta |# "86adff"
|
||||
#|cyan |# "86adff"
|
||||
#|white |# "f1f1f1")))
|
||||
|
||||
#|st window title|#
|
||||
"trap 'printf \"\\033]0;%s\\007\" \"${BASH_COMMAND//[^[:print:]]/}\"' DEBUG")))
|
||||
|
||||
(define bash-profile
|
||||
(plain-file "bash_profile"
|
||||
(format #f "~@{~a~%~}"
|
||||
". \"$GUIX_PROFILE/etc/profile\""
|
||||
"[ \"$(tty)\" = \"/dev/tty1\" ] && sx 1>/dev/null 2>&1")))
|
||||
|
||||
(home-environment
|
||||
(packages
|
||||
(list #|admin |# neofetch
|
||||
#|bash |# bash bash-completion
|
||||
#|bittorrent |# aria2 qbittorrent
|
||||
#|c |# c-intro-and-ref
|
||||
#|calendar |# remind
|
||||
|
@ -174,6 +95,7 @@
|
|||
#|pulseaudio |# pulseaudio pamixer pavucontrol
|
||||
#|python-xyz |# python-ueberzug
|
||||
#|scheme |# sicp slib
|
||||
#|shells |# fish fish-foreign-env
|
||||
#|ssh |# openssh
|
||||
#|suckless |# lukesmithxyz-st
|
||||
#|telegram |# telegram-desktop
|
||||
|
@ -269,15 +191,32 @@
|
|||
"application/pdf"
|
||||
"application/epub+zip"))))))
|
||||
|
||||
; (simple-service 'application-configs home-xdg-configuration-files-service-type
|
||||
; `(("fish/fish_variables" ,file:fish-variables)
|
||||
; ("fish/functions/fish_greeting.fish" ,file:fish-functions-greeting)
|
||||
; ("fish/functions/fish_prompt.fish" ,file:fish-functions-prompt)))
|
||||
|
||||
#|Shepherd service|#
|
||||
(service home-shepherd-service-type)
|
||||
|
||||
#|Shell services|#
|
||||
(service home-bash-service-type
|
||||
(home-bash-configuration
|
||||
(guix-defaults? #f)
|
||||
(bashrc (list bash-functions bashrc))
|
||||
(bash-profile (list bash-profile))
|
||||
(service home-fish-service-type
|
||||
(home-fish-configuration
|
||||
(abbreviations
|
||||
`(#|Download music and videos with based formats|#
|
||||
("m" . "yt-dlp --prefer-free-formats --extract-audio")
|
||||
("v" . "yt-dlp --prefer-free-formats")
|
||||
|
||||
#|Guix related abbreviations|#
|
||||
("!config" . "guix system reconfigure /etc/config.scm")
|
||||
("!home" . "guix home reconfigure $HOME/projects/guile/radix/radio.scm")
|
||||
(":config" . "$EDITOR /etc/config.scm")
|
||||
(":home" . "$EDITOR $HOME/projects/guile/radix/radio.scm")
|
||||
("@radix" . "$HOME/projects/guile/radix")
|
||||
("@system" . "$HOME/projects/guile/radix/modules/radix/services")
|
||||
("@home" . "$HOME/projects/guile/radix/modules/radix/home/services")
|
||||
("@files" . "$HOME/projects/guile/radix/files")))
|
||||
|
||||
(aliases
|
||||
`(#|Common aliases|#
|
||||
("df" . "df -h")
|
||||
|
@ -295,10 +234,6 @@
|
|||
#|Kakoune bindings for info|#
|
||||
("info" . "info --init-file $XDG_CONFIG_HOME/infokeys")
|
||||
|
||||
#|Download music and videos with based formats|#
|
||||
("m" . "yt-dlp --prefer-free-formats --extract-audio")
|
||||
("v" . "yt-dlp --prefer-free-formats")
|
||||
|
||||
#|Easy presentation setup with xrandr|#
|
||||
("present" . ,(format #f "xrandr --output LVDS-1 ~
|
||||
--mode 1366x768 ~
|
||||
|
|
Loading…
Reference in New Issue