lots of stuff
This commit is contained in:
53
.bashrc
53
.bashrc
@@ -72,7 +72,6 @@ PATH=$PATH:/var/lib/flatpak/app
|
||||
# GOPASS
|
||||
#######################################################
|
||||
|
||||
|
||||
# Ensure gopass autocompletion is sourced
|
||||
source <(gopass completion bash)
|
||||
|
||||
@@ -90,6 +89,10 @@ alias gpe='gopass edit'
|
||||
# To temporarily bypass an alias, we preceed the command with a \
|
||||
# EG: the ls command is aliased, but to use the normal ls command you would type \ls
|
||||
|
||||
alias v='nvim'
|
||||
alias vim='nvim'
|
||||
alias vi='nvim'
|
||||
|
||||
# Apt aliases
|
||||
alias install='sudo apt install'
|
||||
alias update='sudo apt update'
|
||||
@@ -123,21 +126,8 @@ alias .....='cd ../../../..'
|
||||
# cd into the old directory
|
||||
alias bd='cd "$OLDPWD"'
|
||||
|
||||
# Alias's for multiple directory listing commands
|
||||
# ls -> exa
|
||||
alias ls='exa --icons'
|
||||
alias la='ls -Alh' # show hidden files
|
||||
#alias ls='ls -aFh --color=always' # add colors and file type extensions
|
||||
alias lx='ls -lXBh' # sort by extension
|
||||
alias lk='ls -lSrh' # sort by size
|
||||
alias lc='ls -lcrh' # sort by change time
|
||||
alias lu='ls -lurh' # sort by access time
|
||||
alias lr='ls -lRh' # recursive ls
|
||||
alias lt='ls -ltrh' # sort by date
|
||||
alias lm='ls -alh |more' # pipe through 'more'
|
||||
alias lw='ls -xAh' # wide listing format
|
||||
alias ll='ls -Fls' # long listing format
|
||||
alias labc='ls -lap' #alphabetical sort
|
||||
alias ldir="ls -l | egrep '^d'" # directories only
|
||||
|
||||
# Search command line history
|
||||
alias h="history | grep "
|
||||
@@ -148,9 +138,6 @@ alias f="find . | grep "
|
||||
# Show current network connections to the server
|
||||
alias ipview="netstat -anpl | grep :80 | awk {'print \$5'} | cut -d\":\" -f1 | sort | uniq -c | sort -n | sed -e 's/^ *//' -e 's/ *\$//'"
|
||||
|
||||
# Show open ports
|
||||
alias openports='netstat -nape --inet'
|
||||
|
||||
# Alias's to show disk space and space used in a folder
|
||||
alias diskspace="du -S | sort -n -r |more"
|
||||
alias folders='du -h --max-depth=1'
|
||||
@@ -167,20 +154,29 @@ alias untar='tar -xvf'
|
||||
alias unbz2='tar -xvjf'
|
||||
alias ungz='tar -xvzf'
|
||||
|
||||
# Wget (keeps hsts files out of $HOME)
|
||||
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
|
||||
|
||||
# Translate
|
||||
alias tbr='trans :pt-BR'
|
||||
|
||||
|
||||
#######################################################
|
||||
# WORK
|
||||
#######################################################
|
||||
|
||||
# Wireguard
|
||||
alias wgup='sudo wg-quick up /etc/wireguard/wg0.conf'
|
||||
alias wgdown='sudo wg-quick down /etc/wireguard/wg0.conf'
|
||||
|
||||
# Work
|
||||
# SSH
|
||||
alias stork='ssh stork'
|
||||
alias mail='ssh mail'
|
||||
alias eel='ssh eel'
|
||||
|
||||
# Keychain
|
||||
alias keys='eval $(keychain --eval --quiet ry_ecdsa) && eval $(keychain --eval --quiet id_rsa)'
|
||||
|
||||
# Wget (keeps hsts files out of $HOME)
|
||||
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
|
||||
|
||||
alias tbr='trans :pt-BR'
|
||||
|
||||
#######################################################
|
||||
# SPECIAL FUNCTIONS
|
||||
@@ -267,14 +263,3 @@ PROMPT_COMMAND='__setprompt'
|
||||
#######################################################
|
||||
eval $(keychain --eval --quiet ry_ecdsa)
|
||||
eval $(keychain --eval --quiet id_rsa)
|
||||
|
||||
|
||||
|
||||
|
||||
# Automatically added by the Guix install script.
|
||||
if [ -n "$GUIX_ENVIRONMENT" ]; then
|
||||
if [[ $PS1 =~ (.*)"\\$" ]]; then
|
||||
PS1="${BASH_REMATCH[1]} [env]\\\$ "
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
100
.config/borgmatic/config.yml
Normal file
100
.config/borgmatic/config.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
location:
|
||||
source_directories:
|
||||
- /home/*
|
||||
repositories:
|
||||
- ssh://opal@server/data/opal/media/backups/laptop
|
||||
exclude_patterns:
|
||||
- /home/*/.cache
|
||||
- /home/*/.var
|
||||
- /home/*/.config/emacs
|
||||
- /home/*/.mozilla
|
||||
- /home/*/.thunderbird
|
||||
- /home/*/.w3m
|
||||
- /home/*/.ansible
|
||||
- /home/*/.keychain
|
||||
- /home/*/.pki
|
||||
|
||||
storage:
|
||||
encryption_passcommand: gopass show -o backups/laptop
|
||||
|
||||
retention:
|
||||
keep_daily: 7
|
||||
keep_weekly: 4
|
||||
keep_monthly: 6
|
||||
keep_yearly: 1
|
||||
|
||||
consistency:
|
||||
checks:
|
||||
- name: repository
|
||||
check_last: 3
|
||||
|
||||
hooks:
|
||||
before_backup:
|
||||
- echo "Starting a backup."
|
||||
after_backup:
|
||||
- echo "Finished a backup."
|
||||
on_error:
|
||||
- echo "Error during backup."
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ set $mod Mod4
|
||||
set $term alacritty
|
||||
|
||||
# Application Launcher
|
||||
#set $menu bemenu-run -i -l 5 -c --margin 500 --fn 'Hack Nerd Font 15'
|
||||
#set $menu bemenu-run -p Run: -l 10 -c -M 500 --fn 'Hack 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00'
|
||||
set $menu rofi -show
|
||||
|
||||
# Start a terminal
|
||||
@@ -170,9 +170,9 @@ bindsym $mod+t exec swaymsg input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" ev
|
||||
bindsym $mod+Shift+t exec swaymsg input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" events enabled
|
||||
|
||||
# Bookmarks
|
||||
bindsym $mod+Insert exec wtype $(grep -v '^#' ~/.local/share/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Hack 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)
|
||||
bindsym $mod+Insert exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Hack 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)
|
||||
|
||||
bindsym $mod+Shift+Insert exec bookmark-insert.sh
|
||||
bindsym $mod+Shift+Insert exec ~/.local/bin/bookmark_insert
|
||||
|
||||
# Notifications
|
||||
exec_always dunst
|
||||
@@ -247,10 +247,12 @@ input type:keyboard {
|
||||
repeat_rate 45
|
||||
}
|
||||
|
||||
# Disable trackpad by default
|
||||
input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" {
|
||||
events disabled
|
||||
}
|
||||
|
||||
# Set trackpoint sensitivity
|
||||
input 2:10:TPPS/2_Elan_TrackPoint pointer_accel 1.0
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
clipboard_text=$(wl-paste -p)
|
||||
bookmarks_file="$HOME/.local/share/bookmarks/bookmarks"
|
||||
|
||||
bookmark="$(wl-copy -o)"
|
||||
file="~/.local/share/bookmarks"
|
||||
# Make sure the bookmark file exists
|
||||
touch "$bookmarks_file"
|
||||
|
||||
# Trim leading and trailing whitespace from clipboard
|
||||
clipboard_text=$(echo "$clipboard_text" | xargs)
|
||||
|
||||
# Check if clipboard is not empty
|
||||
if [ -n "$clipboard_text" ]; then
|
||||
# Escape special characters for grep
|
||||
escaped_text=$(printf '%s\n' "$clipboard_text" | sed 's:[][\\/.^$*]:\\&:g')
|
||||
|
||||
if grep -Fxq "$escaped_text" "$bookmarks_file"; then
|
||||
# Entry already exists
|
||||
notify-send "Bookmark already exists" "$clipboard_text"
|
||||
else
|
||||
# Append the text to the bookmarks file
|
||||
echo "$clipboard_text" >> "$bookmarks_file"
|
||||
notify-send "Bookmark saved" "$clipboard_text"
|
||||
|
||||
sh "$HOME/.local/bin/bookmark_update"
|
||||
fi
|
||||
else
|
||||
notify-send "No text selected" "Please highlight some text to save as a bookmark."
|
||||
fi
|
||||
|
||||
echo "$bookmark" >> "$file"
|
||||
|
||||
24
.local/bin/bookmark_update
Executable file
24
.local/bin/bookmark_update
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Define the paths and repository
|
||||
bookmarks_file="$HOME/.local/share/bookmarks/bookmarks"
|
||||
repo_path="$HOME/.local/share/bookmarks"
|
||||
|
||||
# Pull the latest changes
|
||||
cd "$repo_path" || exit
|
||||
git pull origin master
|
||||
|
||||
# Check if the bookmarks file has changed
|
||||
if [ -n "$(git status --porcelain "$bookmarks_file")" ]; then
|
||||
# Add and commit the bookmarks file
|
||||
git add "$bookmarks_file"
|
||||
git commit -m "Update bookmarks file"
|
||||
|
||||
# Push the changes and log output
|
||||
#git push origin master
|
||||
|
||||
notify-send "Bookmarks updated" "Please push your changes."
|
||||
else
|
||||
notify-send "No changes" "No changes to the bookmarks file."
|
||||
fi
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
https://git.opal.sh
|
||||
https://rss.opal.sh
|
||||
https://landchad.net
|
||||
1630
.local/share/chars/emojis
Normal file
1630
.local/share/chars/emojis
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user