add batman beyond config
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# ====================================================================
|
||||
# auth: alex
|
||||
# file: .alias
|
||||
# revn: 04-19-2026 2.0
|
||||
# func: define useful fish aliases
|
||||
#
|
||||
# TODO: make boom more robust (scp, etc)
|
||||
# ====================================================================
|
||||
# r au mm-dd-yyyy: CHANGE LOG
|
||||
# --------------------------------------------------------------------
|
||||
# ac 04-??-2026: init
|
||||
# ac 04-16-2026: added gg alias
|
||||
# * ac 04-19-2026: added boom alias
|
||||
# added knight alias
|
||||
# * ac 04-22-2026: fixed insane ranger/knight bug
|
||||
#
|
||||
# ====================================================================
|
||||
|
||||
# Useful aliases
|
||||
|
||||
|
||||
# vim assumes tabs instead of buffers
|
||||
alias vim="vim -p"
|
||||
|
||||
# make ranger sound more batman-like
|
||||
alias knight="ranger"
|
||||
|
||||
# boomtube reference
|
||||
alias boom="ssh"
|
||||
|
||||
# shorthand for fastfetch
|
||||
alias ff="fastfetch"
|
||||
|
||||
# forfeit
|
||||
alias FF="shutdown now"
|
||||
|
||||
# good game
|
||||
alias gg="sudo reboot now"
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
## Source from conf.d before our fish config
|
||||
source /usr/share/cachyos-fish-config/conf.d/done.fish
|
||||
|
||||
|
||||
## Set values
|
||||
## Run fastfetch as welcome message
|
||||
function fish_greeting
|
||||
fastfetch
|
||||
end
|
||||
|
||||
# Format man pages
|
||||
set -x MANROFFOPT "-c"
|
||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||
|
||||
# Set settings for https://github.com/franciscolourenco/done
|
||||
set -U __done_min_cmd_duration 10000
|
||||
set -U __done_notification_urgency_level low
|
||||
|
||||
## Environment setup
|
||||
# Apply .profile: use this to put fish compatible .profile stuff in
|
||||
if test -f ~/.fish_profile
|
||||
source ~/.fish_profile
|
||||
end
|
||||
|
||||
# Add ~/.local/bin to PATH
|
||||
if test -d ~/.local/bin
|
||||
if not contains -- ~/.local/bin $PATH
|
||||
set -p PATH ~/.local/bin
|
||||
end
|
||||
end
|
||||
|
||||
# Add depot_tools to PATH
|
||||
if test -d ~/Applications/depot_tools
|
||||
if not contains -- ~/Applications/depot_tools $PATH
|
||||
set -p PATH ~/Applications/depot_tools
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
## Functions
|
||||
# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
|
||||
function __history_previous_command
|
||||
switch (commandline -t)
|
||||
case "!"
|
||||
commandline -t $history[1]; commandline -f repaint
|
||||
case "*"
|
||||
commandline -i !
|
||||
end
|
||||
end
|
||||
|
||||
function __history_previous_command_arguments
|
||||
switch (commandline -t)
|
||||
case "!"
|
||||
commandline -t ""
|
||||
commandline -f history-token-search-backward
|
||||
case "*"
|
||||
commandline -i '$'
|
||||
end
|
||||
end
|
||||
|
||||
if [ "$fish_key_bindings" = fish_vi_key_bindings ];
|
||||
bind -Minsert ! __history_previous_command
|
||||
bind -Minsert '$' __history_previous_command_arguments
|
||||
else
|
||||
bind ! __history_previous_command
|
||||
bind '$' __history_previous_command_arguments
|
||||
end
|
||||
|
||||
# Fish command history
|
||||
function history
|
||||
builtin history --show-time='%F %T '
|
||||
end
|
||||
|
||||
function backup --argument filename
|
||||
cp $filename $filename.bak
|
||||
end
|
||||
|
||||
# Copy DIR1 DIR2
|
||||
function copy
|
||||
set count (count $argv | tr -d \n)
|
||||
if test "$count" = 2; and test -d "$argv[1]"
|
||||
set from (echo $argv[1] | trim-right /)
|
||||
set to (echo $argv[2])
|
||||
command cp -r $from $to
|
||||
else
|
||||
command cp $argv
|
||||
end
|
||||
end
|
||||
|
||||
# Replace ls with eza
|
||||
alias ls='eza -al --color=always --group-directories-first --icons' # preferred listing
|
||||
alias la='eza -a --color=always --group-directories-first --icons' # all files and dirs
|
||||
alias ll='eza -abl --color=always --icons --git' # long format
|
||||
alias lt='eza -aT --color=always --group-directories-first --icons' # tree listing
|
||||
alias l.="eza -a | grep -e '^\.'" # show only dotfiles
|
||||
|
||||
# Common use
|
||||
alias grubup="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
||||
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
|
||||
alias tarnow='tar -acf '
|
||||
alias untar='tar -zxvf '
|
||||
alias wget='wget -c '
|
||||
alias psmem='ps auxf | sort -nr -k 4'
|
||||
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias .....='cd ../../../..'
|
||||
alias ......='cd ../../../../..'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias hw='hwinfo --short' # Hardware Info
|
||||
alias big="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages according to size in MB
|
||||
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' # List amount of -git packages
|
||||
alias update='sudo pacman -Syu'
|
||||
|
||||
# Get fastest mirrors
|
||||
alias mirror="sudo cachyos-rate-mirrors"
|
||||
|
||||
# Help people new to Arch
|
||||
alias apt='man pacman'
|
||||
alias apt-get='man pacman'
|
||||
alias please='sudo'
|
||||
alias tb='nc termbin.com 9999'
|
||||
|
||||
# Cleanup orphaned packages
|
||||
alias cleanup='sudo pacman -Rns (pacman -Qtdq)'
|
||||
|
||||
# Get the error messages from journalctl
|
||||
alias jctl="journalctl -p 3 -xb"
|
||||
|
||||
# Recent installed packages
|
||||
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
|
||||
@@ -0,0 +1,25 @@
|
||||
# source default* settings
|
||||
source /usr/share/cachyos-fish-config/cachyos-config.fish
|
||||
|
||||
# scripst for polybar
|
||||
source ~/.config/fish/functions/inc_brightness.fish
|
||||
source ~/.config/fish/functions/dec_brightness.fish
|
||||
source ~/.config/fish/functions/get_volume.fish
|
||||
|
||||
# bluetooth connect function
|
||||
source ~/.config/fish/functions/bt.fish
|
||||
|
||||
# do not load default ranger config
|
||||
set RANGER_LOAD_DEFAULT_RC FALSE
|
||||
|
||||
# source aliases
|
||||
if test -f ~/.config/fish/.alias
|
||||
source ~/.config/fish/.alias
|
||||
end
|
||||
|
||||
# overwrite greeting
|
||||
# potentially disabling fastfetch
|
||||
function fish_greeting
|
||||
# smth smth
|
||||
fastfetch --config bb-large.jsonc
|
||||
end
|
||||
@@ -0,0 +1,77 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __done_min_cmd_duration:10000
|
||||
SETUVAR __done_notification_urgency_level:low
|
||||
SETUVAR __fish_initialized:4300
|
||||
SETUVAR pure_begin_prompt_with_current_directory:true
|
||||
SETUVAR pure_check_for_new_release:false
|
||||
SETUVAR pure_color_at_sign:pure_color_mute
|
||||
SETUVAR pure_color_aws_profile:pure_color_warning
|
||||
SETUVAR pure_color_command_duration:pure_color_warning
|
||||
SETUVAR pure_color_current_directory:pure_color_primary
|
||||
SETUVAR pure_color_danger:red
|
||||
SETUVAR pure_color_dark:black
|
||||
SETUVAR pure_color_exit_status:pure_color_danger
|
||||
SETUVAR pure_color_git_branch:pure_color_mute
|
||||
SETUVAR pure_color_git_dirty:pure_color_mute
|
||||
SETUVAR pure_color_git_stash:pure_color_info
|
||||
SETUVAR pure_color_git_unpulled_commits:pure_color_info
|
||||
SETUVAR pure_color_git_unpushed_commits:pure_color_info
|
||||
SETUVAR pure_color_hostname:pure_color_mute
|
||||
SETUVAR pure_color_info:cyan
|
||||
SETUVAR pure_color_jobs:pure_color_normal
|
||||
SETUVAR pure_color_k8s_context:pure_color_success
|
||||
SETUVAR pure_color_k8s_namespace:pure_color_primary
|
||||
SETUVAR pure_color_k8s_prefix:pure_color_info
|
||||
SETUVAR pure_color_light:white
|
||||
SETUVAR pure_color_mute:brblack
|
||||
SETUVAR pure_color_nixdevshell_prefix:pure_color_info
|
||||
SETUVAR pure_color_nixdevshell_symbol:pure_color_mute
|
||||
SETUVAR pure_color_normal:normal
|
||||
SETUVAR pure_color_prefix_root_prompt:pure_color_danger
|
||||
SETUVAR pure_color_primary:blue
|
||||
SETUVAR pure_color_prompt_on_error:pure_color_danger
|
||||
SETUVAR pure_color_prompt_on_success:pure_color_success
|
||||
SETUVAR pure_color_success:magenta
|
||||
SETUVAR pure_color_system_time:pure_color_mute
|
||||
SETUVAR pure_color_username_normal:pure_color_mute
|
||||
SETUVAR pure_color_username_root:pure_color_light
|
||||
SETUVAR pure_color_virtualenv:pure_color_mute
|
||||
SETUVAR pure_color_warning:yellow
|
||||
SETUVAR pure_convert_exit_status_to_signal:false
|
||||
SETUVAR pure_enable_aws_profile:true
|
||||
SETUVAR pure_enable_container_detection:true
|
||||
SETUVAR pure_enable_git:true
|
||||
SETUVAR pure_enable_k8s:false
|
||||
SETUVAR pure_enable_nixdevshell:false
|
||||
SETUVAR pure_enable_single_line_prompt:false
|
||||
SETUVAR pure_enable_virtualenv:true
|
||||
SETUVAR pure_reverse_prompt_symbol_in_vimode:true
|
||||
SETUVAR pure_separate_prompt_on_error:false
|
||||
SETUVAR pure_shorten_prompt_current_directory_length:0
|
||||
SETUVAR pure_shorten_window_title_current_directory_length:0
|
||||
SETUVAR pure_show_exit_status:false
|
||||
SETUVAR pure_show_jobs:false
|
||||
SETUVAR pure_show_numbered_git_indicator:false
|
||||
SETUVAR pure_show_prefix_root_prompt:false
|
||||
SETUVAR pure_show_subsecond_command_duration:false
|
||||
SETUVAR pure_show_system_time:false
|
||||
SETUVAR pure_symbol_aws_profile_prefix:
|
||||
SETUVAR pure_symbol_container_prefix:
|
||||
SETUVAR pure_symbol_exit_status_prefix:\x7c
|
||||
SETUVAR pure_symbol_exit_status_separator:\x7c
|
||||
SETUVAR pure_symbol_git_dirty:\x2a
|
||||
SETUVAR pure_symbol_git_stash:\u2261
|
||||
SETUVAR pure_symbol_git_unpulled_commits:\u21e3
|
||||
SETUVAR pure_symbol_git_unpushed_commits:\u21e1
|
||||
SETUVAR pure_symbol_k8s_prefix:\u2638
|
||||
SETUVAR pure_symbol_nixdevshell_prefix:\u2744\ufe0f
|
||||
SETUVAR pure_symbol_prefix_root_prompt:\x23
|
||||
SETUVAR pure_symbol_prompt:\u276f
|
||||
SETUVAR pure_symbol_reverse_prompt:\u276e
|
||||
SETUVAR pure_symbol_ssh_prefix:
|
||||
SETUVAR pure_symbol_title_bar_separator:\x2d
|
||||
SETUVAR pure_symbol_virtualenv_prefix:
|
||||
SETUVAR pure_threshold_command_duration:5
|
||||
SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1
|
||||
SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/fish
|
||||
|
||||
function m50x
|
||||
|
||||
set -l mac "00:0A:45:44:82:12"
|
||||
|
||||
set -l conn $( bluetoothctl devices Connected )
|
||||
|
||||
if test -z $conn
|
||||
if bluetoothctl connect $mac > /dev/null
|
||||
echo "Connection successful"
|
||||
end
|
||||
else
|
||||
if bluetoothctl disconnect > /dev/null
|
||||
echo "Disconnection successful"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/fish
|
||||
|
||||
function dec_brightness
|
||||
|
||||
brightnessctl -q set 5%-
|
||||
|
||||
set -f cur ( brightnessctl get )
|
||||
set -f max ( brightnessctl max )
|
||||
|
||||
set -f ret ( math -s0 "100 * $cur / $max" )
|
||||
|
||||
#echo $ret > /tmp/xobpipe
|
||||
echo $ret
|
||||
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/fish
|
||||
|
||||
function get_volume
|
||||
|
||||
if string match --regex '\[off\]' $(amixer sset Master toggle) 1>/dev/null
|
||||
set -f ret $( pamixer --get-volume | sed 's/$/!/' )
|
||||
else
|
||||
set -f ret $( pamixer --get-volume )
|
||||
end
|
||||
|
||||
#echo $ret > /tmp/xobpipe
|
||||
echo $ret
|
||||
|
||||
end
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/fish
|
||||
|
||||
function inc_brightness
|
||||
|
||||
brightnessctl -q set +5%
|
||||
|
||||
set -f cur ( brightnessctl get )
|
||||
set -f max ( brightnessctl max )
|
||||
|
||||
set -f ret ( math -s0 "100 * $cur / $max" )
|
||||
|
||||
#echo $ret > /tmp/xobpipe
|
||||
echo $ret
|
||||
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/fish
|
||||
|
||||
function qd
|
||||
set -l x ( pgrep -i "discord" | head -n1 )
|
||||
|
||||
if test $status -eq 0
|
||||
kill $x
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user