dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

commit 0dd516c6fc6bb6af3a393903d8bc9b09d021437d
parent 30217773fdada7308c79122314054356e64fd5f3
Author: regexghost <regexghost@protonmail.com>
Date:   Sat,  9 May 2026 19:48:04 +0100

made substitutions normal case not upper case, less yelling

Diffstat:
Mdotfiles/.bashrc | 117+++++++++++++++----------------------------------------------------------------
Ddotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Doom_One_-alacritty.toml | 70----------------------------------------------------------------------
Ddotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Dracula-alacritty.toml | 64----------------------------------------------------------------
Ddotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Everforest-alacritty.toml | 68--------------------------------------------------------------------
Ddotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-jmbi-alacritty.toml | 70----------------------------------------------------------------------
Adotfiles/.config/alacritty/Colourscheme-Substitution-Doom_One-alacritty.toml | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adotfiles/.config/alacritty/Colourscheme-Substitution-Dracula-alacritty.toml | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adotfiles/.config/alacritty/Colourscheme-Substitution-Everforest-alacritty.toml | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adotfiles/.config/alacritty/Colourscheme-Substitution-jmbi-alacritty.toml | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddotfiles/.config/alacritty/FONT-SUBSTITUTION-Roboto_Mono-alacritty.toml | 22----------------------
Adotfiles/.config/alacritty/Font-Substitution-Roboto_Mono-alacritty.toml | 24++++++++++++++++++++++++
Mdotfiles/.config/alacritty/alacritty.toml | 4++--
Adotfiles/Image_Viewer-Substitution-gwenview-.bashrc | 12++++++++++++
Ddotfiles/PDF VIEWER_SUBSTITUTION_Zathura_.bashrc | 6------
Adotfiles/PDF_Viewer-Substitution-Zathura-.bashrc | 8++++++++
Adotfiles/PDF_Viewer-Substitution-okular-.bashrc | 8++++++++
Ddotfiles/POWER MANAGEMENT_SUBSTITUTION_i3_.bashrc | 51---------------------------------------------------
Adotfiles/Package_Manager-Substitution-apt-.bashrc | 13+++++++++++++
Adotfiles/Power_Management-Substitution-i3-.bashrc | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Adotfiles/Power_Management-Substitution-jwm-.bashrc | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Adotfiles/Video_Player-Substitution-mpv-.bashrc | 6++++++
21 files changed, 481 insertions(+), 448 deletions(-)

diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc @@ -45,18 +45,19 @@ alias greps='/usr/bin/grep --color=auto' # Case sensitive alias grepa='grep -i -I -A 5 -B 5 --color=auto' alias diff='diff --color' alias hs='history' -alias n='nnn' +alias n='nano' +alias ra='ranger' alias py='python3' alias nf='fastfetch' alias sq='ncdu --color dark' # Not sure why this is "sq" but I'm used to it now -alias bat='bat --theme=base16' +alias bat='batcat --theme=base16' alias mv='mv -i' alias cp='cp -r -i' alias cmatrix='cmatrix -u 6' # Cool fake hacker program alias duf='duf -hide special' alias gtop='sudo intel_gpu_top' alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' -alias rm='rm-trash-cli' +alias rm='rm-trash' alias cheat='cheat -c' alias zbr='zig build run' alias bluey='bluetui' @@ -87,23 +88,24 @@ alias gitd='git diff' alias gitdc='git diff --word-diff-regex=.' alias gits='git status' alias gpl='git pull' -alias gp='git push' alias gitl='git log --reverse' alias giturl='git config --get remote.origin.url' +alias gp='git push' +# Get password and push (GitHub) +function gpp () { + keepassxc-cli show ~/Downloads/passwords.kdbx "GitHub" | grep Notes | cut -d " " -f 2 | xclip -selection clipboard + git push -u origin + echo " " | xclip -selection clipboard +} -#### SUBSTITUTE - PACKAGE MANAGER -alias install='sudo pacman -S' -alias remove='sudo pacman -Rs' -alias update='sudo pacman -Syu' -alias search='pacman -Ss' -alias paclog='cat /var/log/pacman.log | grep' - -function pacs() { - numberOfPackages="$(pacman -Q | wc -l)" - echo "${numberOfPackages} packages installed" +function gpa () { + gpp + git push -u codeberg + git push -u selfhost } -#### END SUBSTITUTE + +#### Start Substitute - Package_Manager # Other random aliases @@ -127,7 +129,7 @@ alias v='vim' function batf () { result=$(fasd -fi $@) [ "$result" == "" ] && return - bat --theme=base16 "$result" + batcat --theme=base16 "$result" } function lsblk () { @@ -215,90 +217,15 @@ function t () { # External program openers -#### SUBSTITUTE - IMAGE VIEWER -# Open images in gwenview -# The alias is called "rs" as I originally used Xfce with Ristretto -rs () { - toOpen=$@ - if [[ "$toOpen" == "" ]]; then - gwenview . & disown - else - gwenview "$@" & disown - fi -} -#### END SUBSTITUTE +#### Start Substitute - Image_Viewer -#### SUBSTITUTE - VIDEO PLAYER -# Open video(s) with mpv -mp () { - /usr/bin/mpv --really-quiet --save-position-on-quit "$@" & disown -} -#### END SUBSTITUTE +#### Start Substitute - Video_Player -#### SUBSTITUTE - PDF VIEWER -# Open pdf files in Okular -pdf () { - for arg; do - okular "$arg" & disown - done -} -#### END SUBSTITUTE +#### Start Substitute - PDF_Viewer # Power Management Functions -#### SUBSTITUTE - POWER MANAGEMENT -## Shutdown with confirmation -shutdown () { - read -p "Shutdown? (y/N) " yesOrNoShutdown - if [[ "$yesOrNoShutdown" == "y" ]]; then - tmux send-keys -t buffer_tmux.0 C-s - tmux send-keys -t buffer_tmux.0 C-q - tmux kill-session -t buffer_tmux - qdbus6 org.kde.LogoutPrompt /LogoutPrompt promptShutDown - fi -} - -## Reboot with confirmation -reboot () { - read -p "Reboot? (y/N) " yesOrNoReboot - if [[ "$yesOrNoReboot" == "y" ]]; then - tmux send-keys -t buffer_tmux.0 C-s - tmux send-keys -t buffer_tmux.0 C-q - tmux kill-session -t buffer_tmux - qdbus6 org.kde.LogoutPrompt /LogoutPrompt promptReboot - fi -} - -## Hibernate to disk with confirmation -hibernate () { - read -p "Hibernate? (y/N) " yesOrNoHibernate - [[ "$yesOrNoHibernate" == "y" ]] && qdbus6 org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Hibernate -} - -## Hybrid-Sleep with confirmation, i.e. sleep to RAM and disk in case battery dies -hybrid-sleep () { - read -p "Hybrid-Sleep? (y/N) " yesOrNoHybridSleep - [[ "$yesOrNoHybridSleep" == "y" ]] && systemctl hybrid-sleep -} - -## Sleep with confirmation (i.e. RAM only) -qsleep () { - read -p "Sleep? (y/N) " yesOrNoQSleep - [[ "$yesOrNoQSleep" == "y" ]] && qdbus6 org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend -} - -## Log Out with confirmation -log-out () { - read -p "Log Out? (y/N) " yesOrNoLogOut - [[ "$yesOrNoLogOut" == "y" ]] && qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout -} - -## Lock screen with confirmation -lock () { - read -p "Lock Screen? (y/N) " yesOrNoLock - [[ "$yesOrNoLock" == "y" ]] && qdbus6 org.kde.screensaver /ScreenSaver Lock -} -#### END SUBSTITUTE +#### Start Substitute - Power_Management # yt-dlp helper function do_yt-dlp () { diff --git a/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Doom_One_-alacritty.toml b/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Doom_One_-alacritty.toml @@ -1,70 +0,0 @@ -# Doom One -[colors.cursor] -cursor = "CellForeground" -text = "CellBackground" - -[colors.footer_bar] -background = "#282a36" -foreground = "#f8f8f1" - -[colors.hints.end] -background = "#282a36" -foreground = "#f1fa8c" - -[colors.hints.start] -background = "#f1fa8c" -foreground = "#22212d" - -[colors.line_indicator] -background = "None" -foreground = "None" - -# Colors (Gruvbox dark) - -# Default colors -[colors.primary] -# hard contrast background = = '#1d2021' -background = '#282c34' -# soft contrast background = = '#32302f' -foreground = '#bbc2cf' - -# Normal colors -[colors.normal] -black = '#1b2229' -red = '#ff6c6b' -green = '#98be65' -yellow = '#ffd700' -blue = '#51afef' -magenta = '#c678dd' -cyan = '#46d9ff' -white = '#bbc2cf' - -# Bright colors -[colors.bright] -black = '#3f444a' -red = '#ff6c6b' -green = '#98be65' -yellow = '#ecbe7b' -blue = '#51afef' -magenta = '#a9a1e1' -cyan = '#46d9ff' -white = '#bbc2cf' - -[colors.search.focused_match] -background = "#ffb86c" -foreground = "#44475a" - -[colors.search.matches] -background = "#50fa7b" -foreground = "#44475a" - -[colors.selection] -background = "#44475a" -text = "CellForeground" - -[colors.vi_mode_cursor] -cursor = "CellForeground" -text = "CellBackground" - -[cursor.style] -shape = "Beam" diff --git a/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Dracula-alacritty.toml b/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Dracula-alacritty.toml @@ -1,64 +0,0 @@ -# Dracula -[colors.bright] -black = "#7a71aa" -blue = "#bd93f9" -cyan = "#8be9fd" -green = "#50fa7b" -magenta = "#ff79d2" -red = "#ff5555" -white = "#f8f8f2" -yellow = "#f1fa8c" - -[colors.cursor] -cursor = "CellForeground" -text = "CellBackground" - -[colors.footer_bar] -background = "#282a36" -foreground = "#f8f8f1" - -[colors.hints.end] -background = "#282a36" -foreground = "#f1fa8c" - -[colors.hints.start] -background = "#f1fa8c" -foreground = "#22212d" - -[colors.line_indicator] -background = "None" -foreground = "None" - -[colors.normal] -black = "#22212d" -blue = "#9a7cff" -cyan = "#38ffea" -green = "#52ff6d" -magenta = "#ff76c1" -red = "#e64747" -white = "#f8f8f1" -yellow = "#ffff80" - -[colors.primary] -background = "#22212d" -bright_foreground = "#ffffff" -foreground = "#f8f8f1" - -[colors.search.focused_match] -background = "#ffb86c" -foreground = "#44475a" - -[colors.search.matches] -background = "#50fa7b" -foreground = "#44475a" - -[colors.selection] -background = "#44475a" -text = "CellForeground" - -[colors.vi_mode_cursor] -cursor = "CellForeground" -text = "CellBackground" - -[cursor.style] -shape = "Beam" diff --git a/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Everforest-alacritty.toml b/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-Everforest-alacritty.toml @@ -1,68 +0,0 @@ -# Everforest -[colors.cursor] -cursor = "CellForeground" -text = "CellBackground" - -[colors.footer_bar] -background = "#282a36" -foreground = "#f8f8f1" - -[colors.hints.end] -background = "#282a36" -foreground = "#f1fa8c" - -[colors.hints.start] -background = "#f1fa8c" -foreground = "#22212d" - -[colors.line_indicator] -background = "None" -foreground = "None" - -# Default colors -[colors.primary] -# hard contrast background = = '#1d2021' -background = '#272d32' -# soft contrast background = = '#32302f' -foreground = '#edebe6' - -# Normal colors -[colors.normal] -black = '#414b51' -red = '#e77e7f' -green = '#a6c080' -yellow = '#dbbc7f' -blue = '#7fbbb3' -magenta = '#d699b6' -cyan = '#83c091' -white = '#edebe6' - -# Bright colors -[colors.bright] -black = '#414b51' -red = '#e67e80' -green = '#a7c080' -yellow = '#dbbc7f' -blue = '#7fbbb3' -magenta = '#d59ab6' -cyan = '#83c092' -white = '#edebe6' - -[colors.search.focused_match] -background = "#ffb86c" -foreground = "#44475a" - -[colors.search.matches] -background = "#50fa7b" -foreground = "#44475a" - -[colors.selection] -background = "#4f585e" -text = "CellForeground" - -[colors.vi_mode_cursor] -cursor = "CellForeground" -text = "CellBackground" - -[cursor.style] -shape = "Beam" diff --git a/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-jmbi-alacritty.toml b/dotfiles/.config/alacritty/COLOURSCHEME-SUBSTITUTION-jmbi-alacritty.toml @@ -1,70 +0,0 @@ -# jmbi -[colors.cursor] -cursor = "CellForeground" -text = "CellBackground" - -[colors.footer_bar] -background = "#282a36" -foreground = "#f8f8f1" - -[colors.hints.end] -background = "#282a36" -foreground = "#f1fa8c" - -[colors.hints.start] -background = "#f1fa8c" -foreground = "#22212d" - -[colors.line_indicator] -background = "None" -foreground = "None" - -# Colors (Gruvbox dark) - -# Default colors -[colors.primary] -# hard contrast background = = '#1d2021' -background = '#1e1e1e' -# soft contrast background = = '#32302f' -foreground = '#efe2e0' - -# Normal colors -[colors.normal] -black = '#5a7260' -red = '#8f423c' -green = '#bbbb88' -yellow = '#f9d25b' -blue = '#e0ba69' -magenta = '#709289' -cyan = '#c25431' -white = '#efe2e0' - -# Bright colors -[colors.bright] -black = '#5a7260' -red = '#8f423c' -green = '#bbbb88' -yellow = '#f9d25b' -blue = '#e0ba69' -magenta = '#709289' -cyan = '#c25431' -white = '#efe2e0' - -[colors.search.focused_match] -background = "#ffb86c" -foreground = "#44475a" - -[colors.search.matches] -background = "#50fa7b" -foreground = "#44475a" - -[colors.selection] -background = "#44475a" -text = "CellForeground" - -[colors.vi_mode_cursor] -cursor = "CellForeground" -text = "CellBackground" - -[cursor.style] -shape = "Beam" diff --git a/dotfiles/.config/alacritty/Colourscheme-Substitution-Doom_One-alacritty.toml b/dotfiles/.config/alacritty/Colourscheme-Substitution-Doom_One-alacritty.toml @@ -0,0 +1,72 @@ +#### Start Substitute - Colourscheme +# Doom One +[colors.cursor] +cursor = "CellForeground" +text = "CellBackground" + +[colors.footer_bar] +background = "#282a36" +foreground = "#f8f8f1" + +[colors.hints.end] +background = "#282a36" +foreground = "#f1fa8c" + +[colors.hints.start] +background = "#f1fa8c" +foreground = "#22212d" + +[colors.line_indicator] +background = "None" +foreground = "None" + +# Colors (Gruvbox dark) + +# Default colors +[colors.primary] +# hard contrast background = = '#1d2021' +background = '#282c34' +# soft contrast background = = '#32302f' +foreground = '#bbc2cf' + +# Normal colors +[colors.normal] +black = '#1b2229' +red = '#ff6c6b' +green = '#98be65' +yellow = '#ffd700' +blue = '#51afef' +magenta = '#c678dd' +cyan = '#46d9ff' +white = '#bbc2cf' + +# Bright colors +[colors.bright] +black = '#3f444a' +red = '#ff6c6b' +green = '#98be65' +yellow = '#ecbe7b' +blue = '#51afef' +magenta = '#a9a1e1' +cyan = '#46d9ff' +white = '#bbc2cf' + +[colors.search.focused_match] +background = "#ffb86c" +foreground = "#44475a" + +[colors.search.matches] +background = "#50fa7b" +foreground = "#44475a" + +[colors.selection] +background = "#44475a" +text = "CellForeground" + +[colors.vi_mode_cursor] +cursor = "CellForeground" +text = "CellBackground" + +[cursor.style] +shape = "Beam" +#### End Substitute diff --git a/dotfiles/.config/alacritty/Colourscheme-Substitution-Dracula-alacritty.toml b/dotfiles/.config/alacritty/Colourscheme-Substitution-Dracula-alacritty.toml @@ -0,0 +1,66 @@ +#### Start Substitute - Colourscheme +# Dracula +[colors.bright] +black = "#7a71aa" +blue = "#bd93f9" +cyan = "#8be9fd" +green = "#50fa7b" +magenta = "#ff79d2" +red = "#ff5555" +white = "#f8f8f2" +yellow = "#f1fa8c" + +[colors.cursor] +cursor = "CellForeground" +text = "CellBackground" + +[colors.footer_bar] +background = "#282a36" +foreground = "#f8f8f1" + +[colors.hints.end] +background = "#282a36" +foreground = "#f1fa8c" + +[colors.hints.start] +background = "#f1fa8c" +foreground = "#22212d" + +[colors.line_indicator] +background = "None" +foreground = "None" + +[colors.normal] +black = "#22212d" +blue = "#9a7cff" +cyan = "#38ffea" +green = "#52ff6d" +magenta = "#ff76c1" +red = "#e64747" +white = "#f8f8f1" +yellow = "#ffff80" + +[colors.primary] +background = "#22212d" +bright_foreground = "#ffffff" +foreground = "#f8f8f1" + +[colors.search.focused_match] +background = "#ffb86c" +foreground = "#44475a" + +[colors.search.matches] +background = "#50fa7b" +foreground = "#44475a" + +[colors.selection] +background = "#44475a" +text = "CellForeground" + +[colors.vi_mode_cursor] +cursor = "CellForeground" +text = "CellBackground" + +[cursor.style] +shape = "Beam" +#### End Substitute diff --git a/dotfiles/.config/alacritty/Colourscheme-Substitution-Everforest-alacritty.toml b/dotfiles/.config/alacritty/Colourscheme-Substitution-Everforest-alacritty.toml @@ -0,0 +1,70 @@ +#### Start Substitute - Colourscheme +# Everforest +[colors.cursor] +cursor = "CellForeground" +text = "CellBackground" + +[colors.footer_bar] +background = "#282a36" +foreground = "#f8f8f1" + +[colors.hints.end] +background = "#282a36" +foreground = "#f1fa8c" + +[colors.hints.start] +background = "#f1fa8c" +foreground = "#22212d" + +[colors.line_indicator] +background = "None" +foreground = "None" + +# Default colors +[colors.primary] +# hard contrast background = = '#1d2021' +background = '#272d32' +# soft contrast background = = '#32302f' +foreground = '#edebe6' + +# Normal colors +[colors.normal] +black = '#414b51' +red = '#e77e7f' +green = '#a6c080' +yellow = '#dbbc7f' +blue = '#7fbbb3' +magenta = '#d699b6' +cyan = '#83c091' +white = '#edebe6' + +# Bright colors +[colors.bright] +black = '#414b51' +red = '#e67e80' +green = '#a7c080' +yellow = '#dbbc7f' +blue = '#7fbbb3' +magenta = '#d59ab6' +cyan = '#83c092' +white = '#edebe6' + +[colors.search.focused_match] +background = "#ffb86c" +foreground = "#44475a" + +[colors.search.matches] +background = "#50fa7b" +foreground = "#44475a" + +[colors.selection] +background = "#4f585e" +text = "CellForeground" + +[colors.vi_mode_cursor] +cursor = "CellForeground" +text = "CellBackground" + +[cursor.style] +shape = "Beam" +#### End Substitute diff --git a/dotfiles/.config/alacritty/Colourscheme-Substitution-jmbi-alacritty.toml b/dotfiles/.config/alacritty/Colourscheme-Substitution-jmbi-alacritty.toml @@ -0,0 +1,72 @@ +#### Start Substitute - Colourscheme +# jmbi +[colors.cursor] +cursor = "CellForeground" +text = "CellBackground" + +[colors.footer_bar] +background = "#282a36" +foreground = "#f8f8f1" + +[colors.hints.end] +background = "#282a36" +foreground = "#f1fa8c" + +[colors.hints.start] +background = "#f1fa8c" +foreground = "#22212d" + +[colors.line_indicator] +background = "None" +foreground = "None" + +# Colors (Gruvbox dark) + +# Default colors +[colors.primary] +# hard contrast background = = '#1d2021' +background = '#1e1e1e' +# soft contrast background = = '#32302f' +foreground = '#efe2e0' + +# Normal colors +[colors.normal] +black = '#5a7260' +red = '#8f423c' +green = '#bbbb88' +yellow = '#f9d25b' +blue = '#e0ba69' +magenta = '#709289' +cyan = '#c25431' +white = '#efe2e0' + +# Bright colors +[colors.bright] +black = '#5a7260' +red = '#8f423c' +green = '#bbbb88' +yellow = '#f9d25b' +blue = '#e0ba69' +magenta = '#709289' +cyan = '#c25431' +white = '#efe2e0' + +[colors.search.focused_match] +background = "#ffb86c" +foreground = "#44475a" + +[colors.search.matches] +background = "#50fa7b" +foreground = "#44475a" + +[colors.selection] +background = "#44475a" +text = "CellForeground" + +[colors.vi_mode_cursor] +cursor = "CellForeground" +text = "CellBackground" + +[cursor.style] +shape = "Beam" +#### End Subtitute diff --git a/dotfiles/.config/alacritty/FONT-SUBSTITUTION-Roboto_Mono-alacritty.toml b/dotfiles/.config/alacritty/FONT-SUBSTITUTION-Roboto_Mono-alacritty.toml @@ -1,22 +0,0 @@ -# Roboto Mono Laptop -[env] -WINIT_X11_SCALE_FACTOR = "2" - -[font] -size = 6 - -[font.bold] -family = "Roboto Mono" -style = "Bold" - -[font.bold_italic] -family = "Roboto Mono" -style = "Bold Italic" - -[font.italic] -family = "Roboto Mono" -style = "Italic" - -[font.normal] -family = "Roboto Mono" -style = "Regular" diff --git a/dotfiles/.config/alacritty/Font-Substitution-Roboto_Mono-alacritty.toml b/dotfiles/.config/alacritty/Font-Substitution-Roboto_Mono-alacritty.toml @@ -0,0 +1,24 @@ +#### Start Substitute - Font +# Roboto Mono Laptop +[env] +WINIT_X11_SCALE_FACTOR = "2" + +[font] +size = 6 + +[font.bold] +family = "Roboto Mono" +style = "Bold" + +[font.bold_italic] +family = "Roboto Mono" +style = "Bold Italic" + +[font.italic] +family = "Roboto Mono" +style = "Italic" + +[font.normal] +family = "Roboto Mono" +style = "Regular" +#### End Substitute diff --git a/dotfiles/.config/alacritty/alacritty.toml b/dotfiles/.config/alacritty/alacritty.toml @@ -1,6 +1,6 @@ -#### SUBSTITUTE - COLOURSCHEME +#### Start Substitute - Colourscheme -#### SUBSTITUTE - FONT +#### Start Substitute - Font [window] dynamic_padding = true diff --git a/dotfiles/Image_Viewer-Substitution-gwenview-.bashrc b/dotfiles/Image_Viewer-Substitution-gwenview-.bashrc @@ -0,0 +1,12 @@ +#### Start Substitute - Image_Viewer +# Open images in gwenview +# The alias is called "rs" as I originally used Xfce with Ristretto +rs () { + toOpen=$@ + if [[ "$toOpen" == "" ]]; then + gwenview . & disown + else + gwenview "$@" & disown + fi +} +#### End Substitute diff --git a/dotfiles/PDF VIEWER_SUBSTITUTION_Zathura_.bashrc b/dotfiles/PDF VIEWER_SUBSTITUTION_Zathura_.bashrc @@ -1,6 +0,0 @@ -# Open pdf files in Zathura -pdf () { - for arg; do - zathura "$arg" & disown - done -} diff --git a/dotfiles/PDF_Viewer-Substitution-Zathura-.bashrc b/dotfiles/PDF_Viewer-Substitution-Zathura-.bashrc @@ -0,0 +1,8 @@ +#### Start Substitute - PDF_Viewer +# Open pdf files in Zathura +pdf () { + for arg; do + zathura "$arg" & disown + done +} +#### End Substitute diff --git a/dotfiles/PDF_Viewer-Substitution-okular-.bashrc b/dotfiles/PDF_Viewer-Substitution-okular-.bashrc @@ -0,0 +1,8 @@ +#### Start Substitute - PDF_Viewer +# Open pdf files in Okular +pdf () { + for arg; do + okular "$arg" & disown + done +} +#### End Substitute diff --git a/dotfiles/POWER MANAGEMENT_SUBSTITUTION_i3_.bashrc b/dotfiles/POWER MANAGEMENT_SUBSTITUTION_i3_.bashrc @@ -1,51 +0,0 @@ -## Shutdown with confirmation -shutdown () { - read -p "Shutdown? (y/N) " yesOrNoShutdown - if [[ "$yesOrNoShutdown" == "y" ]]; then - tmux send-keys -t buffer_tmux.0 C-s - tmux send-keys -t buffer_tmux.0 C-q - tmux kill-session -t buffer_tmux - /usr/bin/shutdown -h 0 - fi -} - -## Reboot with confirmation -reboot () { - read -p "Reboot? (y/N) " yesOrNoReboot - if [[ "$yesOrNoReboot" == "y" ]]; then - tmux send-keys -t buffer_tmux.0 C-s - tmux send-keys -t buffer_tmux.0 C-q - tmux kill-session -t buffer_tmux - /usr/bin/systemctl reboot - fi -} - -## Hibernate to disk with confirmation -hibernate () { - read -p "Hibernate? (y/N) " yesOrNoHibernate - [[ "$yesOrNoHibernate" == "y" ]] && systemctl hibernate -} - -## Hybrid-Sleep with confirmation, i.e. sleep to RAM and disk in case battery dies -hybrid-sleep () { - read -p "Hybrid-Sleep? (y/N) " yesOrNoHybridSleep - [[ "$yesOrNoHybridSleep" == "y" ]] && systemctl hybrid-sleep -} - -## Sleep with confirmation (i.e. RAM only) -qsleep () { - read -p "Sleep? (y/N) " yesOrNoQSleep - [[ "$yesOrNoQSleep" == "y" ]] && systemctl suspend -} - -## Log Out with confirmation -log-out () { - read -p "Log Out? (y/N) " yesOrNoLogOut - [[ "$yesOrNoLogOut" == "y" ]] && i3-msg exit -} - -## Lock screen with confirmation -lock () { - read -p "Lock Screen? (y/N) " yesOrNoLock - [[ "$yesOrNoLock" == "y" ]] && i3lock -i "$HOME/.config/regexghost/lock_screen_background.png" -} diff --git a/dotfiles/Package_Manager-Substitution-apt-.bashrc b/dotfiles/Package_Manager-Substitution-apt-.bashrc @@ -0,0 +1,13 @@ +#### Start Substitute - Package_Manager +alias install='sudo apt install' +alias remove='sudo apt remove' +alias update='sudo apt update' +alias upgrade='sudo apt upgrade' +alias search='apt search' +alias aptlog='cat /var/log/dpkg.log | grep' + +function pacs() { + numberOfPackages="$(apt list --installed | wc -l)" + echo "${numberOfPackages} packages installed" +} +#### End Substitute diff --git a/dotfiles/Power_Management-Substitution-i3-.bashrc b/dotfiles/Power_Management-Substitution-i3-.bashrc @@ -0,0 +1,53 @@ +#### Start Substitute - Power_Management +## Shutdown with confirmation +shutdown () { + read -p "Shutdown? (y/N) " yesOrNoShutdown + if [[ "$yesOrNoShutdown" == "y" ]]; then + tmux send-keys -t buffer_tmux.0 C-s + tmux send-keys -t buffer_tmux.0 C-q + tmux kill-session -t buffer_tmux + /usr/bin/shutdown -h 0 + fi +} + +## Reboot with confirmation +reboot () { + read -p "Reboot? (y/N) " yesOrNoReboot + if [[ "$yesOrNoReboot" == "y" ]]; then + tmux send-keys -t buffer_tmux.0 C-s + tmux send-keys -t buffer_tmux.0 C-q + tmux kill-session -t buffer_tmux + /usr/bin/systemctl reboot + fi +} + +## Hibernate to disk with confirmation +hibernate () { + read -p "Hibernate? (y/N) " yesOrNoHibernate + [[ "$yesOrNoHibernate" == "y" ]] && systemctl hibernate +} + +## Hybrid-Sleep with confirmation, i.e. sleep to RAM and disk in case battery dies +hybrid-sleep () { + read -p "Hybrid-Sleep? (y/N) " yesOrNoHybridSleep + [[ "$yesOrNoHybridSleep" == "y" ]] && systemctl hybrid-sleep +} + +## Sleep with confirmation (i.e. RAM only) +qsleep () { + read -p "Sleep? (y/N) " yesOrNoQSleep + [[ "$yesOrNoQSleep" == "y" ]] && systemctl suspend +} + +## Log Out with confirmation +log-out () { + read -p "Log Out? (y/N) " yesOrNoLogOut + [[ "$yesOrNoLogOut" == "y" ]] && i3-msg exit +} + +## Lock screen with confirmation +lock () { + read -p "Lock Screen? (y/N) " yesOrNoLock + [[ "$yesOrNoLock" == "y" ]] && i3lock -i "$HOME/.config/regexghost/lock_screen_background.png" +} +#### End Substitute diff --git a/dotfiles/Power_Management-Substitution-jwm-.bashrc b/dotfiles/Power_Management-Substitution-jwm-.bashrc @@ -0,0 +1,53 @@ +#### Start Substitute - Power_Management +## Shutdown with confirmation +shutdown () { + read -p "Shutdown? (y/N) " yesOrNoShutdown + if [[ "$yesOrNoShutdown" == "y" ]]; then + tmux send-keys -t buffer_tmux.0 C-s + tmux send-keys -t buffer_tmux.0 C-q + tmux kill-session -t buffer_tmux + /usr/sbin/shutdown -h 0 + fi +} + +## Reboot with confirmation +reboot () { + read -p "Reboot? (y/N) " yesOrNoReboot + if [[ "$yesOrNoReboot" == "y" ]]; then + tmux send-keys -t buffer_tmux.0 C-s + tmux send-keys -t buffer_tmux.0 C-q + tmux kill-session -t buffer_tmux + /usr/sbin/reboot + fi +} + +## Hibernate to disk with confirmation +hibernate () { + read -p "Hibernate? (y/N) " yesOrNoHibernate + [[ "$yesOrNoHibernate" == "y" ]] && qdbus6 org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Hibernate +} + +## Hybrid-Sleep with confirmation, i.e. sleep to RAM and disk in case battery dies +hybrid-sleep () { + read -p "Hybrid-Sleep? (y/N) " yesOrNoHybridSleep + [[ "$yesOrNoHybridSleep" == "y" ]] && systemctl hybrid-sleep +} + +## Sleep with confirmation (i.e. RAM only) +qsleep () { + read -p "Sleep? (y/N) " yesOrNoQSleep + [[ "$yesOrNoQSleep" == "y" ]] && qdbus6 org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend +} + +## Log Out with confirmation +log-out () { + read -p "Log Out? (y/N) " yesOrNoLogOut + [[ "$yesOrNoLogOut" == "y" ]] && qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout +} + +## Lock screen with confirmation +lock () { + read -p "Lock Screen? (y/N) " yesOrNoLock + [[ "$yesOrNoLock" == "y" ]] && qdbus6 org.kde.screensaver /ScreenSaver Lock +} +#### End Substitute diff --git a/dotfiles/Video_Player-Substitution-mpv-.bashrc b/dotfiles/Video_Player-Substitution-mpv-.bashrc @@ -0,0 +1,6 @@ +#### Start Substitute - Video_Player +# Open video(s) with mpv +mp () { + /usr/bin/mpv --really-quiet --save-position-on-quit "$@" & disown +} +#### End Substitute