Compare commits
3 Commits
1080aa0e88
...
8042eacbc0
| Author | SHA1 | Date | |
|---|---|---|---|
| 8042eacbc0 | |||
| 786661b08e | |||
| 53ccea9dec |
54
.bashrc
54
.bashrc
@@ -72,7 +72,6 @@ PATH=$PATH:/var/lib/flatpak/app
|
|||||||
# GOPASS
|
# GOPASS
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
|
|
||||||
# Ensure gopass autocompletion is sourced
|
# Ensure gopass autocompletion is sourced
|
||||||
source <(gopass completion bash)
|
source <(gopass completion bash)
|
||||||
|
|
||||||
@@ -90,6 +89,11 @@ alias gpe='gopass edit'
|
|||||||
# To temporarily bypass an alias, we preceed the command with a \
|
# 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
|
# 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'
|
||||||
|
#comment
|
||||||
|
|
||||||
# Apt aliases
|
# Apt aliases
|
||||||
alias install='sudo apt install'
|
alias install='sudo apt install'
|
||||||
alias update='sudo apt update'
|
alias update='sudo apt update'
|
||||||
@@ -123,21 +127,8 @@ alias .....='cd ../../../..'
|
|||||||
# cd into the old directory
|
# cd into the old directory
|
||||||
alias bd='cd "$OLDPWD"'
|
alias bd='cd "$OLDPWD"'
|
||||||
|
|
||||||
# Alias's for multiple directory listing commands
|
# ls -> exa
|
||||||
alias ls='exa --icons'
|
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
|
# Search command line history
|
||||||
alias h="history | grep "
|
alias h="history | grep "
|
||||||
@@ -148,9 +139,6 @@ alias f="find . | grep "
|
|||||||
# Show current network connections to the server
|
# 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/ *\$//'"
|
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's to show disk space and space used in a folder
|
||||||
alias diskspace="du -S | sort -n -r |more"
|
alias diskspace="du -S | sort -n -r |more"
|
||||||
alias folders='du -h --max-depth=1'
|
alias folders='du -h --max-depth=1'
|
||||||
@@ -167,20 +155,29 @@ alias untar='tar -xvf'
|
|||||||
alias unbz2='tar -xvjf'
|
alias unbz2='tar -xvjf'
|
||||||
alias ungz='tar -xvzf'
|
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
|
# Wireguard
|
||||||
alias wgup='sudo wg-quick up /etc/wireguard/wg0.conf'
|
alias wgup='sudo wg-quick up /etc/wireguard/wg0.conf'
|
||||||
alias wgdown='sudo wg-quick down /etc/wireguard/wg0.conf'
|
alias wgdown='sudo wg-quick down /etc/wireguard/wg0.conf'
|
||||||
|
|
||||||
# Work
|
# SSH
|
||||||
alias stork='ssh stork'
|
alias stork='ssh stork'
|
||||||
alias mail='ssh mail'
|
alias mail='ssh mail'
|
||||||
alias eel='ssh eel'
|
alias eel='ssh eel'
|
||||||
|
|
||||||
|
# Keychain
|
||||||
alias keys='eval $(keychain --eval --quiet ry_ecdsa) && eval $(keychain --eval --quiet id_rsa)'
|
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
|
# SPECIAL FUNCTIONS
|
||||||
@@ -267,14 +264,3 @@ PROMPT_COMMAND='__setprompt'
|
|||||||
#######################################################
|
#######################################################
|
||||||
eval $(keychain --eval --quiet ry_ecdsa)
|
eval $(keychain --eval --quiet ry_ecdsa)
|
||||||
eval $(keychain --eval --quiet id_rsa)
|
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
|
|
||||||
|
|
||||||
|
|||||||
37
.config/borgmatic/config.yml
Normal file
37
.config/borgmatic/config.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
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
|
set $term alacritty
|
||||||
|
|
||||||
# Application Launcher
|
# 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
|
set $menu rofi -show
|
||||||
|
|
||||||
# Start a terminal
|
# 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
|
bindsym $mod+Shift+t exec swaymsg input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" events enabled
|
||||||
|
|
||||||
# Bookmarks
|
# 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
|
# Notifications
|
||||||
exec_always dunst
|
exec_always dunst
|
||||||
@@ -247,10 +247,12 @@ input type:keyboard {
|
|||||||
repeat_rate 45
|
repeat_rate 45
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Disable trackpad by default
|
||||||
input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" {
|
input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" {
|
||||||
events disabled
|
events disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set trackpoint sensitivity
|
||||||
input 2:10:TPPS/2_Elan_TrackPoint pointer_accel 1.0
|
input 2:10:TPPS/2_Elan_TrackPoint pointer_accel 1.0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
clipboard_text=$(wl-paste -p)
|
||||||
|
bookmarks_file="$HOME/.local/share/bookmarks/bookmarks"
|
||||||
|
|
||||||
bookmark="$(wl-copy -o)"
|
# Make sure the bookmark file exists
|
||||||
file="~/.local/share/bookmarks"
|
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