This commit is contained in:
olari
2019-04-13 22:37:21 +03:00
commit 245918d30f
16 changed files with 222 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
function fish_prompt --description 'Write out the prompt, prepending the Debian chroot environment if present'
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
if not set -q __fish_prompt_chroot_env
set -g __fish_prompt_chroot_env (set_color yellow)
end
# Set variable identifying the chroot you work in (used in the prompt below)
if not set -q debian_chroot
and test -r /etc/debian_chroot
set debian_chroot (cat /etc/debian_chroot)
end
if not set -q __fish_debian_chroot_prompt
and set -q debian_chroot
and test -n "$debian_chroot"
set -g __fish_debian_chroot_prompt "($debian_chroot)"
end
# Prepend the chroot environment if present
if set -q __fish_debian_chroot_prompt
echo -n -s "$__fish_prompt_chroot_env" "$__fish_debian_chroot_prompt" "$__fish_prompt_normal" ' '
end
switch "$USER"
case root toor
if not set -q __fish_prompt_cwd
if set -q fish_color_cwd_root
set -g __fish_prompt_cwd (set_color $fish_color_cwd_root)
else
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
end
end
echo -n -s "$USER" @ (prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '# '
case '*'
if not set -q __fish_prompt_cwd
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
end
echo -n -s "$USER" @ (prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '> '
end
end

View File

@@ -0,0 +1,4 @@
# Defined in - @ line 1
function installed_packages --description 'alias installed_packages=pacman -Qeq | sort > /var/tmp/pcmntmp1; pacman -Qgq base base-devel | sort > /var/tmp/pcmntmp2; comm -23 /var/tmp/pcmntmp1 /var/tmp/pcmntmp2'
pacman -Qeq | sort > /var/tmp/pcmntmp1; pacman -Qgq base base-devel | sort > /var/tmp/pcmntmp2; comm -23 /var/tmp/pcmntmp1 /var/tmp/pcmntmp2 $argv;
end

View File

@@ -0,0 +1,4 @@
# Defined in - @ line 1
function unused_packages --description 'alias unused_packages=pacman -Qtdq'
pacman -Qtdq $argv;
end

View File

@@ -0,0 +1,4 @@
# Defined in - @ line 1
function wget_od --description 'alias wget_od=wget --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" -e robots=off -r -nc -np -R "*index.html*"'
wget --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" -e robots=off -r -nc -np -R "*index.html*" $argv;
end

View File

@@ -0,0 +1,4 @@
# Defined in - @ line 1
function ytdl-channel --description 'alias ytdl-channel=youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(upload_date)s_%(title)s_%(id)s.%(ext)s"'
youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(upload_date)s_%(title)s_%(id)s.%(ext)s" $argv;
end

View File

@@ -0,0 +1,4 @@
# Defined in - @ line 1
function ytdl-loose --description 'alias ytdl-loose=youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(id)s_%(title)s.%(ext)s"'
youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(id)s_%(title)s.%(ext)s" $argv;
end

View File

@@ -0,0 +1,4 @@
# Defined in - @ line 1
function ytdl-playlist --description 'alias ytdl-playlist=youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(playlist_index)s_%(title)s_%(id)s.%(ext)s"'
youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(playlist_index)s_%(title)s_%(id)s.%(ext)s" $argv;
end