init
This commit is contained in:
commit
6d87ac8ba1
139 changed files with 7604 additions and 0 deletions
4
.git-crypt/.gitattributes
vendored
Normal file
4
.git-crypt/.gitattributes
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Do not edit this file. To specify the files to encrypt, create your own
|
||||
# .gitattributes file in the directory where your files are.
|
||||
* !filter !diff
|
||||
*.gpg binary
|
Binary file not shown.
11
.gitattributes
vendored
Normal file
11
.gitattributes
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Sensitive files that should be encrypted with git-crypt
|
||||
ssh/.ssh/config filter=git-crypt diff=git-crypt
|
||||
gnupg/.gnupg/* filter=git-crypt diff=git-crypt
|
||||
npm/.config/npm/npmrc filter=git-crypt diff=git-crypt
|
||||
zsh/.config/zsh/zsh_history* filter=git-crypt diff=git-crypt
|
||||
config/.config/sdm-ui.yaml filter=git-crypt diff=git-crypt
|
||||
config/.config/ngrok/ngrok.yml filter=git-crypt diff=git-crypt
|
||||
|
||||
# Add any new paths for sensitive files in your new modules
|
||||
# For example, if you have API tokens in new locations:
|
||||
# mise/.config/mise/config.toml filter=git-crypt diff=git-crypt
|
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
bin/.bin/code
|
||||
bin/.bin/sdm-ui
|
||||
bin/.bin/goq
|
||||
bin/.bin/rop
|
||||
|
||||
local-bin/.local/bin/mise
|
21
.stow-global-ignore
Normal file
21
.stow-global-ignore
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Comments and blank lines are allowed.
|
||||
|
||||
RCS
|
||||
.+,v
|
||||
|
||||
CVS
|
||||
\.\#.+ # CVS conflict files / emacs lock files
|
||||
\.cvsignore
|
||||
|
||||
\.git
|
||||
\.gitignore
|
||||
\.gitattributes
|
||||
|
||||
^/README.*
|
||||
^/LICENSE.*
|
||||
^/COPYING
|
||||
|
||||
# Custom ignores for dotfiles
|
||||
\.DS_Store
|
||||
README.md
|
||||
LICENSE
|
4
.stowrc
Normal file
4
.stowrc
Normal file
|
@ -0,0 +1,4 @@
|
|||
--target=${HOME}
|
||||
--dir=${HOME}/dotfiles
|
||||
--verbose
|
||||
--no-folding
|
39
README.md
Normal file
39
README.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Dotfiles
|
||||
|
||||
Personal dotfiles for my Linux system running Sway (Wayland).
|
||||
|
||||
## Overview
|
||||
|
||||
- **Window Management**: Sway, Waybar, Swayidle
|
||||
- **Terminals**: Kitty, WezTerm
|
||||
- **Development**: Neovim, Git, Tmux, npm, mise
|
||||
- **Shell**: Zsh with custom functions, aliases, keymaps
|
||||
- **Launchers**: Rofi, Fuzzel
|
||||
|
||||
## Requirements
|
||||
|
||||
- stow
|
||||
- git-crypt (for encrypted files)
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Clone repository
|
||||
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
|
||||
# Decrypt sensitive files (if you have access)
|
||||
git-crypt unlock /path/to/key
|
||||
|
||||
# Install everything
|
||||
stow */
|
||||
|
||||
# Or install individual modules
|
||||
stow zsh
|
||||
stow nvim
|
||||
stow sway
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
13
applications/.local/share/applications/custom/DBeaver.desktop
Executable file
13
applications/.local/share/applications/custom/DBeaver.desktop
Executable file
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=DBeaver
|
||||
GenericName=SQL Database Client
|
||||
Comment=Universal Database Manager and SQL Client.
|
||||
Exec=bash -c "GDK_BACKEND=x11 GTK_THEME=Raleigh /usr/bin/dbeaver"
|
||||
Categories=IDE;Development
|
||||
WM_CLASS=DBeaver
|
||||
StartupWMClass=DBeaver
|
||||
StartupNotify=true
|
||||
Icon=/usr/share/pixmaps/dbeaver.png
|
11
applications/.local/share/applications/custom/Leapp.desktop
Executable file
11
applications/.local/share/applications/custom/Leapp.desktop
Executable file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=Leapp
|
||||
GenericName=AWS Profile Manager
|
||||
Exec=/home/forbi/.bin/leapp.sh
|
||||
Categories=IDE;Development
|
||||
StartupWMClass=Leapp
|
||||
StartupNotify=true
|
||||
Icon=/home/forbi/Downloads/leapp.svg
|
11
applications/.local/share/applications/custom/Lens.desktop
Normal file
11
applications/.local/share/applications/custom/Lens.desktop
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Lens
|
||||
GenericName=Kubernetes IDE
|
||||
Comment=The Kubernetes IDE
|
||||
Icon=/home/forbi/.local/share/applications/custom/lens.png
|
||||
Exec=/home/forbi/.bin/openlens %U
|
||||
Categories=System;
|
||||
StartupNotify=true
|
||||
StartupWMClass=Lens
|
||||
MimeType=x-scheme-handler/lens;
|
9
applications/.local/share/applications/custom/NoSQL.desktop
Executable file
9
applications/.local/share/applications/custom/NoSQL.desktop
Executable file
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=NoSQL Booster
|
||||
Exec=/home/forbi/.bin/nosql.sh
|
||||
Icon=~/.local/share/applications/custom/mongo.png
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=0
|
||||
|
11
applications/.local/share/applications/custom/Recorder.desktop
Executable file
11
applications/.local/share/applications/custom/Recorder.desktop
Executable file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=Screen Recorder
|
||||
GenericName=Screen Recorder
|
||||
Exec= /home/forbi/.bin/wlrecord.sh -s
|
||||
Categories=Utility;Application;
|
||||
StartupWMClass=Screen Recorder
|
||||
StartupNotify=true
|
||||
Icon=/usr/share/icons/ePapirus/24x24/actions/kdenlive-hide-video.svg
|
11
applications/.local/share/applications/custom/Redis.desktop
Executable file
11
applications/.local/share/applications/custom/Redis.desktop
Executable file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=Redis
|
||||
GenericName=Redis Viewer
|
||||
Exec=/home/forbi/.bin/redis.sh
|
||||
Categories=IDE;Development
|
||||
StartupWMClass=Redis
|
||||
StartupNotify=true
|
||||
Icon=/home/forbi/.local/share/applications/custom/redis.png
|
10
applications/.local/share/applications/custom/Syncthing.desktop
Executable file
10
applications/.local/share/applications/custom/Syncthing.desktop
Executable file
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=Syncthing UI
|
||||
GenericName=Syncthing UI
|
||||
Exec=xdg-open http://localhost:8384
|
||||
Categories=Network;FileTransfer;
|
||||
StartupNotify=true
|
||||
Icon=syncthing
|
BIN
applications/.local/share/applications/custom/lens.jpg
Normal file
BIN
applications/.local/share/applications/custom/lens.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
applications/.local/share/applications/custom/lens.png
Normal file
BIN
applications/.local/share/applications/custom/lens.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
BIN
applications/.local/share/applications/custom/mongo.png
Normal file
BIN
applications/.local/share/applications/custom/mongo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Kitty+Neovim
|
||||
Comment=Open Neovim in Kitty terminal
|
||||
Exec=kitty -e nvim %F
|
||||
Icon=nvim
|
||||
Terminal=false
|
||||
Categories=Utility;TextEditor;
|
||||
MimeType=text/plain;
|
BIN
applications/.local/share/applications/custom/redis.png
Normal file
BIN
applications/.local/share/applications/custom/redis.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,18 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Sublime Merge
|
||||
GenericName=Git Client
|
||||
Comment=Sublime Merge is a Git client, from the makers of Sublime Text
|
||||
Exec=/home/forbi/.bin/sm.sh %F
|
||||
Terminal=false
|
||||
MimeType=text/plain;
|
||||
Icon=sublime-merge
|
||||
Categories=Development;
|
||||
StartupNotify=true
|
||||
Actions=new-window;
|
||||
|
||||
[Desktop Action new-window]
|
||||
Name=New Window
|
||||
Exec=/home/forbi/.bin/sm --launch-or-new-window
|
||||
OnlyShowIn=Unity;
|
126
bin/.bin/base16-rose-pine-scheme.sh
Executable file
126
bin/.bin/base16-rose-pine-scheme.sh
Executable file
|
@ -0,0 +1,126 @@
|
|||
#!/bin/sh
|
||||
# base16-shell (https://github.com/chriskempson/base16-shell)
|
||||
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
|
||||
# Rosé Pine Dawn scheme by Emilia Dunfelt <sayhi@dunfelt.se>
|
||||
|
||||
color00="19/17/24" # Base 00 - Black
|
||||
color01="eb/6f/92" # Base 08 - Red
|
||||
color02="31/74/8f" # Base 0B - Green
|
||||
color03="eb/bc/ba" # Base 0A - Yellow
|
||||
color04="c4/a7/e7" # Base 0D - Blue
|
||||
color05="f6/c1/77" # Base 0E - Magenta
|
||||
color06="9c/cf/d8" # Base 0C - Cyan
|
||||
color07="e0/de/f4" # Base 05 - White
|
||||
color08="90/8c/aa" # Base 03 - Bright Black
|
||||
color09=$color01 # Base 08 - Bright Red
|
||||
color10=$color02 # Base 0B - Bright Green
|
||||
color11=$color03 # Base 0A - Bright Yellow
|
||||
color12=$color04 # Base 0D - Bright Blue
|
||||
color13=$color05 # Base 0E - Bright Magenta
|
||||
color14=$color06 # Base 0C - Bright Cyan
|
||||
color15="52/4f/67" # Base 07 - Bright White
|
||||
color16="f6/c1/77" # Base 09
|
||||
color17="eb/6f/92" # Base 0F
|
||||
color18="1f/1d/2e" # Base 01
|
||||
color19="26/23/3a" # Base 02
|
||||
color20="6e/6a/86" # Base 03
|
||||
color21="52/4f/67" # Base 04
|
||||
color_foreground="e0/de/f4" # Base 05
|
||||
color_background="19/17/24" # Base 00
|
||||
|
||||
if [ -n "$TMUX" ]; then
|
||||
# Tell tmux to pass the escape sequences through
|
||||
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
|
||||
put_template() { printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' $@; }
|
||||
put_template_var() { printf '\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' $@; }
|
||||
put_template_custom() { printf '\033Ptmux;\033\033]%s%s\033\033\\\033\\' $@; }
|
||||
elif [ "${TERM%%[-.]*}" = "screen" ]; then
|
||||
# GNU screen (screen, screen-256color, screen-256color-bce)
|
||||
put_template() { printf '\033P\033]4;%d;rgb:%s\007\033\\' $@; }
|
||||
put_template_var() { printf '\033P\033]%d;rgb:%s\007\033\\' $@; }
|
||||
put_template_custom() { printf '\033P\033]%s%s\007\033\\' $@; }
|
||||
elif [ "${TERM%%-*}" = "linux" ]; then
|
||||
put_template() { [ $1 -lt 16 ] && printf "\e]P%x%s" $1 $(echo $2 | sed 's/\///g'); }
|
||||
put_template_var() { true; }
|
||||
put_template_custom() { true; }
|
||||
else
|
||||
put_template() { printf '\033]4;%d;rgb:%s\033\\' $@; }
|
||||
put_template_var() { printf '\033]%d;rgb:%s\033\\' $@; }
|
||||
put_template_custom() { printf '\033]%s%s\033\\' $@; }
|
||||
fi
|
||||
|
||||
# 16 color space
|
||||
put_template 0 $color00
|
||||
put_template 1 $color01
|
||||
put_template 2 $color02
|
||||
put_template 3 $color03
|
||||
put_template 4 $color04
|
||||
put_template 5 $color05
|
||||
put_template 6 $color06
|
||||
put_template 7 $color07
|
||||
put_template 8 $color08
|
||||
put_template 9 $color09
|
||||
put_template 10 $color10
|
||||
put_template 11 $color11
|
||||
put_template 12 $color12
|
||||
put_template 13 $color13
|
||||
put_template 14 $color14
|
||||
put_template 15 $color15
|
||||
|
||||
# 256 color space
|
||||
put_template 16 $color16
|
||||
put_template 17 $color17
|
||||
put_template 18 $color18
|
||||
put_template 19 $color19
|
||||
put_template 20 $color20
|
||||
put_template 21 $color21
|
||||
|
||||
# foreground / background / cursor color
|
||||
if [ -n "$ITERM_SESSION_ID" ]; then
|
||||
# iTerm2 proprietary escape codes
|
||||
put_template_custom Pg 575279 # foreground
|
||||
put_template_custom Ph faf4ed # background
|
||||
put_template_custom Pi 575279 # bold color
|
||||
put_template_custom Pj f2e9de # selection color
|
||||
put_template_custom Pk 575279 # selected text color
|
||||
put_template_custom Pl 575279 # cursor
|
||||
put_template_custom Pm faf4ed # cursor text
|
||||
else
|
||||
put_template_var 10 $color_foreground
|
||||
if [ "$BASE16_SHELL_SET_BACKGROUND" != false ]; then
|
||||
put_template_var 11 $color_background
|
||||
if [ "${TERM%%-*}" = "rxvt" ]; then
|
||||
put_template_var 708 $color_background # internal border (rxvt)
|
||||
fi
|
||||
fi
|
||||
put_template_custom 12 ";7" # cursor (reverse video)
|
||||
fi
|
||||
|
||||
# clean up
|
||||
unset -f put_template
|
||||
unset -f put_template_var
|
||||
unset -f put_template_custom
|
||||
unset color00
|
||||
unset color01
|
||||
unset color02
|
||||
unset color03
|
||||
unset color04
|
||||
unset color05
|
||||
unset color06
|
||||
unset color07
|
||||
unset color08
|
||||
unset color09
|
||||
unset color10
|
||||
unset color11
|
||||
unset color12
|
||||
unset color13
|
||||
unset color14
|
||||
unset color15
|
||||
unset color16
|
||||
unset color17
|
||||
unset color18
|
||||
unset color19
|
||||
unset color20
|
||||
unset color21
|
||||
unset color_foreground
|
||||
unset color_background
|
15
bin/.bin/code.sh
Executable file
15
bin/.bin/code.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
MODULE_URL="mzunino.com.uy/go/code"
|
||||
BINARY_NAME="code"
|
||||
|
||||
TARGET_DIR="$HOME/.bin"
|
||||
CODE_PATH="$TARGET_DIR/$BINARY_NAME"
|
||||
if [ ! -x "$CODE_PATH" ]; then
|
||||
notify-send "Installing $BINARY_NAME" "Installing from $MODULE_URL..."
|
||||
GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@latest" || {
|
||||
notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
|
||||
exit 1
|
||||
}
|
||||
notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
|
||||
fi
|
||||
exec "$CODE_PATH" "$@"
|
32
bin/.bin/fix-git.sh
Executable file
32
bin/.bin/fix-git.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
OLD_URL=$(git remote get-url origin)
|
||||
if [[ $OLD_URL == "https://github.com"* ]]; then
|
||||
# Modified sed pattern to better handle GitHub URLs
|
||||
USER_REPO=$(echo $OLD_URL | sed -n 's|https://github.com/\([^/]*/[^/]*\)|\1|p')
|
||||
if [ -z "$USER_REPO" ]; then
|
||||
echo "Error: Could not extract user/repo from URL: $OLD_URL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Remove any trailing .git if present and add it back consistently
|
||||
USER_REPO=$(echo $USER_REPO | sed 's/\.git$//')
|
||||
NEW_URL="git@github.com:${USER_REPO}.git"
|
||||
|
||||
echo "Old URL: $OLD_URL"
|
||||
echo "New URL: $NEW_URL"
|
||||
|
||||
# Update the remote URL to use SSH
|
||||
git remote set-url origin "$NEW_URL"
|
||||
|
||||
# Verify the change
|
||||
CURRENT_URL=$(git remote get-url origin)
|
||||
if [ "$CURRENT_URL" = "$NEW_URL" ]; then
|
||||
echo "Successfully updated remote URL to use SSH."
|
||||
else
|
||||
echo "Error: Failed to update remote URL."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Remote URL is already using SSH or a different protocol: $OLD_URL"
|
||||
fi
|
53
bin/.bin/fuzzel.lua
Normal file
53
bin/.bin/fuzzel.lua
Normal file
|
@ -0,0 +1,53 @@
|
|||
return {
|
||||
selector_cmd = function()
|
||||
return {
|
||||
command = "rofi",
|
||||
args = { "-dmenu", "-p", "Project: " },
|
||||
}
|
||||
end,
|
||||
editor_cmd = function(path, class)
|
||||
local dirName = path:match("([^/]+)$")
|
||||
-- Sanitize dirName for tmux session name (remove special chars)
|
||||
local tmuxSession = dirName:gsub("[^a-zA-Z0-9_]", "_")
|
||||
|
||||
local tmuxCmd = string.format(
|
||||
[[ tmux has-session -t %s 2>/dev/null && tmux attach -t %s || tmux new -c %s -s %s 'nvim %s' \; split-window -h -c %s ]],
|
||||
tmuxSession,
|
||||
tmuxSession,
|
||||
path,
|
||||
tmuxSession,
|
||||
path,
|
||||
path
|
||||
)
|
||||
return {
|
||||
command = "kitty",
|
||||
args = {
|
||||
"-d",
|
||||
path,
|
||||
"-T",
|
||||
class,
|
||||
"--class",
|
||||
class,
|
||||
"sh",
|
||||
"-c",
|
||||
tmuxCmd,
|
||||
},
|
||||
}
|
||||
end,
|
||||
format_project_title = function(path)
|
||||
-- Extract project name for better display
|
||||
-- local projectName = path:match("([^/]+)$") or path
|
||||
return "📘 " .. path
|
||||
end,
|
||||
|
||||
extract_path_from_title = function(title)
|
||||
-- Return back the path: 📘 work/project_1 -> work/project_1
|
||||
return title:gsub("^📘%s*", ""):gsub("\n$", "")
|
||||
end,
|
||||
|
||||
-- Add error handling function
|
||||
handle_error = function(err)
|
||||
io.stderr:write("Error: " .. tostring(err) .. "\n")
|
||||
return false
|
||||
end,
|
||||
}
|
15
bin/.bin/goq.sh
Executable file
15
bin/.bin/goq.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
MODULE_URL="github.com/marianozunino/goq"
|
||||
BINARY_NAME="goq"
|
||||
|
||||
TARGET_DIR="$HOME/.bin"
|
||||
CODE_PATH="$TARGET_DIR/$BINARY_NAME"
|
||||
if [ ! -x "$CODE_PATH" ]; then
|
||||
notify-send "Installing $BINARY_NAME" "Installing from $MODULE_URL..."
|
||||
GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@latest" || {
|
||||
notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
|
||||
exit 1
|
||||
}
|
||||
notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
|
||||
fi
|
||||
exec "$CODE_PATH" "$@"
|
20
bin/.bin/leapp.sh
Executable file
20
bin/.bin/leapp.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
bin=~/.bin/leapp
|
||||
latest_version_url="https://api.github.com/repos/noovolari/leapp/releases/latest"
|
||||
|
||||
# Function to compare version numbers
|
||||
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
|
||||
|
||||
# If leapp binary is not found or if there is a newer version, download it
|
||||
if [ ! -f $bin ] || version_gt "$(curl -s $latest_version_url | grep -oP '"tag_name": "\K(.*)(?=")')" "$(basename $bin | grep -oP '\d+\.\d+\.\d+')"; then
|
||||
notify-send -u normal "⏬ Leapp" "Checking for updates..."
|
||||
url="https://asset.noovolari.com/latest/Leapp-appImage.zip"
|
||||
wget -q -O /tmp/leapp.AppImage "$url"
|
||||
unzip /tmp/leapp.AppImage -d /tmp
|
||||
mv /tmp/release/Leapp* $bin
|
||||
chmod +x $bin
|
||||
fi
|
||||
|
||||
# Execute leapp
|
||||
$bin -f -i $1 -o $2
|
25
bin/.bin/lock.sh
Executable file
25
bin/.bin/lock.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
swaylock -f \
|
||||
--screenshots \
|
||||
--clock \
|
||||
--indicator \
|
||||
--indicator-radius 150 \
|
||||
--indicator-thickness 7 \
|
||||
--font-size 24 \
|
||||
--effect-blur 7x5 \
|
||||
--effect-vignette 0.5:0.5 \
|
||||
--ring-color 9ccfd8 \
|
||||
--ring-ver-color f6c177 \
|
||||
--ring-wrong-color eb6f92 \
|
||||
--key-hl-color eb6f92 \
|
||||
--line-color 00000000 \
|
||||
--inside-color 191724aa \
|
||||
--inside-ver-color 191724aa \
|
||||
--inside-wrong-color 191724aa \
|
||||
--separator-color 00000000 \
|
||||
--text-color e0def4 \
|
||||
--text-ver-color e0def4 \
|
||||
--text-wrong-color e0def4 \
|
||||
--text-caps-lock-color f6c177 \
|
||||
--grace 2 \
|
||||
--fade-in 0.2
|
14
bin/.bin/nosql.sh
Executable file
14
bin/.bin/nosql.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
bin=$HOME/.bin/nosql
|
||||
|
||||
# if nosql binary is not found, download it
|
||||
if [ ! -f $bin ]; then
|
||||
echo "Downloading NoSql binary..."
|
||||
url="https://s3.nosqlbooster.com/download/releasesv7/nosqlbooster4mongo-7.1.17.AppImage"
|
||||
wget -q -O $bin $url
|
||||
chmod +x $bin
|
||||
fi
|
||||
|
||||
# execute leapp
|
||||
$bin
|
6
bin/.bin/obsidian-launcher
Executable file
6
bin/.bin/obsidian-launcher
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env sh
|
||||
swaymsg '[class="obsidian"]' focus && exit
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
obsidian && swaymsg '[class="obsidian"]' focus >/dev/null 2>&1
|
||||
fi
|
16
bin/.bin/openlens.sh
Executable file
16
bin/.bin/openlens.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
bin=~/.bin/openlens
|
||||
|
||||
repo=MuhammedKalkan/OpenLens
|
||||
# if redis binary is not found, download it
|
||||
if [ ! -f $bin ]; then
|
||||
echo "Downloading openlens binary..."
|
||||
filename=$(curl -s https://api.github.com/repos/$repo/releases/latest | jq -r '.assets[].name' | grep "x86_64.AppImage$")
|
||||
fileurl=$(curl -s https://api.github.com/repos/$repo/releases/latest | jq -r --arg filename $filename '.assets[] | select(.name == $filename) | .browser_download_url')
|
||||
wget -q -O $bin $fileurl
|
||||
chmod +x $bin
|
||||
fi
|
||||
|
||||
# execute leapp
|
||||
$bin -f -i $1 -o $2
|
35
bin/.bin/randwall
Executable file
35
bin/.bin/randwall
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Kill any existing swaybg or feh instances
|
||||
pkill swaybg
|
||||
pkill feh
|
||||
|
||||
# Function to set wallpaper using swaybg on Sway
|
||||
set_wallpaper_sway() {
|
||||
swaymsg -t get_outputs -r | jq -r ".[].name" | parallel 'swaybg -o {} -i $(find ~/Pictures/* -type f | shuf -n 1) &'
|
||||
}
|
||||
|
||||
# Function to set wallpaper using swaybg on Hyprland
|
||||
set_wallpaper_hyprland() {
|
||||
hyprctl monitors -j | jq -r ".[].name" | parallel 'swaybg -o {} -i $(find ~/Pictures/* -type f | shuf -n 1) &'
|
||||
}
|
||||
|
||||
# Function to set wallpaper using feh on i3
|
||||
set_wallpaper_i3() {
|
||||
# Count number of connected monitors
|
||||
monitor_count=$(xrandr --query | grep " connected" | wc -l)
|
||||
|
||||
# Get random wallpapers equal to monitor count
|
||||
readarray -t wallpapers < <(find ~/Pictures/* -type f | shuf -n "$monitor_count")
|
||||
|
||||
# Construct the feh command with multiple --bg-fill arguments
|
||||
cmd="feh"
|
||||
for wallpaper in "${wallpapers[@]}"; do
|
||||
cmd+=" --bg-fill '$wallpaper'"
|
||||
done
|
||||
|
||||
# Execute the command
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
set_wallpaper_sway
|
50
bin/.bin/redis.sh
Executable file
50
bin/.bin/redis.sh
Executable file
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Define paths
|
||||
bin_dir=~/.bin
|
||||
bin_file="${bin_dir}/redis"
|
||||
|
||||
# Create directory if it doesn't exist
|
||||
mkdir -p "${bin_dir}"
|
||||
|
||||
# Set current working directory
|
||||
cd "${bin_dir}"
|
||||
|
||||
if [ ! -f "${bin_file}" ]; then
|
||||
notify-send -u normal "⏬ Redis Desktop Manager" "Downloading..."
|
||||
|
||||
# Get latest release info and parse with proper JSON handling
|
||||
release_info=$(curl -s https://api.github.com/repos/qishibo/AnotherRedisDesktopManager/releases/latest)
|
||||
|
||||
# Determine system architecture
|
||||
arch=$(uname -m)
|
||||
if [ "${arch}" = "x86_64" ]; then
|
||||
arch_pattern="x86_64"
|
||||
elif [ "${arch}" = "aarch64" ]; then
|
||||
arch_pattern="arm64"
|
||||
else
|
||||
echo "Unsupported architecture: ${arch}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find appropriate AppImage for this architecture
|
||||
filename=$(echo "${release_info}" | jq -r ".assets[].name" | grep "AppImage" | grep "${arch_pattern}")
|
||||
echo "Selected filename: ${filename}"
|
||||
|
||||
# Get download URL
|
||||
fileurl=$(echo "${release_info}" | jq -r --arg filename "${filename}" '.assets[] | select(.name == $filename) | .browser_download_url')
|
||||
echo "Download URL: ${fileurl}"
|
||||
|
||||
# Download and make executable
|
||||
if [ -n "${fileurl}" ] && [ "${fileurl}" != "null" ]; then
|
||||
wget -q --show-progress -O "${bin_file}" "${fileurl}"
|
||||
chmod +x "${bin_file}"
|
||||
echo "Successfully downloaded Redis Desktop Manager"
|
||||
else
|
||||
echo "Failed to find download URL for architecture: ${arch}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Execute with parameters if provided
|
||||
"${bin_file}" -f ${1:+"-i"} ${1:+"$1"} ${2:+"-o"} ${2:+"$2"}
|
15
bin/.bin/rop.sh
Executable file
15
bin/.bin/rop.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
GO_PACKAGE="github.com/marianozunino/rop"
|
||||
BINARY_NAME="rop"
|
||||
|
||||
TARGET_DIR="$HOME/.bin"
|
||||
CODE_PATH="$TARGET_DIR/$BINARY_NAME"
|
||||
if [ ! -x "$CODE_PATH" ]; then
|
||||
notify-send "Installing $BINARY_NAME" "Installing from $MODULE_URL..."
|
||||
GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@latest" || {
|
||||
notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
|
||||
exit 1
|
||||
}
|
||||
notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
|
||||
fi
|
||||
exec "$CODE_PATH" "$@"
|
7
bin/.bin/screenshot-upload
Executable file
7
bin/.bin/screenshot-upload
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
file=/tmp/$(date "+%Y%m%d-%H%M%S")_screenshot.png
|
||||
|
||||
grim -g "$(slurp)" "$file" &&
|
||||
satty --filename "$file" --fullscreen &&
|
||||
yad --title="Upload?" --text="Upload image?" --image="dialog-question" --default-cancel &&
|
||||
curl -F "file=@$file" https://drop.mz.uy | xargs xdg-open
|
15
bin/.bin/sdm-ui.sh
Executable file
15
bin/.bin/sdm-ui.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
MODULE_URL="github.com/marianozunino/sdm-ui"
|
||||
BINARY_NAME="sdm-ui"
|
||||
|
||||
TARGET_DIR="$HOME/.bin"
|
||||
CODE_PATH="$TARGET_DIR/$BINARY_NAME"
|
||||
if [ ! -x "$CODE_PATH" ]; then
|
||||
notify-send "Installing $BINARY_NAME" "Installing from $MODULE_URL..."
|
||||
GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@latest" || {
|
||||
notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
|
||||
exit 1
|
||||
}
|
||||
notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
|
||||
fi
|
||||
exec "$CODE_PATH" "$@"
|
23
bin/.bin/sm.sh
Executable file
23
bin/.bin/sm.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
URL=$(curl https://www.sublimemerge.com/download_thanks?target=x64-tar#direct-downloads | grep -oP 'https://download.sublimetext.com/sublime_merge_build_\d+_x64.tar.xz' | head -n 1)
|
||||
VERSION=$(echo $URL | grep -oP '\d+' | head -n 1)
|
||||
FILENAME=sublime_merge_build_"$VERSION"_x64.tar.xz
|
||||
bin=~/.bin/sm
|
||||
|
||||
# set current working directory to ~/.bin
|
||||
cd ~/.bin
|
||||
|
||||
# if FILENAME exists, then exit
|
||||
if [ ! -f $FILENAME ]; then
|
||||
notify-send -u normal "⏬ Sublime Merge" "Updating to version $VERSION"
|
||||
# wget only if file does not exist
|
||||
wget -nc $URL
|
||||
tar -xvf $FILENAME
|
||||
fi
|
||||
|
||||
if [ ! -f $bin ]; then
|
||||
ln -fs $PWD/sublime_merge/sublime_merge $bin
|
||||
fi
|
||||
|
||||
# run sm
|
||||
$bin
|
62
bin/.bin/vmrss
Executable file
62
bin/.bin/vmrss
Executable file
|
@ -0,0 +1,62 @@
|
|||
#!/usr/bin/env bash
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <pid>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function print_vmrss() {
|
||||
declare -a arr
|
||||
arr=("$1" 0)
|
||||
total=0
|
||||
|
||||
while [ ${#arr[@]} -gt 0 ]; do
|
||||
|
||||
# remove last element
|
||||
space=${arr[${#arr[@]}-1]}
|
||||
unset arr[${#arr[@]}-1]
|
||||
pid=${arr[${#arr[@]}-1]}
|
||||
unset arr[${#arr[@]}-1]
|
||||
|
||||
[ -d "/proc/$pid" ] || continue
|
||||
|
||||
GREP_OPTS=${GREP_OPTS:-"
|
||||
--color=auto
|
||||
--exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}
|
||||
"}
|
||||
mem=$(grep $GREP_OPTS VmRSS /proc/$pid/status \
|
||||
| grep $GREP_OPTS -o '[0-9]\+' \
|
||||
| awk '{print $1/1024}')
|
||||
#Add decimals to total
|
||||
total=$(echo $mem+$total | bc)
|
||||
|
||||
# name of process
|
||||
name=$(ps -p $pid -o comm=)
|
||||
|
||||
printf "%${space}s%s($pid): $mem MB\n" '' "$name"
|
||||
|
||||
# get children
|
||||
children=$(pgrep -P $pid)
|
||||
|
||||
# add children to array
|
||||
for child in $children; do
|
||||
arr+=("$child" $((space+2)))
|
||||
done
|
||||
done
|
||||
printf "Total: $total MB\n"
|
||||
}
|
||||
|
||||
# check VMRSS_MONITOR = 1
|
||||
if [ ! -z "$VMRSS_MONITOR" ]; then
|
||||
while true; do
|
||||
if ps -p $1 > /dev/null
|
||||
then
|
||||
print_vmrss $1
|
||||
sleep 0.5
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
print_vmrss $1
|
||||
else
|
||||
print_vmrss $1
|
||||
fi
|
11
bin/.bin/waybar.sh
Executable file
11
bin/.bin/waybar.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
CONFIG_FILES="$HOME/.config/waybar/config.jsonc $HOME/.config/waybar/style.css"
|
||||
|
||||
trap "killall waybar" EXIT
|
||||
|
||||
while true; do
|
||||
waybar &
|
||||
inotifywait -e create,modify $CONFIG_FILES
|
||||
killall waybar
|
||||
done
|
BIN
bin/.bin/wlrecord.sh
Executable file
BIN
bin/.bin/wlrecord.sh
Executable file
Binary file not shown.
49
config/.config/env
Executable file
49
config/.config/env
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh
|
||||
export EDITOR="nvim"
|
||||
export TERMINAL="kitty"
|
||||
export LANG=en_US.UTF-8
|
||||
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
|
||||
export XDG_CACHE_HOME=${XDG_CACHE_HOME:-~/.cache}
|
||||
export XDG_DATA_HOME=${XDG_DATA_HOME:-~/.local/share}
|
||||
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-~/.xdg}
|
||||
export XDG_STATE_HOME=${XDG_STATE_HOME:-~/.local/state}
|
||||
export ZDOTDIR=${ZDOTDIR:-$XDG_CONFIG_HOME/zsh}
|
||||
export WAKATIME_HOME=$XDG_CONFIG_HOME/wakatime
|
||||
export ZSH_WAKATIME_BIN=$XDG_CONFIG_HOME/wakatime/.wakatime/wakatime-cli
|
||||
export W3M_DIR=$XDG_DATA_HOME/w3m
|
||||
export RANDFILE=$XDG_CACHE_HOME/.rnd
|
||||
export SOLARGRAPH_CACHE=$XDG_CACHE_HOME/solargraph
|
||||
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
|
||||
export NODE_REPL_HISTORY=$XDG_DATA_HOME/node_repl_history
|
||||
export GRADLE_USER_HOME=$XDG_DATA_HOME/gradle
|
||||
export GOPATH=$XDG_DATA_HOME/go
|
||||
export DOCKER_CONFIG=$XDG_CONFIG_HOME/docker
|
||||
export CARGO_HOME=$XDG_DATA_HOME/cargo
|
||||
# bash history
|
||||
export HISTFILE=${XDG_STATE_HOME}/bash/history
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
|
||||
export WGETRC="$XDG_CONFIG_HOME/wgetrc"
|
||||
export JAVA_HOME="/usr/lib/jvm/default"
|
||||
export BROWSER=zen-browser
|
||||
unset SSH_AGENT_PID
|
||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
fi
|
||||
export GNUHOME="$XDG_DATA_HOME/gnupg"
|
||||
export GPG_TTY=$(tty)
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
|
||||
# Wayland/Sway specific environment variables
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export QT_STYLE_OVERRIDE=kvantum
|
||||
export CLUTTER_BACKEND=wayland
|
||||
export GDK_BACKEND=wayland
|
||||
export ECORE_EVAS_ENGINE=wayland_egl
|
||||
export ELM_ENGINE=wayland_wgl
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export XDG_SESSION_TYPE=wayland
|
BIN
config/.config/ngrok/ngrok.yml
Normal file
BIN
config/.config/ngrok/ngrok.yml
Normal file
Binary file not shown.
BIN
config/.config/sdm-ui.yaml
Normal file
BIN
config/.config/sdm-ui.yaml
Normal file
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
Preamp: -11.82 dB
|
||||
Filter 1: ON LSC Fc 105.0 Hz Gain 16.1 dB Q 0.70
|
||||
Filter 2: ON PK Fc 41.6 Hz Gain -1.2 dB Q 3.28
|
||||
Filter 3: ON PK Fc 66.6 Hz Gain -12.9 dB Q 0.50
|
||||
Filter 4: ON PK Fc 1411.0 Hz Gain 0.5 dB Q 2.99
|
||||
Filter 5: ON PK Fc 1826.8 Hz Gain 5.0 dB Q 0.84
|
||||
Filter 6: ON PK Fc 1942.0 Hz Gain 0.9 dB Q 4.36
|
||||
Filter 7: ON PK Fc 2590.0 Hz Gain -1.9 dB Q 4.42
|
||||
Filter 8: ON PK Fc 6008.2 Hz Gain -4.0 dB Q 6.00
|
||||
Filter 9: ON PK Fc 7739.3 Hz Gain -1.4 dB Q 4.50
|
||||
Filter 10: ON HSC Fc 10000.0 Hz Gain -2.3 dB Q 0.70
|
102
easyeffects/.config/easyeffects/input/microphone.json
Normal file
102
easyeffects/.config/easyeffects/input/microphone.json
Normal file
|
@ -0,0 +1,102 @@
|
|||
{
|
||||
"input": {
|
||||
"autogain#0": {
|
||||
"bypass": false,
|
||||
"input-gain": 0.0,
|
||||
"maximum-history": 15,
|
||||
"output-gain": 0.0,
|
||||
"reference": "Geometric Mean (MSI)",
|
||||
"silence-threshold": -70.0,
|
||||
"target": -23.0
|
||||
},
|
||||
"blocklist": [],
|
||||
"gate#0": {
|
||||
"attack": 40.0,
|
||||
"bypass": false,
|
||||
"curve-threshold": -57.0,
|
||||
"curve-zone": -6.0,
|
||||
"dry": -14.0,
|
||||
"hpf-frequency": 100.0,
|
||||
"hpf-mode": "24 dB/oct",
|
||||
"hysteresis": false,
|
||||
"hysteresis-threshold": -12.0,
|
||||
"hysteresis-zone": -6.0,
|
||||
"input-gain": 0.0,
|
||||
"lpf-frequency": 1000.0,
|
||||
"lpf-mode": "24 dB/oct",
|
||||
"makeup": 0.0,
|
||||
"output-gain": 0.0,
|
||||
"reduction": -72.0,
|
||||
"release": 800.0,
|
||||
"sidechain": {
|
||||
"input": "Internal",
|
||||
"lookahead": 8.0,
|
||||
"mode": "RMS",
|
||||
"preamp": 0.0,
|
||||
"reactivity": 10.0,
|
||||
"source": "Middle",
|
||||
"stereo-split-source": "Left/Right"
|
||||
},
|
||||
"stereo-split": false,
|
||||
"wet": -16.0
|
||||
},
|
||||
"limiter#0": {
|
||||
"alr": true,
|
||||
"alr-attack": 5.0,
|
||||
"alr-knee": 0.0,
|
||||
"alr-release": 50.0,
|
||||
"attack": 5.0,
|
||||
"bypass": false,
|
||||
"dithering": "24bit",
|
||||
"external-sidechain": false,
|
||||
"gain-boost": false,
|
||||
"input-gain": 0.0,
|
||||
"lookahead": 5.0,
|
||||
"mode": "Exp Tail",
|
||||
"output-gain": 0.0,
|
||||
"oversampling": "Full x2(2L)",
|
||||
"release": 5.0,
|
||||
"sidechain-preamp": 0.0,
|
||||
"stereo-link": 100.0,
|
||||
"threshold": 0.0
|
||||
},
|
||||
"plugins_order": [
|
||||
"rnnoise#0",
|
||||
"gate#0",
|
||||
"autogain#0",
|
||||
"limiter#0",
|
||||
"stereo_tools#0"
|
||||
],
|
||||
"rnnoise#0": {
|
||||
"bypass": false,
|
||||
"enable-vad": true,
|
||||
"input-gain": 0.0,
|
||||
"model-path": "",
|
||||
"output-gain": 0.0,
|
||||
"release": 20.0,
|
||||
"vad-thres": 50.0,
|
||||
"wet": 0.0
|
||||
},
|
||||
"stereo_tools#0": {
|
||||
"balance-in": 0.0,
|
||||
"balance-out": 0.0,
|
||||
"bypass": false,
|
||||
"delay": -3.469446951953614e-18,
|
||||
"input-gain": 0.0,
|
||||
"middle-level": 0.0,
|
||||
"middle-panorama": 0.0,
|
||||
"mode": "LR > LL (Mono Left Channel)",
|
||||
"mutel": false,
|
||||
"muter": false,
|
||||
"output-gain": 0.0,
|
||||
"phasel": false,
|
||||
"phaser": false,
|
||||
"sc-level": 1.0,
|
||||
"side-balance": 0.0,
|
||||
"side-level": 0.0,
|
||||
"softclip": false,
|
||||
"stereo-base": 0.0,
|
||||
"stereo-phase": 0.0
|
||||
}
|
||||
}
|
||||
}
|
79
font-manager.sh
Executable file
79
font-manager.sh
Executable file
|
@ -0,0 +1,79 @@
|
|||
#!/bin/bash
|
||||
# ~/.local/bin/font-manager
|
||||
# This script extracts font archives and rebuilds font cache
|
||||
|
||||
FONT_DIR="$HOME/.local/share/fonts"
|
||||
ARCHIVE_DIR="$FONT_DIR/archives"
|
||||
ACTIVE_DIR="$FONT_DIR/active"
|
||||
|
||||
# Function to extract a specific font archive
|
||||
extract_font() {
|
||||
local archive="$1"
|
||||
if [ -f "$ARCHIVE_DIR/$archive.tar.gz" ]; then
|
||||
echo "Extracting $archive fonts..."
|
||||
tar -xzf "$ARCHIVE_DIR/$archive.tar.gz" -C "$ACTIVE_DIR"
|
||||
fc-cache -f
|
||||
echo "Done! $archive fonts are now active."
|
||||
else
|
||||
echo "Error: Font archive $archive.tar.gz not found."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to list available font archives
|
||||
list_fonts() {
|
||||
echo "Available font archives:"
|
||||
ls -1 "$ARCHIVE_DIR" | sed 's/\.tar\.gz$//'
|
||||
}
|
||||
|
||||
# Function to rebuild font cache
|
||||
rebuild_cache() {
|
||||
echo "Rebuilding font cache..."
|
||||
fc-cache -f
|
||||
echo "Done!"
|
||||
}
|
||||
|
||||
# Function to extract all fonts
|
||||
extract_all() {
|
||||
echo "Extracting all font archives..."
|
||||
for archive in "$ARCHIVE_DIR"/*.tar.gz; do
|
||||
tar -xzf "$archive" -C "$ACTIVE_DIR"
|
||||
done
|
||||
fc-cache -f
|
||||
echo "Done! All fonts are now active."
|
||||
}
|
||||
|
||||
# Function to clean active fonts directory
|
||||
clean_fonts() {
|
||||
echo "Cleaning active fonts directory..."
|
||||
find "$ACTIVE_DIR" -type f -name "*.ttf" -o -name "*.otf" | xargs rm -f
|
||||
echo "Done! Active fonts directory is now clean."
|
||||
}
|
||||
|
||||
# Main script logic
|
||||
case "$1" in
|
||||
"extract")
|
||||
extract_font "$2"
|
||||
;;
|
||||
"list")
|
||||
list_fonts
|
||||
;;
|
||||
"rebuild")
|
||||
rebuild_cache
|
||||
;;
|
||||
"all")
|
||||
extract_all
|
||||
;;
|
||||
"clean")
|
||||
clean_fonts
|
||||
;;
|
||||
*)
|
||||
echo "Usage: font-manager [command] [options]"
|
||||
echo "Commands:"
|
||||
echo " extract [name] Extract specific font archive"
|
||||
echo " list List available font archives"
|
||||
echo " rebuild Rebuild font cache"
|
||||
echo " all Extract all font archives"
|
||||
echo " clean Remove all active fonts"
|
||||
;;
|
||||
esac
|
0
fonts/.local/share/fonts/active/.gitkeep
Normal file
0
fonts/.local/share/fonts/active/.gitkeep
Normal file
BIN
fonts/.local/share/fonts/archives/AGaramond.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/AGaramond.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/FontAwesome.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/FontAwesome.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/Inter.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/Inter.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/JetBrains.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/JetBrains.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/MonoLisa.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/MonoLisa.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/NerdFonts.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/NerdFonts.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/OpenSans.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/OpenSans.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/Proxima.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/Proxima.tar.gz
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/archives/SourceSans.tar.gz
Normal file
BIN
fonts/.local/share/fonts/archives/SourceSans.tar.gz
Normal file
Binary file not shown.
18
fuzzel/.config/fuzzel/fuzzel.ini
Normal file
18
fuzzel/.config/fuzzel/fuzzel.ini
Normal file
|
@ -0,0 +1,18 @@
|
|||
dpi-aware=yes
|
||||
icon-theme=Papirus-Dark
|
||||
width=50
|
||||
font=Fira Code:size=16
|
||||
fields=name,generic,comment,categories,filename,keywords
|
||||
terminal=kitty
|
||||
prompt="❯ "
|
||||
show-actions=yes
|
||||
exit-on-keyboard-focus-loss=yes
|
||||
include=~/.config/fuzzel/mocha/red.ini
|
||||
width=70
|
||||
|
||||
[border]
|
||||
radius=20
|
||||
|
||||
[dmenu]
|
||||
exit-immediately-if-empty=yes
|
||||
|
8
fuzzel/.config/fuzzel/mocha/blue.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/blue.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=89b4faff
|
||||
selection=585b70ff
|
||||
selection-match=89b4faff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/flamingo.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/flamingo.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=f2cdcdff
|
||||
selection=585b70ff
|
||||
selection-match=f2cdcdff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/green.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/green.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=a6e3a1ff
|
||||
selection=585b70ff
|
||||
selection-match=a6e3a1ff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/lavender.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/lavender.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=b4befeff
|
||||
selection=585b70ff
|
||||
selection-match=b4befeff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/maroon.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/maroon.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=eba0acff
|
||||
selection=585b70ff
|
||||
selection-match=eba0acff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/mauve.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/mauve.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=cba6f7ff
|
||||
selection=585b70ff
|
||||
selection-match=cba6f7ff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/peach.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/peach.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2ef0
|
||||
text=cdd6f4ff
|
||||
match=fab387ff
|
||||
selection=585b70ff
|
||||
selection-match=fab387ff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/pink.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/pink.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=f5c2e7ff
|
||||
selection=585b70ff
|
||||
selection-match=f5c2e7ff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/red.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/red.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2ef0
|
||||
text=cdd6f4ff
|
||||
match=f38ba8ff
|
||||
selection=585b70ff
|
||||
selection-match=f38ba8ff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/rosewater.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/rosewater.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=f5e0dcff
|
||||
selection=585b70ff
|
||||
selection-match=f5e0dcff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/sapphire.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/sapphire.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=74c7ecff
|
||||
selection=585b70ff
|
||||
selection-match=74c7ecff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/sky.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/sky.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=89dcebff
|
||||
selection=585b70ff
|
||||
selection-match=89dcebff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/teal.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/teal.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=94e2d5ff
|
||||
selection=585b70ff
|
||||
selection-match=94e2d5ff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
8
fuzzel/.config/fuzzel/mocha/yellow.ini
Normal file
8
fuzzel/.config/fuzzel/mocha/yellow.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
match=f9e2afff
|
||||
selection=585b70ff
|
||||
selection-match=f9e2afff
|
||||
selection-text=cdd6f4ff
|
||||
border=b4befeff
|
29
git/.config/git/commit.sh
Executable file
29
git/.config/git/commit.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
get_ticket_number() {
|
||||
git symbolic-ref --short HEAD | grep -Ei '^ocst-[0-9]{2,5}-' | sed -E 's/^(ocst-[0-9]{2,5}).*$/\1/i' | tr '[:upper:]' '[:lower:]'
|
||||
}
|
||||
|
||||
format_commit_message() {
|
||||
local message="$1"
|
||||
local ticket="$2"
|
||||
|
||||
if echo "$message" | grep -E '^[^:]+:' >/dev/null; then
|
||||
local type=$(echo "$message" | cut -d: -f1)
|
||||
local content=$(echo "$message" | cut -d: -f2- | sed 's/^ //')
|
||||
echo "$type($ticket): $content"
|
||||
else
|
||||
echo "$message"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
local ticket=$(get_ticket_number)
|
||||
if [ -n "$ticket" ]; then
|
||||
git commit -m "$(format_commit_message "$1" "$ticket")" "${@:2}"
|
||||
else
|
||||
git commit -m "$1" "${@:2}"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
82
git/.config/git/config
Normal file
82
git/.config/git/config
Normal file
|
@ -0,0 +1,82 @@
|
|||
# GitFlow related sections
|
||||
[gitflow "branch"]
|
||||
master = master
|
||||
develop = develop
|
||||
|
||||
[gitflow "prefix"]
|
||||
feature = feature/
|
||||
release = release/
|
||||
hotfix = hotfix/
|
||||
bugfix = bugfix/
|
||||
support = support/
|
||||
versiontag = v
|
||||
|
||||
[user]
|
||||
email = marianoz@posteo.net
|
||||
name = Mariano Z.
|
||||
signingkey = 13D35660EC8E8AA03D4370A83FA93CB876C8FFAA
|
||||
|
||||
|
||||
[include]
|
||||
path = ~/.config/git/gitalias.txt
|
||||
[core]
|
||||
pager = diff-so-fancy | less --tabs=4 -RFX
|
||||
autocrlf = input
|
||||
excludesfile = ~/.config/git/.gitignore
|
||||
[color]
|
||||
ui = true
|
||||
[color "diff-highlight"]
|
||||
oldNormal = red bold
|
||||
oldHighlight = red bold 52
|
||||
newNormal = green bold
|
||||
newHighlight = green bold 22
|
||||
[color "diff"]
|
||||
meta = yellow
|
||||
frag = magenta bold
|
||||
commit = yellow bold
|
||||
old = red bold
|
||||
new = green bold
|
||||
whitespace = red reverse
|
||||
[credential]
|
||||
helper = /usr/lib/git-core/git-credential-libsecret
|
||||
[mergetool "fugitive"]
|
||||
cmd = vim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE"
|
||||
#cmd = vim -f -c \"Gvdiffsplit!\" \"$MERGED\"
|
||||
[merge]
|
||||
tool = fugitive
|
||||
conflictStyle = diff3
|
||||
[icdiff]
|
||||
options = --highlight --line-numbers
|
||||
#
|
||||
[pull]
|
||||
rebase = true
|
||||
[rebase]
|
||||
autoStash = true
|
||||
[init]
|
||||
defaultBranch = master
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
|
||||
# avoid issues where the `cargo audit` command tries to clone from a repo you do not have WRITE access to.
|
||||
# we already use SSH for every github repo, and so this puts the clone back to using HTTPS.
|
||||
[url "https://github.com/RustSec/advisory-db"]
|
||||
insteadOf = https://github.com/RustSec/advisory-db
|
||||
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
|
||||
[color "blame"]
|
||||
highlightRecent = 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
[alias]
|
||||
bb = !better-git-branch.sh
|
||||
|
||||
|
||||
[includeIf "gitdir:~/Sync/"]
|
||||
path = ~/Sync/Obsidian/.gitconfig
|
1513
git/.config/git/gitalias.txt
Normal file
1513
git/.config/git/gitalias.txt
Normal file
File diff suppressed because it is too large
Load diff
BIN
gnupg/.gnupg/gpg-agent.conf
Normal file
BIN
gnupg/.gnupg/gpg-agent.conf
Normal file
Binary file not shown.
BIN
gnupg/.gnupg/sshcontrol
Normal file
BIN
gnupg/.gnupg/sshcontrol
Normal file
Binary file not shown.
64
kitty/.config/kitty/kitty.conf
Normal file
64
kitty/.config/kitty/kitty.conf
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Font settings
|
||||
font_family JetBrains Mono
|
||||
# font_family Fira Code
|
||||
# font_family Iosevka\ Nerd\ Font
|
||||
# font_family MonoLisa
|
||||
# font_family Proxima\ Nova
|
||||
# font_family Source\ Code\ Pro
|
||||
font_size 12.0
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
font_size 12.0
|
||||
|
||||
text_composition_strategy legacy
|
||||
|
||||
# cursor customization
|
||||
# block / beam / underline
|
||||
cursor_shape block
|
||||
cursor_blink_interval 0
|
||||
cursor_stop_blinking_after 0
|
||||
shell_integration no-cursor
|
||||
|
||||
# Window settings
|
||||
remember_window_size no
|
||||
initial_window_width 1200
|
||||
initial_window_height 750
|
||||
window_border_width 1.5pt
|
||||
enabled_layouts tall
|
||||
window_padding_width 0
|
||||
window_margin_width 2
|
||||
hide_window_decorations no
|
||||
|
||||
background_opacity 0.90
|
||||
background_blur 1
|
||||
|
||||
# advance
|
||||
term xterm-kitty
|
||||
|
||||
# Tab bar
|
||||
tab_bar_edge bottom
|
||||
tab_bar_style hidden
|
||||
|
||||
# Color scheme (you'll need to define these colors)
|
||||
# include your_theme.conf
|
||||
# include ./themes/rose-pine.conf
|
||||
# include ./themes/Duskfox.conf
|
||||
include ./themes/Nightfox.conf
|
||||
|
||||
# Disable confirmation on window close
|
||||
confirm_os_window_close 0
|
||||
|
||||
# Hyperlink settings
|
||||
detect_urls yes
|
||||
url_style curly
|
||||
|
||||
# Mouse settings
|
||||
mouse_hide_wait 3.0
|
||||
focus_follows_mouse no
|
||||
|
||||
# ZEN MODE (font size adjustment)
|
||||
map ctrl+shift+plus change_font_size all +1.0
|
||||
map ctrl+shift+minus change_font_size all -1.0
|
||||
map ctrl+shift+0 change_font_size all 0
|
||||
map ctrl+shift+r load_config_file
|
103
kitty/.config/kitty/themes/Duskfox.conf
Normal file
103
kitty/.config/kitty/themes/Duskfox.conf
Normal file
|
@ -0,0 +1,103 @@
|
|||
# vim:ft=kitty
|
||||
## name: Duskfox
|
||||
## author: EdenEast
|
||||
## license: MIT
|
||||
## upstream: https://github.com/EdenEast/nightfox.nvim/blob/main/extra/duskfox/kitty.conf
|
||||
## blurb: Duskfox theme from the neovim colorscheme nightfox.nvim.
|
||||
|
||||
#: All the settings below are colors, which you can choose to modify, or use the
|
||||
#: defaults. You can also add non-color based settings if needed but note that
|
||||
#: these will not work with using kitty @ set-colors with this theme. For a
|
||||
#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/
|
||||
|
||||
#: The basic colors
|
||||
|
||||
foreground #e0def4
|
||||
background #232136
|
||||
selection_foreground #e0def4
|
||||
selection_background #433c59
|
||||
|
||||
|
||||
#: Cursor colors
|
||||
|
||||
cursor #e0def4
|
||||
cursor_text_color #232136
|
||||
|
||||
|
||||
#: URL underline color when hovering with mouse
|
||||
|
||||
url_color #a3be8c
|
||||
|
||||
|
||||
#: kitty window border colors and terminal bell colors
|
||||
|
||||
active_border_color #569fba
|
||||
inactive_border_color #4b4673
|
||||
bell_border_color #ea9a97
|
||||
# visual_bell_color none
|
||||
|
||||
|
||||
#: OS Window titlebar colors
|
||||
|
||||
# wayland_titlebar_color system
|
||||
# macos_titlebar_color system
|
||||
|
||||
|
||||
#: Tab bar colors
|
||||
|
||||
active_tab_foreground #191726
|
||||
active_tab_background #569fba
|
||||
inactive_tab_foreground #817c9c
|
||||
inactive_tab_background #433c59
|
||||
# tab_bar_background none
|
||||
# tab_bar_margin_color none
|
||||
|
||||
|
||||
#: Colors for marks (marked text in the terminal)
|
||||
|
||||
# mark1_foreground black
|
||||
# mark1_background #98d3cb
|
||||
# mark2_foreground black
|
||||
# mark2_background #f2dcd3
|
||||
# mark3_foreground black
|
||||
# mark3_background #f274bc
|
||||
|
||||
|
||||
#: The basic 16 colors
|
||||
|
||||
#: black
|
||||
color0 #393552
|
||||
color8 #47407d
|
||||
|
||||
#: red
|
||||
color1 #eb6f92
|
||||
color9 #f083a2
|
||||
|
||||
#: green
|
||||
color2 #a3be8c
|
||||
color10 #b1d196
|
||||
|
||||
#: yellow
|
||||
color3 #f6c177
|
||||
color11 #f9cb8c
|
||||
|
||||
#: blue
|
||||
color4 #569fba
|
||||
color12 #65b1cd
|
||||
|
||||
#: magenta
|
||||
color5 #c4a7e7
|
||||
color13 #ccb1ed
|
||||
|
||||
#: cyan
|
||||
color6 #9ccfd8
|
||||
color14 #a6dae3
|
||||
|
||||
#: white
|
||||
color7 #e0def4
|
||||
color15 #e2e0f7
|
||||
|
||||
#: You can set the remaining 240 colors as color16 to color255.
|
||||
|
||||
color16 #ea9a97
|
||||
color17 #eb98c3
|
52
kitty/.config/kitty/themes/Nightfox.conf
Normal file
52
kitty/.config/kitty/themes/Nightfox.conf
Normal file
|
@ -0,0 +1,52 @@
|
|||
# vim:ft=kitty
|
||||
|
||||
## name: Nightfox
|
||||
## author: EdenEast
|
||||
## license: MIT
|
||||
## upstream: https://github.com/EdenEast/nightfox.nvim/blob/main/extra/nightfox/nightfox_kitty.conf
|
||||
|
||||
background #192330
|
||||
foreground #cdcecf
|
||||
selection_background #2b3b51
|
||||
selection_foreground #cdcecf
|
||||
url_color #81b29a
|
||||
|
||||
# Cursor
|
||||
# uncomment for reverse background
|
||||
# cursor none
|
||||
cursor #cdcecf
|
||||
|
||||
# Border
|
||||
active_border_color #719cd6
|
||||
inactive_border_color #39506d
|
||||
bell_border_color #f4a261
|
||||
|
||||
# Tabs
|
||||
active_tab_background #719cd6
|
||||
active_tab_foreground #131a24
|
||||
inactive_tab_background #2b3b51
|
||||
inactive_tab_foreground #738091
|
||||
|
||||
# normal
|
||||
color0 #393b44
|
||||
color1 #c94f6d
|
||||
color2 #81b29a
|
||||
color3 #dbc074
|
||||
color4 #719cd6
|
||||
color5 #9d79d6
|
||||
color6 #63cdcf
|
||||
color7 #dfdfe0
|
||||
|
||||
# bright
|
||||
color8 #575860
|
||||
color9 #d16983
|
||||
color10 #8ebaa4
|
||||
color11 #e0c989
|
||||
color12 #86abdc
|
||||
color13 #baa1e2
|
||||
color14 #7ad5d6
|
||||
color15 #e4e4e5
|
||||
|
||||
# extended colors
|
||||
color16 #f4a261
|
||||
color17 #d67ad2
|
56
kitty/.config/kitty/themes/rose-pine-dawn.conf
Normal file
56
kitty/.config/kitty/themes/rose-pine-dawn.conf
Normal file
|
@ -0,0 +1,56 @@
|
|||
## name: Rosé Pine Dawn
|
||||
## author: mvllow
|
||||
## license: MIT
|
||||
## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-dawn.conf
|
||||
## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist
|
||||
|
||||
foreground #575279
|
||||
background #faf4ed
|
||||
selection_foreground #575279
|
||||
selection_background #dfdad9
|
||||
|
||||
cursor #cecacd
|
||||
cursor_text_color #575279
|
||||
|
||||
url_color #907aa9
|
||||
|
||||
active_tab_foreground #575279
|
||||
active_tab_background #f2e9e1
|
||||
inactive_tab_foreground #9893a5
|
||||
inactive_tab_background #faf4ed
|
||||
|
||||
active_border_color #286983
|
||||
inactive_border_color #dfdad9
|
||||
|
||||
# black
|
||||
color0 #f2e9e1
|
||||
color8 #9893a5
|
||||
|
||||
# red
|
||||
color1 #b4637a
|
||||
color9 #b4637a
|
||||
|
||||
# green
|
||||
color2 #286983
|
||||
color10 #286983
|
||||
|
||||
# yellow
|
||||
color3 #ea9d34
|
||||
color11 #ea9d34
|
||||
|
||||
# blue
|
||||
color4 #56949f
|
||||
color12 #56949f
|
||||
|
||||
# magenta
|
||||
color5 #907aa9
|
||||
color13 #907aa9
|
||||
|
||||
# cyan
|
||||
color6 #d7827e
|
||||
color14 #d7827e
|
||||
|
||||
# white
|
||||
color7 #575279
|
||||
color15 #575279
|
||||
|
56
kitty/.config/kitty/themes/rose-pine-moon.conf
Normal file
56
kitty/.config/kitty/themes/rose-pine-moon.conf
Normal file
|
@ -0,0 +1,56 @@
|
|||
## name: Rosé Pine Moon
|
||||
## author: mvllow
|
||||
## license: MIT
|
||||
## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf
|
||||
## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist
|
||||
|
||||
foreground #e0def4
|
||||
background #232136
|
||||
selection_foreground #e0def4
|
||||
selection_background #44415a
|
||||
|
||||
cursor #56526e
|
||||
cursor_text_color #e0def4
|
||||
|
||||
url_color #c4a7e7
|
||||
|
||||
active_tab_foreground #e0def4
|
||||
active_tab_background #393552
|
||||
inactive_tab_foreground #6e6a86
|
||||
inactive_tab_background #232136
|
||||
|
||||
active_border_color #3e8fb0
|
||||
inactive_border_color #44415a
|
||||
|
||||
# black
|
||||
color0 #393552
|
||||
color8 #6e6a86
|
||||
|
||||
# red
|
||||
color1 #eb6f92
|
||||
color9 #eb6f92
|
||||
|
||||
# green
|
||||
color2 #3e8fb0
|
||||
color10 #3e8fb0
|
||||
|
||||
# yellow
|
||||
color3 #f6c177
|
||||
color11 #f6c177
|
||||
|
||||
# blue
|
||||
color4 #9ccfd8
|
||||
color12 #9ccfd8
|
||||
|
||||
# magenta
|
||||
color5 #c4a7e7
|
||||
color13 #c4a7e7
|
||||
|
||||
# cyan
|
||||
color6 #ea9a97
|
||||
color14 #ea9a97
|
||||
|
||||
# white
|
||||
color7 #e0def4
|
||||
color15 #e0def4
|
||||
|
56
kitty/.config/kitty/themes/rose-pine.conf
Normal file
56
kitty/.config/kitty/themes/rose-pine.conf
Normal file
|
@ -0,0 +1,56 @@
|
|||
## name: Rosé Pine
|
||||
## author: mvllow
|
||||
## license: MIT
|
||||
## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf
|
||||
## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist
|
||||
|
||||
foreground #e0def4
|
||||
background #191724
|
||||
selection_foreground #e0def4
|
||||
selection_background #403d52
|
||||
|
||||
cursor #524f67
|
||||
cursor_text_color #e0def4
|
||||
|
||||
url_color #c4a7e7
|
||||
|
||||
active_tab_foreground #e0def4
|
||||
active_tab_background #26233a
|
||||
inactive_tab_foreground #6e6a86
|
||||
inactive_tab_background #191724
|
||||
|
||||
active_border_color #31748f
|
||||
inactive_border_color #403d52
|
||||
|
||||
# black
|
||||
color0 #26233a
|
||||
color8 #6e6a86
|
||||
|
||||
# red
|
||||
color1 #eb6f92
|
||||
color9 #eb6f92
|
||||
|
||||
# green
|
||||
color2 #31748f
|
||||
color10 #31748f
|
||||
|
||||
# yellow
|
||||
color3 #f6c177
|
||||
color11 #f6c177
|
||||
|
||||
# blue
|
||||
color4 #9ccfd8
|
||||
color12 #9ccfd8
|
||||
|
||||
# magenta
|
||||
color5 #c4a7e7
|
||||
color13 #c4a7e7
|
||||
|
||||
# cyan
|
||||
color6 #ebbcba
|
||||
color14 #ebbcba
|
||||
|
||||
# white
|
||||
color7 #e0def4
|
||||
color15 #e0def4
|
||||
|
942
local-bin/.local/bin/betterlockscreen
Executable file
942
local-bin/.local/bin/betterlockscreen
Executable file
|
@ -0,0 +1,942 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Author : Copyright (c) 2017-2023 Pavan Jadhaw, and others (https://github.com/betterlockscreen/betterlockscreen/graphs/contributors)
|
||||
# Project Repository : https://github.com/betterlockscreen/betterlockscreen
|
||||
|
||||
cmd_exists () {
|
||||
command -v "$1" >/dev/null
|
||||
}
|
||||
|
||||
init_config () {
|
||||
# default options
|
||||
display_on=0
|
||||
span_image=false
|
||||
lock_timeout=300
|
||||
fx_list=(dim blur dimblur pixel dimpixel color)
|
||||
dim_level=40
|
||||
blur_level=1
|
||||
pixel_scale=10,1000
|
||||
solid_color=333333
|
||||
description=""
|
||||
quiet=false
|
||||
i3lockcolor_bin="i3lock-color"
|
||||
suspend_command="systemctl suspend"
|
||||
convert_command="magick"
|
||||
composite_command="magick composite"
|
||||
|
||||
if ! cmd_exists "$i3lockcolor_bin" && cmd_exists "i3lock"; then
|
||||
i3lockcolor_bin="i3lock"
|
||||
fi
|
||||
|
||||
if ! cmd_exists "magick"; then
|
||||
convert_command="convert"
|
||||
composite_command="composite"
|
||||
fi
|
||||
|
||||
# default theme
|
||||
loginbox=00000066
|
||||
loginshadow=00000000
|
||||
locktext="Type password to unlock..."
|
||||
font="sans-serif"
|
||||
ringcolor=ffffffff
|
||||
insidecolor=00000000
|
||||
separatorcolor=00000000
|
||||
ringvercolor=ffffffff
|
||||
insidevercolor=00000000
|
||||
ringwrongcolor=ffffffff
|
||||
insidewrongcolor=d23c3dff
|
||||
timecolor=ffffffff
|
||||
time_format="%H:%M:%S"
|
||||
greetercolor=ffffffff
|
||||
layoutcolor=ffffffff
|
||||
keyhlcolor=d23c3dff
|
||||
bshlcolor=d23c3dff
|
||||
veriftext="Verifying..."
|
||||
verifcolor=ffffffff
|
||||
wrongtext="Failure!"
|
||||
wrongcolor=d23c3dff
|
||||
modifcolor=d23c3dff
|
||||
bgcolor=000000ff
|
||||
wallpaper_cmd="feh --bg-fill"
|
||||
|
||||
# read user config
|
||||
USER_CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
USER_CONF="$USER_CONF_DIR/betterlockscreenrc"
|
||||
SYS_CONF="/etc/betterlockscreenrc"
|
||||
XDG_USER_CONF_DIR="$USER_CONF_DIR/betterlockscreen"
|
||||
XDG_USER_CONF="$XDG_USER_CONF_DIR/betterlockscreenrc"
|
||||
|
||||
if [ -e "$SYS_CONF" ]; then
|
||||
# shellcheck source=/dev/null
|
||||
source "$SYS_CONF"
|
||||
fi
|
||||
|
||||
if [ -e "$USER_CONF" ]; then
|
||||
echof error "Please, migrate your config $USER_CONF to $XDG_USER_CONF. Old location will soon be deprecated."
|
||||
echof info "mkdir -p ~/.config/betterlockscreen/ && mv $USER_CONF $XDG_USER_CONF"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source "$USER_CONF"
|
||||
fi
|
||||
|
||||
if [ -e "$XDG_USER_CONF" ]; then
|
||||
# shellcheck source=/dev/null
|
||||
source "$XDG_USER_CONF"
|
||||
fi
|
||||
|
||||
if ! cmd_exists "$i3lockcolor_bin"; then
|
||||
echof error "Unable to find i3lock-color binary under detected/configured name: '$i3lockcolor_bin'!"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Please make sure to adjust this before release!
|
||||
VERSION="4.3.0"
|
||||
|
||||
# paths
|
||||
CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/betterlockscreen"
|
||||
CUR_DIR="$CACHE_DIR/current"
|
||||
|
||||
# wallpaper
|
||||
CUR_W_RESIZE="$CUR_DIR/wall_resize.png"
|
||||
CUR_W_DIM="$CUR_DIR/wall_dim.png"
|
||||
CUR_W_BLUR="$CUR_DIR/wall_blur.png"
|
||||
CUR_W_DIMBLUR="$CUR_DIR/wall_dimblur.png"
|
||||
CUR_W_PIXEL="$CUR_DIR/wall_pixel.png"
|
||||
CUR_W_DIMPIXEL="$CUR_DIR/wall_dimpixel.png"
|
||||
CUR_W_COLOR="$CUR_DIR/wall_color.png"
|
||||
|
||||
# lockscreen
|
||||
CUR_L_RESIZE="$CUR_DIR/lock_resize.png"
|
||||
CUR_L_DIM="$CUR_DIR/lock_dim.png"
|
||||
CUR_L_BLUR="$CUR_DIR/lock_blur.png"
|
||||
CUR_L_DIMBLUR="$CUR_DIR/lock_dimblur.png"
|
||||
CUR_L_PIXEL="$CUR_DIR/lock_pixel.png"
|
||||
CUR_L_DIMPIXEL="$CUR_DIR/lock_dimpixel.png"
|
||||
CUR_L_COLOR="$CUR_DIR/lock_color.png"
|
||||
|
||||
# Original DPMS timeout
|
||||
DEFAULT_TIMEOUT=$(cut -d ' ' -f4 <<< "$(xset q | sed -n '25p')")
|
||||
# Original DPMS status
|
||||
DEFAULT_DPMS=$(xset q | awk '/^[[:blank:]]*DPMS is/ {print $(NF)}')
|
||||
|
||||
# Dunst
|
||||
DUNST_INSTALLED=false && [[ -e "$(command -v dunstctl)" ]] && DUNST_INSTALLED=true
|
||||
DUNST_IS_RUNNING=false && [[ "$DUNST_INSTALLED" == "true" ]] && [[ "$(pgrep -c dunst)" -gt 0 ]] && DUNST_IS_RUNNING=true
|
||||
DUNST_IS_PAUSED=false && [[ "$DUNST_IS_RUNNING" == "true" ]] && DUNST_IS_PAUSED=$(dunstctl is-paused)
|
||||
|
||||
# Feh
|
||||
FEH_INSTALLED=false && [[ -e "$(command -v feh)" ]] && FEH_INSTALLED=true
|
||||
}
|
||||
|
||||
# called before screen is locked
|
||||
prelock() {
|
||||
# set dpms timeout
|
||||
if [ "$DEFAULT_DPMS" == "Enabled" ]; then
|
||||
xset dpms "$lock_timeout"
|
||||
fi
|
||||
|
||||
# If dusnt is already paused don't pause it again
|
||||
if [[ "$DUNST_IS_RUNNING" == "true" && "$DUNST_IS_PAUSED" == "false" ]]; then
|
||||
dunstctl set-paused true
|
||||
fi
|
||||
|
||||
if [ -e "$XDG_USER_CONF_DIR/custom-pre.sh" ]; then
|
||||
# shellcheck source=/dev/null
|
||||
source "$XDG_USER_CONF_DIR/custom-pre.sh"
|
||||
fi
|
||||
}
|
||||
|
||||
# lock screen with specified image
|
||||
lock() {
|
||||
local image="$1"
|
||||
local fontlg=32
|
||||
local fontmd=16
|
||||
local fontsm=12
|
||||
|
||||
if [ -f "$image" ]; then
|
||||
echof act "Locking screen..."
|
||||
else
|
||||
echof act "Locking screen... (FAILSAFE MODE)"
|
||||
fi
|
||||
|
||||
$i3lockcolor_bin \
|
||||
${image:+-i "$image"} \
|
||||
--color "$bgcolor" \
|
||||
${display_on:+-S "$display_on"} \
|
||||
--ind-pos="x+310:y+h-80" \
|
||||
--radius=25 \
|
||||
--ring-width=5 \
|
||||
--inside-color="$insidecolor" \
|
||||
--ring-color="$ringcolor" \
|
||||
--separator-color=$separatorcolor \
|
||||
--insidever-color="$insidevercolor" \
|
||||
--insidewrong-color="$insidewrongcolor" \
|
||||
--ringver-color="$ringvercolor" \
|
||||
--ringwrong-color="$ringwrongcolor" \
|
||||
--line-uses-inside \
|
||||
--keyhl-color="$keyhlcolor" \
|
||||
--bshl-color="$bshlcolor" \
|
||||
--clock --force-clock \
|
||||
--time-pos="ix-265:iy-10" \
|
||||
--time-align 1 \
|
||||
--time-str "$time_format" \
|
||||
--time-color="$timecolor" \
|
||||
--time-font="$font" \
|
||||
--time-size="$fontlg" \
|
||||
--date-str "" \
|
||||
--greeter-pos="ix-265:iy+12" \
|
||||
--greeter-align 1 \
|
||||
--greeter-text "$locktext" \
|
||||
--greeter-color="$greetercolor" \
|
||||
--greeter-font="$font" \
|
||||
--greeter-size="$fontmd" \
|
||||
--layout-pos="ix-265:iy+32" \
|
||||
--layout-align 1 \
|
||||
--layout-color="$layoutcolor" \
|
||||
--layout-font="$font" \
|
||||
--layout-size="$fontsm" \
|
||||
--verif-pos="ix+35:iy-34" \
|
||||
--verif-align 2 \
|
||||
--verif-text="$veriftext" \
|
||||
--verif-color="$verifcolor" \
|
||||
--verif-font="$font" \
|
||||
--verif-size="$fontsm" \
|
||||
--wrong-pos="ix+24:iy-34" \
|
||||
--wrong-align 2 \
|
||||
--wrong-text="$wrongtext" \
|
||||
--wrong-color="$wrongcolor" \
|
||||
--wrong-font="$font" \
|
||||
--wrong-size="$fontsm" \
|
||||
--modif-pos="ix+45:iy+43" \
|
||||
--modif-align 2 \
|
||||
--modif-size="$fontsm" \
|
||||
--modif-color="$modifcolor" \
|
||||
--noinput-text="" \
|
||||
--pass-media-keys \
|
||||
--pass-screen-keys \
|
||||
--pass-volume-keys \
|
||||
--pass-power-keys \
|
||||
"${lockargs[@]}"
|
||||
}
|
||||
|
||||
# called after screen is unlocked
|
||||
postlock() {
|
||||
# restore default dpms timeout
|
||||
if [ "$DEFAULT_DPMS" == "Enabled" ]; then
|
||||
xset dpms "$DEFAULT_TIMEOUT"
|
||||
fi
|
||||
|
||||
# If dunst already paused before locking don't unpause dunst
|
||||
if [[ "$DUNST_IS_RUNNING" == "true" && "$DUNST_IS_PAUSED" == "false" ]]; then
|
||||
dunstctl set-paused false
|
||||
fi
|
||||
|
||||
if [ -e "$XDG_USER_CONF_DIR/custom-post.sh" ]; then
|
||||
# shellcheck source=/dev/null
|
||||
source "$XDG_USER_CONF_DIR/custom-post.sh"
|
||||
fi
|
||||
}
|
||||
|
||||
# select effect and lock screen
|
||||
lockinit() {
|
||||
if pgrep -u "$USER" "$i3lockcolor_bin"; then
|
||||
echof error "i3lock already running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echof act "Running prelock..."
|
||||
prelock
|
||||
|
||||
if [[ $runsuspend ]]; then
|
||||
lockselect "$@" &
|
||||
$suspend_command
|
||||
wait $!
|
||||
else
|
||||
lockselect "$@"
|
||||
fi
|
||||
|
||||
echof act "Running postlock..."
|
||||
postlock
|
||||
}
|
||||
|
||||
lockselect() {
|
||||
case "$1" in
|
||||
dim) lock "$CUR_L_DIM" ;;
|
||||
blur) lock "$CUR_L_BLUR" ;;
|
||||
dimblur) lock "$CUR_L_DIMBLUR" ;;
|
||||
pixel) lock "$CUR_L_PIXEL" ;;
|
||||
dimpixel) lock "$CUR_L_DIMPIXEL" ;;
|
||||
color) lock "$CUR_L_COLOR" ;;
|
||||
*) lock "$CUR_L_RESIZE" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# calculate adjustments for hidpi displays
|
||||
logical_px() {
|
||||
# $1: number of pixels to convert
|
||||
# $2: 1 for width. 2 for height
|
||||
local pixels="$1"
|
||||
local direction="$2"
|
||||
local dpi
|
||||
|
||||
# use DPI set by user in .Xresources
|
||||
dpi=$(xrdb -q | grep -oP '^\s*Xft.dpi:\s*\K\d+' | bc)
|
||||
|
||||
# or get dpi value from xdpyinfo
|
||||
if [ -z "$dpi" ]; then
|
||||
dpi=$(xdpyinfo | sed -En "s/\s*resolution:\s*([0-9]*)x([0-9]*)\s.*/\\$direction/p" | head -n1)
|
||||
fi
|
||||
|
||||
# adjust scaling
|
||||
if [ -n "$dpi" ]; then
|
||||
local scale
|
||||
scale=$(echo "scale=3; $dpi / 96.0" | bc)
|
||||
echo "$scale * $pixels / 1" | bc
|
||||
else
|
||||
# return the default value if no DPI is set
|
||||
echo "$pixels"
|
||||
fi
|
||||
}
|
||||
|
||||
# get total resolution, sets $TOTAL_SIZE
|
||||
get_total_size () {
|
||||
TOTAL_SIZE=$(xdpyinfo | grep -w "dimensions" | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')
|
||||
}
|
||||
|
||||
# get list of displays, sets $DISPLAY_LIST
|
||||
get_display_list () {
|
||||
local count=0
|
||||
mapfile -t displays < <(xrandr --listactivemonitors)
|
||||
for display in "${displays[@]:1}"; do
|
||||
((count++))
|
||||
display="$(echo "$display" | sed -r 's/\/[0-9]*//g')"
|
||||
IFS=' ' read -r -a info <<< "$display"
|
||||
DISPLAY_LIST+=("$count ${info[3]} ${info[2]}")
|
||||
done
|
||||
}
|
||||
|
||||
# populate $WALL_LIST depending on number of displays and images passed
|
||||
get_wall_list() {
|
||||
local paths=("$@")
|
||||
declare -ga WALL_LIST
|
||||
|
||||
# multiple images and spanning conflict, bail out
|
||||
if [ "${#paths[@]}" -gt 1 ] && [ "$span_image" = true ]; then
|
||||
echof err "Can't use --span with multiple images!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if spanning return 1 image
|
||||
if [ "$span_image" = true ]; then
|
||||
get_image "${paths[0]}"
|
||||
|
||||
# if # paths is 1
|
||||
elif [ "${#paths[@]}" -eq 1 ]; then
|
||||
for ((i=0; i<${#DISPLAY_LIST[@]}; i++)); do
|
||||
# add same image to $WALL_LIST for each display
|
||||
get_image "${paths[0]}"
|
||||
done
|
||||
|
||||
# if # of paths equals # of displays
|
||||
elif [ ${#paths[@]} -eq "${#DISPLAY_LIST[@]}" ]; then
|
||||
for ((i=0; i<${#DISPLAY_LIST[@]}; i++)); do
|
||||
# add each image to $WALL_LIST
|
||||
get_image "${paths[$i]}"
|
||||
done
|
||||
|
||||
# if # of paths differ from # of display, bail out
|
||||
else
|
||||
echof err "${#paths[@]} images provided for ${#DISPLAY_LIST[@]} displays!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# get image path, append to $WALL_LIST
|
||||
get_image() {
|
||||
local path="$1"
|
||||
|
||||
# we have a file
|
||||
if [ -f "$path" ]; then
|
||||
WALL_LIST+=("$path")
|
||||
return
|
||||
# we have a directory
|
||||
elif [ -d "$path" ]; then
|
||||
dir=("$path"/*)
|
||||
rdir="${dir[RANDOM % ${#dir[@]}]}"
|
||||
get_image "$rdir" # <-- calls itself
|
||||
# not file or directory, bail out
|
||||
else
|
||||
echof err "invalid path: $path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# scale base image and generate effects
|
||||
resize_and_render () {
|
||||
local base="$1"
|
||||
local path="$2"
|
||||
local resolution="$3"
|
||||
|
||||
# resource paths
|
||||
RES_RESIZE="$path/resize.png"
|
||||
RES_DIM="$path/dim.png"
|
||||
RES_BLUR="$path/blur.png"
|
||||
RES_DIMBLUR="$path/dimblur.png"
|
||||
RES_PIXEL="$path/pixel.png"
|
||||
RES_DIMPIXEL="$path/dimpixel.png"
|
||||
RES_COLOR="$path/color.png"
|
||||
|
||||
# resize
|
||||
base_resize "$base" "$RES_RESIZE" "$resolution"
|
||||
|
||||
# effects
|
||||
for effect in "${fx_list[@]}"; do
|
||||
case $effect in
|
||||
dim) fx_dim "$RES_RESIZE" "$RES_DIM";;
|
||||
blur) fx_blur "$RES_RESIZE" "$RES_BLUR" "$resolution";;
|
||||
dimblur) fx_dimblur "$RES_RESIZE" "$RES_DIMBLUR" "$resolution";;
|
||||
pixel) fx_pixel "$RES_RESIZE" "$RES_PIXEL";;
|
||||
dimpixel) fx_dimpixel "$RES_RESIZE" "$RES_DIMPIXEL";;
|
||||
color) fx_color "$RES_COLOR" "$resolution";;
|
||||
esac
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
# apply resize
|
||||
base_resize() {
|
||||
local input="$1"
|
||||
local output="$2"
|
||||
local size="$3"
|
||||
|
||||
echof act "Resizing base image..."
|
||||
eval $convert_command "$input" \
|
||||
-resize "$size""^" \
|
||||
-gravity center \
|
||||
-extent "$size" \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# apply dim
|
||||
fx_dim() {
|
||||
local input="$1"
|
||||
local output="$2"
|
||||
|
||||
echof act "Rendering 'dim' effect..."
|
||||
eval $convert_command "$input" \
|
||||
-fill black -colorize "$dim_level"% \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# apply blur
|
||||
fx_blur() {
|
||||
local input="$1"
|
||||
local output="$2"
|
||||
local size="$3"
|
||||
|
||||
echof act "Rendering 'blur' effect..."
|
||||
blur_shrink=$(echo "scale=2; 20 / $blur_level" | bc)
|
||||
blur_sigma=$(echo "scale=2; 0.6 * $blur_level" | bc)
|
||||
eval $convert_command "$input" \
|
||||
-filter Gaussian \
|
||||
-resize "$blur_shrink%" \
|
||||
-define "filter:sigma=$blur_sigma" \
|
||||
-resize "$size^" -gravity center -extent "$size" \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# apply dimblur
|
||||
fx_dimblur() {
|
||||
local input="$1"
|
||||
local output="$2"
|
||||
local size="$3"
|
||||
|
||||
echof act "Rendering 'dimblur' effect..."
|
||||
blur_shrink=$(echo "scale=2; 20 / $blur_level" | bc)
|
||||
blur_sigma=$(echo "scale=2; 0.6 * $blur_level" | bc)
|
||||
eval $convert_command "$input" \
|
||||
-fill black -colorize "$dim_level"% \
|
||||
-filter Gaussian \
|
||||
-resize "$blur_shrink%" \
|
||||
-define "filter:sigma=$blur_sigma" \
|
||||
-resize "$size^" -gravity center -extent "$size" \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# pixelate
|
||||
fx_pixel() {
|
||||
local input="$1"
|
||||
local output="$2"
|
||||
|
||||
echof act "Rendering 'pixel' effect..."
|
||||
IFS=',' read -ra range <<< "$pixel_scale"
|
||||
eval $convert_command "$input" \
|
||||
-scale "${range[0]}"% -scale "${range[1]}"% \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# apply dimpixel
|
||||
fx_dimpixel() {
|
||||
local input="$1"
|
||||
local output="$2"
|
||||
|
||||
echof act "Rendering 'dimpixel' effect..."
|
||||
IFS=',' read -ra range <<< "$pixel_scale"
|
||||
eval $convert_command "$input" \
|
||||
-fill black -colorize "$dim_level"% \
|
||||
-scale "${range[0]}"% -scale "${range[1]}"% \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# create solid color
|
||||
fx_color() {
|
||||
local output="$1"
|
||||
local size="$2"
|
||||
|
||||
echof act "Rendering 'color' effect..."
|
||||
eval $convert_command -size "$size" canvas:\#"$solid_color" "$RES_COLOR"
|
||||
}
|
||||
|
||||
# create loginbox rectangle, set "$RECTANGLE"
|
||||
create_loginbox () {
|
||||
RECTANGLE="$CUR_DIR/rectangle.png"
|
||||
local shadow="$CUR_DIR/shadow.png"
|
||||
local width height
|
||||
width=$(logical_px 340 1)
|
||||
height=$(logical_px 100 2)
|
||||
$convert_command -size "$width"x"$height" xc:\#"$loginbox" -fill none "$RECTANGLE"
|
||||
$convert_command "$RECTANGLE" \
|
||||
\( -clone 0 -background \#"$loginshadow" -shadow 100x5+0+0 \) +swap \
|
||||
-background none -layers merge +repage "$shadow"
|
||||
$composite_command -compose Dst_Out -gravity center \
|
||||
"$RECTANGLE" "$shadow" -alpha Set "$shadow"
|
||||
$convert_command "$shadow" "$RECTANGLE" -geometry +10+10 -composite "$RECTANGLE"
|
||||
[[ "$shadow" ]] && rm "$shadow"
|
||||
}
|
||||
|
||||
# create rectangle with description, set "$DESCRECT"
|
||||
create_description () {
|
||||
DESCRECT="$CUR_DIR/description.png"
|
||||
local shadow="$CUR_DIR/shadow.png"
|
||||
$convert_command -background none -family "$(fc-match "$font" family)" -style Normal -pointsize 14 -fill \#"$greetercolor" label:"\ $description\ " -bordercolor \#"$loginbox" -border 10 "$DESCRECT"
|
||||
$convert_command "$DESCRECT" \
|
||||
\( -clone 0 -background \#"$loginshadow" -shadow 100x5+0+0 \) +swap \
|
||||
-background none -layers merge +repage "$shadow"
|
||||
$composite_command -compose Dst_Out -gravity center \
|
||||
"$DESCRECT" "$shadow" -alpha Set "$shadow"
|
||||
$convert_command "$shadow" "$DESCRECT" -geometry +10+10 -composite "$DESCRECT"
|
||||
[[ "$shadow" ]] && rm "$shadow"
|
||||
}
|
||||
|
||||
# delete and recreate directory
|
||||
purge_cache () {
|
||||
if [[ -d "$1" ]]; then
|
||||
rm -r "$1"
|
||||
fi
|
||||
mkdir -p "$1"
|
||||
}
|
||||
|
||||
# update lockscreen and wallpaper images
|
||||
update () {
|
||||
local images=("$@")
|
||||
|
||||
echof act "Updating image cache..."
|
||||
mkdir -p "$CACHE_DIR" &>/dev/null
|
||||
|
||||
get_display_list # DISPLAY_LIST
|
||||
get_total_size # TOTAL_SIZE
|
||||
echof info "Detected ${#DISPLAY_LIST[@]} display(s) @ $TOTAL_SIZE total resolution"
|
||||
|
||||
get_wall_list "${images[@]}" # WALL_LIST
|
||||
echof info "Original image(s): ${WALL_LIST[*]##*/}"
|
||||
|
||||
# Prepare description box to obtain width for positioning
|
||||
local descwidth
|
||||
local descheight
|
||||
if [ -z "$description" ]; then
|
||||
descwidth=0
|
||||
descheight=0
|
||||
else
|
||||
create_description
|
||||
descwidth=$(identify -format "%[fx:w]" "$DESCRECT")
|
||||
descheight=$(identify -format "%[fx:h]" "$DESCRECT")
|
||||
fi
|
||||
|
||||
for ((i=0; i<${#DISPLAY_LIST[@]}; i++)); do
|
||||
display="${DISPLAY_LIST[$i]}"
|
||||
USER_WALL="${WALL_LIST[$i]}"
|
||||
|
||||
# escape spaces for IM
|
||||
if echo "$USER_WALL" | grep -E -q "[[:space:]]"; then
|
||||
USER_WALL="${USER_WALL// /\\ }"
|
||||
fi
|
||||
|
||||
IFS=' ' read -r -a dinfo <<< "$display"
|
||||
local id="${dinfo[0]}"
|
||||
local device="${dinfo[1]}"
|
||||
local geometry="${dinfo[2]}"
|
||||
|
||||
read -r -a cols <<< "${geometry//[x+-]/ }"
|
||||
local position="${geometry#*"${cols[1]}"}"
|
||||
local resolution="${geometry%"${position}"*}"
|
||||
|
||||
if [[ $id -eq "$display_on" ]] || [[ "$display_on" -eq 0 ]]; then
|
||||
|
||||
IFS='x' read -r -a dimension <<< "$resolution"
|
||||
res_x="${dimension[0]}"
|
||||
res_y="${dimension[1]}"
|
||||
read -r -a val <<< "${position//[+-]/ }"
|
||||
read -r -a sym <<< "${position//[0-9]/ }"
|
||||
pos_x="${sym[0]}${val[0]}"
|
||||
pos_y="${sym[1]}${val[1]}"
|
||||
|
||||
rect_x=$((pos_x + $(logical_px 15 1)))
|
||||
rect_y=$((pos_y + res_y - $(logical_px 140 2)))
|
||||
positions+=("+$((rect_x))+$((rect_y))")
|
||||
|
||||
descrect_x=$((pos_x + res_x - descwidth - $(logical_px 15 1)))
|
||||
descrect_y=$((pos_y + res_y - descheight - $(logical_px 20 2)))
|
||||
positions_desc+=("+$((descrect_x))+$((descrect_y))")
|
||||
fi
|
||||
|
||||
local path="$CACHE_DIR/$id-$device"
|
||||
purge_cache "$path"
|
||||
|
||||
if [ "$span_image" = true ]; then
|
||||
if [ "$id" -gt 1 ]; then
|
||||
continue
|
||||
else
|
||||
device="[span]"
|
||||
id="*"
|
||||
resolution="$TOTAL_SIZE"
|
||||
fi
|
||||
fi
|
||||
|
||||
echof info "Processing display: $device ($id)"
|
||||
echof info "Resolution: $resolution"
|
||||
|
||||
if [ "$span_image" = true ]; then
|
||||
resize_and_render "$USER_WALL" "$path" "$resolution"
|
||||
else
|
||||
resize_and_render "$USER_WALL" "$path" "$resolution"
|
||||
|
||||
PARAM_RESIZE="$PARAM_RESIZE $RES_RESIZE -geometry $position -composite "
|
||||
PARAM_DIM="$PARAM_DIM $RES_DIM -geometry $position -composite "
|
||||
PARAM_BLUR="$PARAM_BLUR $RES_BLUR -geometry $position -composite "
|
||||
PARAM_DIMBLUR="$PARAM_DIMBLUR $RES_DIMBLUR -geometry $position -composite "
|
||||
PARAM_PIXEL="$PARAM_PIXEL $RES_PIXEL -geometry $position -composite "
|
||||
PARAM_DIMPIXEL="$PARAM_DIMPIXEL $RES_DIMPIXEL -geometry $position -composite "
|
||||
PARAM_COLOR="$PARAM_COLOR $RES_COLOR -geometry $position -composite "
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
purge_cache "$CUR_DIR"
|
||||
|
||||
if [ "$span_image" = true ] || [ ${#DISPLAY_LIST[@]} -lt 2 ]; then
|
||||
echof act "Rendering final wallpaper images..."
|
||||
[[ -f "$RES_RESIZE" ]] && eval "cp $RES_RESIZE $CUR_W_RESIZE"
|
||||
[[ -f "$RES_DIM" ]] && eval "cp $RES_DIM $CUR_W_DIM"
|
||||
[[ -f "$RES_BLUR" ]] && eval "cp $RES_BLUR $CUR_W_BLUR"
|
||||
[[ -f "$RES_DIMBLUR" ]] && eval "cp $RES_DIMBLUR $CUR_W_DIMBLUR"
|
||||
[[ -f "$RES_PIXEL" ]] && eval "cp $RES_PIXEL $CUR_W_PIXEL"
|
||||
[[ -f "$RES_DIMPIXEL" ]] && eval "cp $RES_DIMPIXEL $CUR_W_DIMPIXEL"
|
||||
[[ -f "$RES_COLOR" ]] && eval "cp $RES_COLOR $CUR_W_COLOR"
|
||||
else
|
||||
echof act "Creating canvas: $TOTAL_SIZE"
|
||||
[[ -f "$RES_RESIZE" ]] && eval "$convert_command -size $TOTAL_SIZE 'xc:blue' $CUR_W_RESIZE"
|
||||
[[ -f "$RES_DIM" ]] && eval "$convert_command -size $TOTAL_SIZE 'xc:blue' $CUR_W_DIM"
|
||||
[[ -f "$RES_BLUR" ]] && eval "$convert_command -size $TOTAL_SIZE 'xc:blue' $CUR_W_BLUR"
|
||||
[[ -f "$RES_DIMBLUR" ]] && eval "$convert_command -size $TOTAL_SIZE 'xc:blue' $CUR_W_DIMBLUR"
|
||||
[[ -f "$RES_PIXEL" ]] && eval "$convert_command -size $TOTAL_SIZE 'xc:blue' $CUR_W_PIXEL"
|
||||
[[ -f "$RES_DIMPIXEL" ]] && eval "$convert_command -size $TOTAL_SIZE 'xc:blue' $CUR_W_DIMPIXEL"
|
||||
[[ -f "$RES_COLOR" ]] && eval "$convert_command -size $TOTAL_SIZE 'xc:blue' $CUR_W_COLOR"
|
||||
|
||||
echof act "Rendering final wallpaper images..."
|
||||
[[ -f "$CUR_W_RESIZE" ]] && eval "$convert_command $CUR_W_RESIZE $PARAM_RESIZE $CUR_W_RESIZE"
|
||||
[[ -f "$CUR_W_DIM" ]] && eval "$convert_command $CUR_W_DIM $PARAM_DIM $CUR_W_DIM"
|
||||
[[ -f "$CUR_W_BLUR" ]] && eval "$convert_command $CUR_W_BLUR $PARAM_BLUR $CUR_W_BLUR"
|
||||
[[ -f "$CUR_W_DIMBLUR" ]] && eval "$convert_command $CUR_W_DIMBLUR $PARAM_DIMBLUR $CUR_W_DIMBLUR"
|
||||
[[ -f "$CUR_W_PIXEL" ]] && eval "$convert_command $CUR_W_PIXEL $PARAM_PIXEL $CUR_W_PIXEL"
|
||||
[[ -f "$CUR_W_DIMPIXEL" ]] && eval "$convert_command $CUR_W_DIMPIXEL $PARAM_DIMPIXEL $CUR_W_DIMPIXEL"
|
||||
[[ -f "$CUR_W_COLOR" ]] && eval "$convert_command $CUR_W_COLOR $PARAM_COLOR $CUR_W_COLOR"
|
||||
fi
|
||||
|
||||
echof act "Rendering final lockscreen images..."
|
||||
|
||||
create_loginbox
|
||||
for pos in "${positions[@]}"; do
|
||||
PARAM_RECT="$PARAM_RECT $RECTANGLE -geometry $pos -composite "
|
||||
done
|
||||
|
||||
if [ -n "$description" ]; then
|
||||
create_description
|
||||
for descpos in "${positions_desc[@]}"; do
|
||||
PARAM_RECT="$PARAM_RECT $DESCRECT -geometry $descpos -composite "
|
||||
done
|
||||
fi
|
||||
|
||||
[[ -f "$CUR_W_RESIZE" ]] && eval "$convert_command $CUR_W_RESIZE $PARAM_RECT $CUR_L_RESIZE"
|
||||
[[ -f "$CUR_W_DIM" ]] && eval "$convert_command $CUR_W_DIM $PARAM_RECT $CUR_L_DIM"
|
||||
[[ -f "$CUR_W_BLUR" ]] && eval "$convert_command $CUR_W_BLUR $PARAM_RECT $CUR_L_BLUR"
|
||||
[[ -f "$CUR_W_DIMBLUR" ]] && eval "$convert_command $CUR_W_DIMBLUR $PARAM_RECT $CUR_L_DIMBLUR"
|
||||
[[ -f "$CUR_W_PIXEL" ]] && eval "$convert_command $CUR_W_PIXEL $PARAM_RECT $CUR_L_PIXEL"
|
||||
[[ -f "$CUR_W_DIMPIXEL" ]] && eval "$convert_command $CUR_W_DIMPIXEL $PARAM_RECT $CUR_L_DIMPIXEL"
|
||||
[[ -f "$CUR_W_COLOR" ]] && eval "$convert_command $CUR_W_COLOR $PARAM_RECT $CUR_L_COLOR"
|
||||
|
||||
[[ "$RECTANGLE" ]] && rm "$RECTANGLE"
|
||||
[[ "$DESCRECT" ]] && rm "$DESCRECT"
|
||||
|
||||
echof ok "Done"
|
||||
|
||||
}
|
||||
|
||||
# set wallpaper with effect
|
||||
wallpaper() {
|
||||
local effect="$1"
|
||||
|
||||
# make wallpaper span displays
|
||||
get_display_list
|
||||
if [ "$span_image" = true ] || [[ "${#DISPLAY_LIST[@]}" -gt 1 ]]; then
|
||||
wallpaper_cmd="$wallpaper_cmd --no-xinerama"
|
||||
fi
|
||||
|
||||
# set wallpaper
|
||||
case "$effect" in
|
||||
dim) wallpaper="$CUR_W_DIM";;
|
||||
blur) wallpaper="$CUR_W_BLUR";;
|
||||
dimblur) wallpaper="$CUR_W_DIMBLUR";;
|
||||
pixel) wallpaper="$CUR_W_PIXEL";;
|
||||
dimpixel) wallpaper="$CUR_W_DIMPIXEL";;
|
||||
color) wallpaper="$CUR_W_COLOR";;
|
||||
*) wallpaper="$CUR_W_RESIZE";;
|
||||
esac
|
||||
eval "$wallpaper_cmd $wallpaper"
|
||||
}
|
||||
|
||||
# wrap echo with fancy prefix
|
||||
echof() {
|
||||
local prefix="$1"
|
||||
local message="$2"
|
||||
|
||||
case "$prefix" in
|
||||
header) msgpfx="[\e[1;95mB\e[m]";;
|
||||
info) msgpfx="[\e[1;97m=\e[m]";;
|
||||
act) msgpfx="[\e[1;92m*\e[m]";;
|
||||
ok) msgpfx="[\e[1;93m+\e[m]";;
|
||||
error) msgpfx="[\e[1;91m!\e[m]";;
|
||||
*) msgpfx="";;
|
||||
esac
|
||||
[ "$quiet" != true ] && echo -e "$msgpfx $message"
|
||||
}
|
||||
|
||||
# help message
|
||||
usage() {
|
||||
echo
|
||||
echo "Usage: betterlockscreen [-u <PATH>] [-l <EFFECT>] [-w <EFFECT>]"
|
||||
echo
|
||||
echo " -q --quiet"
|
||||
echo " Do not produce any text output on locking"
|
||||
echo
|
||||
echo " -u --update <PATH>"
|
||||
echo " Update lock screen image"
|
||||
echo
|
||||
echo " -l --lock <EFFECT>"
|
||||
echo " Lock screen with cached image"
|
||||
echo
|
||||
echo " -w --wall <EFFECT>"
|
||||
echo " Set wallpaper with cached image"
|
||||
echo
|
||||
echo "Additional arguments:"
|
||||
echo
|
||||
echo " --display <N>"
|
||||
echo " Set display to draw loginbox"
|
||||
echo
|
||||
echo " --span"
|
||||
echo " Scale image to span multiple displays"
|
||||
echo
|
||||
echo " --off <N>"
|
||||
echo " Turn display off after N seconds"
|
||||
echo
|
||||
echo " --fx <EFFECT,EFFECT,EFFECT>"
|
||||
echo " List of effects to generate"
|
||||
echo
|
||||
echo " --desc <DESCRIPTION>"
|
||||
echo " Set a description for the new lock screen image"
|
||||
echo " (Only has an effect in combination with --update)"
|
||||
echo
|
||||
echo " --show-layout"
|
||||
echo " Show current keyboard layout"
|
||||
echo
|
||||
echo " --wallpaper-cmd <command>"
|
||||
echo " to set your custom wallpaper setter"
|
||||
echo
|
||||
echo " --time-format <format>"
|
||||
echo " to set the time format used by i3lock-color"
|
||||
echo
|
||||
echo " -- <ARGS>"
|
||||
echo " Pass additional arguments to i3lock"
|
||||
echo
|
||||
echo "Effects arguments:"
|
||||
echo
|
||||
echo " --dim <N>"
|
||||
echo " Dim image N percent (0-100)"
|
||||
echo
|
||||
echo " --blur <N>"
|
||||
echo " Blur image N amount (0.0-1.0)"
|
||||
echo
|
||||
echo " --pixel <N,N>"
|
||||
echo " Pixelate image with N shrink and N grow (unsupported)"
|
||||
echo
|
||||
echo " --color <HEX>"
|
||||
echo " Solid color background with HEX"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
lockargs=(-n)
|
||||
|
||||
init_config
|
||||
|
||||
# show usage when no arguments passed
|
||||
[[ "$1" = "" ]] && usage
|
||||
|
||||
# process arguments
|
||||
for arg in "$@"; do
|
||||
[[ "${arg:0:1}" = '-' ]] || continue
|
||||
|
||||
case "$1" in
|
||||
|
||||
-q | --quiet)
|
||||
quiet=true
|
||||
shift
|
||||
;;
|
||||
|
||||
-u | --update)
|
||||
runupdate=true
|
||||
imagepaths+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
|
||||
-s | --suspend)
|
||||
runsuspend=true
|
||||
;&
|
||||
|
||||
-l | --lock)
|
||||
runlock=true
|
||||
if [[ ${2:0:1} = '-' ]]; then
|
||||
shift 1
|
||||
else
|
||||
lockstyle="$2"; shift 2
|
||||
fi
|
||||
;;
|
||||
|
||||
-w | --wall)
|
||||
wallpaper "$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--wallpaper-cmd)
|
||||
wallpaper_cmd="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--time-format)
|
||||
time_format="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--display)
|
||||
display_on="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--span)
|
||||
span_image=true
|
||||
shift 1
|
||||
;;
|
||||
|
||||
--off)
|
||||
lock_timeout="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--text)
|
||||
locktext="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--show-layout)
|
||||
keylayout="$2";
|
||||
lockargs+=(--keylayout "${keylayout:-0}")
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--fx)
|
||||
IFS=',' read -ra fx_list <<< "$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--dim)
|
||||
dim_level="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--blur)
|
||||
blur_level="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--pixel)
|
||||
pixel_scale="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--color)
|
||||
solid_color="${2//\#/}"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--desc)
|
||||
description="$2"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
-v | --version)
|
||||
echo
|
||||
echo "Betterlockscreen: version: v$VERSION (dunst: $DUNST_INSTALLED, feh: $FEH_INSTALLED)"
|
||||
$i3lockcolor_bin --version
|
||||
$convert_command --version
|
||||
|
||||
if [[ "$DUNST_INSTALLED" == "true" ]]; then
|
||||
dunstctl debug
|
||||
fi
|
||||
|
||||
if [[ "$FEH_INSTALLED" == "true" ]]; then
|
||||
feh --version
|
||||
fi
|
||||
|
||||
break
|
||||
;;
|
||||
|
||||
--)
|
||||
lockargs+=("${@:2}")
|
||||
break
|
||||
;;
|
||||
|
||||
-h | --help | *)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echof header "Betterlockscreen"
|
||||
|
||||
# Run image generation
|
||||
[[ $runupdate ]] && update "${imagepaths[@]}"
|
||||
|
||||
# Activate lockscreen
|
||||
[[ $runlock ]] && lockinit "$lockstyle"
|
||||
|
||||
exit 0
|
53
local-bin/.local/bin/dbeaver-backup.sh
Executable file
53
local-bin/.local/bin/dbeaver-backup.sh
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
# DBeaver Profile Backup Script
|
||||
# This script creates a backup of DBeaver profiles and configurations
|
||||
|
||||
# Configuration variables - modify as needed
|
||||
BACKUP_DIR="/home/forbi/Sync/Backups"
|
||||
HOSTNAME=$(hostname)
|
||||
BACKUP_FILE="dbeaver_backup_${HOSTNAME}.tar.gz"
|
||||
LOG_FILE="$BACKUP_DIR/dbeaver_backup_log.txt"
|
||||
|
||||
# DBeaver configuration location
|
||||
DBEAVER_DATA="$HOME/.local/share/DBeaverData" # Contains drivers, workspace, and secure storage
|
||||
|
||||
# Create backup directory if it doesn't exist
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
# Start logging
|
||||
echo "===== DBeaver Backup Started at $(date) =====" >>"$LOG_FILE"
|
||||
|
||||
# Check if DBeaver configuration exists
|
||||
if [ ! -d "$DBEAVER_DATA" ]; then
|
||||
echo "Error: DBeaver configuration not found at $DBEAVER_DATA. Please make sure DBeaver is installed and has been run at least once." | tee -a "$LOG_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create temporary directory for backup
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
echo "Created temporary directory: $TEMP_DIR" >>"$LOG_FILE"
|
||||
|
||||
# Copy DBeaver data to temporary directory
|
||||
echo "Copying DBeaver data from $DBEAVER_DATA..." >>"$LOG_FILE"
|
||||
cp -r "$DBEAVER_DATA" "$TEMP_DIR/"
|
||||
|
||||
# Create compressed archive
|
||||
echo "Creating backup archive..." >>"$LOG_FILE"
|
||||
tar -czf "$BACKUP_DIR/$BACKUP_FILE" -C "$TEMP_DIR" .
|
||||
BACKUP_RESULT=$?
|
||||
|
||||
# Clean up temporary directory
|
||||
echo "Cleaning up temporary files..." >>"$LOG_FILE"
|
||||
rm -rf "$TEMP_DIR"
|
||||
|
||||
# Check if backup was successful
|
||||
if [ $BACKUP_RESULT -eq 0 ]; then
|
||||
echo "Backup completed successfully: $BACKUP_DIR/$BACKUP_FILE" | tee -a "$LOG_FILE"
|
||||
echo "Backup size: $(du -h "$BACKUP_DIR/$BACKUP_FILE" | cut -f1)" | tee -a "$LOG_FILE"
|
||||
echo "Keeping only the latest backup for this PC ($HOSTNAME)" >>"$LOG_FILE"
|
||||
else
|
||||
echo "Error: Backup failed with exit code $BACKUP_RESULT" | tee -a "$LOG_FILE"
|
||||
fi
|
||||
|
||||
echo "===== DBeaver Backup Finished at $(date) =====" >>"$LOG_FILE"
|
72
local-bin/.local/bin/dbeaver-restore.sh
Executable file
72
local-bin/.local/bin/dbeaver-restore.sh
Executable file
|
@ -0,0 +1,72 @@
|
|||
#!/bin/bash
|
||||
# DBeaver Profile Restore Script
|
||||
# This script restores a DBeaver backup created with the backup script
|
||||
|
||||
# Configuration variables - modify as needed
|
||||
BACKUP_DIR="/home/forbi/Sync/Backups"
|
||||
HOSTNAME=main
|
||||
BACKUP_FILE="dbeaver_backup_${HOSTNAME}.tar.gz"
|
||||
LOG_FILE="$BACKUP_DIR/dbeaver_restore_log.txt"
|
||||
|
||||
# DBeaver configuration location
|
||||
DBEAVER_DATA="$HOME/.local/share/DBeaverData"
|
||||
|
||||
# Start logging
|
||||
echo "===== DBeaver Restore Started at $(date) =====" >>"$LOG_FILE"
|
||||
|
||||
# Check if backup file exists
|
||||
if [ ! -f "$BACKUP_DIR/$BACKUP_FILE" ]; then
|
||||
echo "Error: Backup file not found at $BACKUP_DIR/$BACKUP_FILE" | tee -a "$LOG_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if DBeaver data directory exists and create backup if it does
|
||||
if [ -d "$DBEAVER_DATA" ]; then
|
||||
echo "DBeaver data directory exists. Creating backup before restoration..." | tee -a "$LOG_FILE"
|
||||
TEMP_BACKUP="${DBEAVER_DATA}_backup_$(date +%Y%m%d_%H%M%S)"
|
||||
mv "$DBEAVER_DATA" "$TEMP_BACKUP"
|
||||
echo "Original data backed up to: $TEMP_BACKUP" | tee -a "$LOG_FILE"
|
||||
fi
|
||||
|
||||
# Create temporary directory for extraction
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
echo "Created temporary directory for extraction: $TEMP_DIR" >>"$LOG_FILE"
|
||||
|
||||
# Extract backup file
|
||||
echo "Extracting backup archive..." | tee -a "$LOG_FILE"
|
||||
tar -xzf "$BACKUP_DIR/$BACKUP_FILE" -C "$TEMP_DIR"
|
||||
EXTRACT_RESULT=$?
|
||||
|
||||
if [ $EXTRACT_RESULT -ne 0 ]; then
|
||||
echo "Error: Failed to extract backup with exit code $EXTRACT_RESULT" | tee -a "$LOG_FILE"
|
||||
rm -rf "$TEMP_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create target directory if it doesn't exist
|
||||
mkdir -p "$(dirname "$DBEAVER_DATA")"
|
||||
|
||||
# Copy extracted content to DBeaver data directory
|
||||
echo "Restoring DBeaver data to $DBEAVER_DATA..." | tee -a "$LOG_FILE"
|
||||
cp -r "$TEMP_DIR/DBeaverData" "$(dirname "$DBEAVER_DATA")/"
|
||||
RESTORE_RESULT=$?
|
||||
|
||||
# Clean up temporary directory
|
||||
echo "Cleaning up temporary files..." >>"$LOG_FILE"
|
||||
rm -rf "$TEMP_DIR"
|
||||
|
||||
# Check if restore was successful
|
||||
if [ $RESTORE_RESULT -eq 0 ]; then
|
||||
echo "Restore completed successfully to: $DBEAVER_DATA" | tee -a "$LOG_FILE"
|
||||
echo "You may need to restart DBeaver for changes to take effect." | tee -a "$LOG_FILE"
|
||||
else
|
||||
echo "Error: Restore failed with exit code $RESTORE_RESULT" | tee -a "$LOG_FILE"
|
||||
if [ -d "$TEMP_BACKUP" ]; then
|
||||
echo "Attempting to restore original data from backup..." | tee -a "$LOG_FILE"
|
||||
rm -rf "$DBEAVER_DATA"
|
||||
mv "$TEMP_BACKUP" "$DBEAVER_DATA"
|
||||
echo "Original data restored from backup." | tee -a "$LOG_FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "===== DBeaver Restore Finished at $(date) =====" >>"$LOG_FILE"
|
237
local-bin/.local/bin/maintenance.sh
Executable file
237
local-bin/.local/bin/maintenance.sh
Executable file
|
@ -0,0 +1,237 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Make sure we're running as root or with sudo
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
gum style --foreground 196 --bold "This script must be run as root or with sudo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if gum is installed
|
||||
if ! command -v gum &>/dev/null; then
|
||||
echo "This script uses gum for a nice interface."
|
||||
echo "Please install gum first: pacman -S gum"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Function to print section headers
|
||||
print_section() {
|
||||
gum style --border normal --border-foreground 39 --margin "1" --padding "0 2" --bold "$1"
|
||||
}
|
||||
|
||||
# Function to print tasks
|
||||
print_task() {
|
||||
echo "→ $1..."
|
||||
}
|
||||
|
||||
# Function to print success messages
|
||||
print_success() {
|
||||
gum style --foreground 46 "✓ $1"
|
||||
}
|
||||
|
||||
# Function to print warning messages
|
||||
print_warning() {
|
||||
gum style --foreground 226 "⚠ $1"
|
||||
}
|
||||
|
||||
# Starting message
|
||||
# Starting message
|
||||
echo "=== Arch Linux System Maintenance ==="
|
||||
|
||||
# Update the system
|
||||
print_section "Updating System"
|
||||
|
||||
# Sync package database
|
||||
print_task "Synchronizing package databases"
|
||||
pacman -Sy
|
||||
print_success "Package databases synchronized"
|
||||
|
||||
# Clean package caches
|
||||
print_section "Cleaning Package Caches"
|
||||
|
||||
# Clean pacman cache
|
||||
print_task "Cleaning pacman cache"
|
||||
pacman -Sc --noconfirm
|
||||
print_success "Pacman cache cleaned"
|
||||
|
||||
# Clean AUR cache if paru is installed
|
||||
if command -v paru &>/dev/null; then
|
||||
print_task "Cleaning paru cache"
|
||||
paru -Sc --noconfirm
|
||||
print_success "Paru cache cleaned"
|
||||
else
|
||||
print_warning "paru not found. Skipping AUR cache cleanup."
|
||||
fi
|
||||
|
||||
# Remove orphaned packages
|
||||
print_section "Removing Orphaned Packages"
|
||||
print_task "Finding orphaned packages"
|
||||
ORPHANS=$(pacman -Qtdq)
|
||||
if [ -n "$ORPHANS" ]; then
|
||||
echo "Found orphaned packages:"
|
||||
echo "$ORPHANS"
|
||||
|
||||
print_task "Removing orphaned packages"
|
||||
pacman -Rns $(pacman -Qtdq) --noconfirm
|
||||
print_success "Orphaned packages removed"
|
||||
else
|
||||
print_success "No orphaned packages found"
|
||||
fi
|
||||
|
||||
# Clean user cache directory
|
||||
print_section "Cleaning User Cache Directory"
|
||||
|
||||
# Get current user's username
|
||||
CURRENT_USER=$(logname 2>/dev/null || echo $SUDO_USER)
|
||||
|
||||
# If we still don't have a username, try to get it from /home
|
||||
if [ -z "$CURRENT_USER" ]; then
|
||||
CURRENT_USER=$(ls -la /home | grep -v "\.\." | grep -v "total" | awk '{print $9}' | head -1)
|
||||
fi
|
||||
|
||||
echo "Cleaning cache for user: $CURRENT_USER"
|
||||
|
||||
# Create a backup directory
|
||||
BACKUP_DIR="/home/$CURRENT_USER/.cache_backup_$(date +%Y%m%d)"
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
chown $CURRENT_USER:$CURRENT_USER "$BACKUP_DIR"
|
||||
|
||||
# User cache directory
|
||||
USER_CACHE="/home/$CURRENT_USER/.cache"
|
||||
|
||||
if [ -d "$USER_CACHE" ]; then
|
||||
# Firefox cache
|
||||
if [ -d "$USER_CACHE/mozilla" ]; then
|
||||
print_task "Backing up Firefox cache metadata"
|
||||
cp -r "$USER_CACHE/mozilla" "$BACKUP_DIR/"
|
||||
print_task "Cleaning Firefox cache"
|
||||
find "$USER_CACHE/mozilla" -type f -name "*.sqlite" -exec sqlite3 {} "VACUUM;" \;
|
||||
fi
|
||||
|
||||
# Chrome/Chromium cache
|
||||
for chrome_dir in "$USER_CACHE/google-chrome" "$USER_CACHE/chromium"; do
|
||||
if [ -d "$chrome_dir" ]; then
|
||||
print_task "Backing up Chrome/Chromium cache metadata"
|
||||
mkdir -p "$BACKUP_DIR/$(basename $chrome_dir)"
|
||||
cp -r "$chrome_dir/Default/Preferences" "$BACKUP_DIR/$(basename $chrome_dir)/" 2>/dev/null
|
||||
print_task "Cleaning Chrome/Chromium cache"
|
||||
rm -rf "$chrome_dir/Default/Cache" "$chrome_dir/Default/Code Cache" 2>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
# Clean thumbnail cache
|
||||
if [ -d "$USER_CACHE/thumbnails" ]; then
|
||||
print_task "Cleaning thumbnail cache"
|
||||
rm -rf "$USER_CACHE/thumbnails/*" 2>/dev/null
|
||||
fi
|
||||
|
||||
# General cache cleanup (but preserve important files)
|
||||
print_task "Cleaning general cache files"
|
||||
find "$USER_CACHE" -type f -atime +30 -not -path "*/mozilla/*" -not -path "*/chromium/*" -not -path "*/google-chrome/*" -delete 2>/dev/null
|
||||
|
||||
print_success "Cache cleaned for user $CURRENT_USER"
|
||||
else
|
||||
print_warning "Cache directory not found for user $CURRENT_USER"
|
||||
fi
|
||||
|
||||
# Clean system journals
|
||||
print_section "Cleaning System Journals"
|
||||
print_task "Rotating and cleaning journal logs"
|
||||
journalctl --vacuum-time=2weeks
|
||||
print_success "Journal logs cleaned (kept last 2 weeks)"
|
||||
|
||||
# Reset failed services
|
||||
print_section "Resetting Failed Systemd Units"
|
||||
print_task "Checking for failed systemd units"
|
||||
FAILED_UNITS=$(systemctl --failed --no-legend | awk '{print $1}')
|
||||
if [ -n "$FAILED_UNITS" ]; then
|
||||
echo "Failed units found:"
|
||||
echo "$FAILED_UNITS"
|
||||
fi
|
||||
print_task "Clearing failed systemd units"
|
||||
systemctl reset-failed
|
||||
print_success "Failed systemd units cleared"
|
||||
|
||||
# Clean temporary files
|
||||
print_section "Cleaning Temporary Files"
|
||||
print_task "Removing temporary files"
|
||||
rm -rf /tmp/* /var/tmp/* 2>/dev/null
|
||||
print_success "Temporary files removed"
|
||||
|
||||
# Update file database
|
||||
print_section "Updating File Database"
|
||||
if command -v updatedb &>/dev/null; then
|
||||
print_task "Updating file database for locate command"
|
||||
updatedb
|
||||
print_success "File database updated"
|
||||
else
|
||||
print_warning "updatedb not found. Skipping file database update."
|
||||
fi
|
||||
|
||||
# Check for and install security updates
|
||||
print_section "Security Updates Check"
|
||||
print_task "Checking for security updates"
|
||||
SECURITY_UPDATES=$(pacman -Qu | grep -i "security")
|
||||
if [ -n "$SECURITY_UPDATES" ]; then
|
||||
echo "Security updates available:"
|
||||
echo "$SECURITY_UPDATES"
|
||||
|
||||
print_task "Installing security updates"
|
||||
pacman -S --needed $(echo "$SECURITY_UPDATES" | awk '{print $1}') --noconfirm
|
||||
print_success "Security updates installed"
|
||||
else
|
||||
print_success "No security updates needed"
|
||||
fi
|
||||
|
||||
# Check for pacman database errors
|
||||
print_section "Checking Pacman Database"
|
||||
print_task "Verifying package database integrity"
|
||||
if command -v paccheck &>/dev/null; then
|
||||
paccheck --md5sum --quiet
|
||||
print_success "Pacman database check complete"
|
||||
else
|
||||
print_warning "paccheck not found. Consider installing pacutils package."
|
||||
fi
|
||||
|
||||
# Cleanup pacnew/pacsave files
|
||||
print_section "Configuration File Management"
|
||||
print_task "Checking for .pacnew and .pacsave files"
|
||||
PACFILES=$(find /etc -name "*.pacnew" -o -name "*.pacsave" 2>/dev/null)
|
||||
if [ -n "$PACFILES" ]; then
|
||||
echo "Found the following .pacnew/.pacsave files:"
|
||||
echo "$PACFILES"
|
||||
|
||||
print_warning "You may want to merge these configuration files"
|
||||
echo "Use 'pacdiff' to help manage these files (install pacdiff from pacman-contrib)"
|
||||
else
|
||||
print_success "No .pacnew or .pacsave files found"
|
||||
fi
|
||||
|
||||
# System status
|
||||
print_section "System Status"
|
||||
|
||||
# Disk usage with duf
|
||||
print_task "Checking disk usage"
|
||||
if command -v duf &>/dev/null; then
|
||||
duf --only local
|
||||
else
|
||||
print_warning "duf not found. Using df instead. Consider installing duf for better disk usage display."
|
||||
df -h | grep -v "tmpfs" | grep -v "udev"
|
||||
fi
|
||||
|
||||
# Memory usage
|
||||
echo "Memory usage:"
|
||||
free -h
|
||||
|
||||
# Find large files
|
||||
echo "Large files (>100MB) in your home directory:"
|
||||
find /home/$(logname 2>/dev/null || echo $SUDO_USER) -type f -size +100M -exec ls -lh {} \; 2>/dev/null | sort -k5hr | head -n 10
|
||||
|
||||
# Final summary
|
||||
print_section "Maintenance Complete"
|
||||
echo "System maintenance tasks completed successfully"
|
||||
echo "Remember to periodically run additional manual maintenance tasks:"
|
||||
echo "- Check for broken symlinks: find /usr /etc -xtype l -print"
|
||||
echo "- Run a SMART disk check: smartctl -a /dev/sdX (install smartmontools)"
|
||||
echo "- Check systemd boot time: systemd-analyze"
|
||||
|
||||
exit 0
|
25
local-bin/.local/bin/rmq-passwd
Executable file
25
local-bin/.local/bin/rmq-passwd
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
PREFIX="oc-"
|
||||
SUFFIX="-eks-cluster"
|
||||
FINAL=""
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
context="$PREFIX$1$SUFFIX"
|
||||
current_context=$(kubectl config current-context)
|
||||
|
||||
kubectl config use-context $context >/dev/null
|
||||
kubectl config set-context --current --namespace=oc-app >/dev/null
|
||||
|
||||
# is second argument provided then silent exit
|
||||
password=$(kubectl get secret oc-secrets -o jsonpath="{.data.rabbit_passwd}" | base64 --decode)
|
||||
|
||||
printf "$password" | wl-copy
|
||||
# printf "$password" | xsel --clipboard
|
||||
|
||||
# reset context
|
||||
kubectl config use-context $current_context >/dev/null
|
||||
kubectl config set-context --current --namespace=oc-app >/dev/null
|
279
local-bin/.local/bin/run-on-pod
Executable file
279
local-bin/.local/bin/run-on-pod
Executable file
|
@ -0,0 +1,279 @@
|
|||
#!/bin/env bash
|
||||
|
||||
# ARG_OPTIONAL_BOOLEAN([confirm],[c],[Wether to confirm the action or not],[on])
|
||||
# ARG_OPTIONAL_SINGLE([runner],[r],[Specify the runner],[])
|
||||
# ARG_TYPE_GROUP_SET([commands],[COMMAND],[runner],[node, sh],[index])
|
||||
# ARG_POSITIONAL_SINGLE([context],[The Kubernetes context])
|
||||
# ARG_POSITIONAL_SINGLE([script],[The script to run])
|
||||
# ARG_POSITIONAL_SINGLE([pod_name],[The pod name])
|
||||
# ARG_HELP([Prints this help message])
|
||||
# ARG_VERSION([1.0])
|
||||
# ARG_DEFAULTS_POS([])
|
||||
# ARGBASH_GO()
|
||||
# needed because of Argbash --> m4_ignore([
|
||||
### START OF CODE GENERATED BY Argbash v2.10.0 one line above ###
|
||||
# Argbash is a bash code generator used to get arguments parsing right.
|
||||
# Argbash is FREE SOFTWARE, see https://argbash.io for more info
|
||||
|
||||
die() {
|
||||
local _ret="${2:-1}"
|
||||
test "${_PRINT_HELP:-no}" = yes && print_help >&2
|
||||
echo "$1" >&2
|
||||
exit "${_ret}"
|
||||
}
|
||||
|
||||
# validators
|
||||
|
||||
commands() {
|
||||
local _allowed=("node" "sh") _seeking="$1" _idx=0
|
||||
for element in "${_allowed[@]}"; do
|
||||
test "$element" = "$_seeking" && { test "$3" = "idx" && echo "$_idx" || echo "$element"; } && return 0
|
||||
_idx=$((_idx + 1))
|
||||
done
|
||||
die "Value '$_seeking' (of argument '$2') doesn't match the list of allowed values: 'node' and 'sh'" 4
|
||||
}
|
||||
|
||||
begins_with_short_option() {
|
||||
local first_option all_short_options='crhv'
|
||||
first_option="${1:0:1}"
|
||||
test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0
|
||||
}
|
||||
|
||||
# THE DEFAULTS INITIALIZATION - POSITIONALS
|
||||
_positionals=()
|
||||
_arg_context=
|
||||
_arg_script=
|
||||
_arg_pod_name=
|
||||
# THE DEFAULTS INITIALIZATION - OPTIONALS
|
||||
_arg_confirm="on"
|
||||
_arg_runner="sh"
|
||||
|
||||
print_help() {
|
||||
printf '%s\n' "Prints this help message"
|
||||
printf 'Usage: %s [-c|--(no-)confirm] [-r|--runner <COMMAND>] [-h|--help] [-v|--version] <context> <script> <pod_name>\n' "$0"
|
||||
printf '\t%s\n' "<context>: The Kubernetes context"
|
||||
printf '\t%s\n' "<script>: The script to run"
|
||||
printf '\t%s\n' "<pod_name>: The pod name"
|
||||
printf '\t%s\n' "-c, --confirm, --no-confirm: Wether to confirm the action or not (on by default)"
|
||||
printf '\t%s\n' "-r, --runner: Specify the runner. Can be one of: 'node' and 'sh' (sh)"
|
||||
printf '\t%s\n' "-h, --help: Prints help"
|
||||
printf '\t%s\n' "-v, --version: Prints version"
|
||||
}
|
||||
|
||||
parse_commandline() {
|
||||
_positionals_count=0
|
||||
while test $# -gt 0; do
|
||||
_key="$1"
|
||||
case "$_key" in
|
||||
-c | --no-confirm | --confirm)
|
||||
_arg_confirm="on"
|
||||
test "${1:0:5}" = "--no-" && _arg_confirm="off"
|
||||
;;
|
||||
-c*)
|
||||
_arg_confirm="on"
|
||||
_next="${_key##-c}"
|
||||
if test -n "$_next" -a "$_next" != "$_key"; then
|
||||
{ begins_with_short_option "$_next" && shift && set -- "-c" "-${_next}" "$@"; } || die "The short option '$_key' can't be decomposed to ${_key:0:2} and -${_key:2}, because ${_key:0:2} doesn't accept value and '-${_key:2:1}' doesn't correspond to a short option."
|
||||
fi
|
||||
;;
|
||||
-r | --runner)
|
||||
test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1
|
||||
_arg_runner="$(commands "$2" "runner")" || exit 1
|
||||
shift
|
||||
;;
|
||||
--runner=*)
|
||||
_arg_runner="$(commands "${_key##--runner=}" "runner")" || exit 1
|
||||
;;
|
||||
-r*)
|
||||
_arg_runner="$(commands "${_key##-r}" "runner")" || exit 1
|
||||
;;
|
||||
-h | --help)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
-h*)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
-v | --version)
|
||||
1.0
|
||||
exit 0
|
||||
;;
|
||||
-v*)
|
||||
1.0
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
_last_positional="$1"
|
||||
_positionals+=("$_last_positional")
|
||||
_positionals_count=$((_positionals_count + 1))
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
handle_passed_args_count() {
|
||||
local _required_args_string="'context', 'script' and 'pod_name'"
|
||||
test "${_positionals_count}" -ge 3 || _PRINT_HELP=yes die "FATAL ERROR: Not enough positional arguments - we require exactly 3 (namely: $_required_args_string), but got only ${_positionals_count}." 1
|
||||
test "${_positionals_count}" -le 3 || _PRINT_HELP=yes die "FATAL ERROR: There were spurious positional arguments --- we expect exactly 3 (namely: $_required_args_string), but got ${_positionals_count} (the last one was: '${_last_positional}')." 1
|
||||
}
|
||||
|
||||
assign_positional_args() {
|
||||
local _positional_name _shift_for=$1
|
||||
_positional_names="_arg_context _arg_script _arg_pod_name "
|
||||
|
||||
shift "$_shift_for"
|
||||
for _positional_name in ${_positional_names}; do
|
||||
test $# -gt 0 || break
|
||||
eval "$_positional_name=\${1}" || die "Error during argument parsing, possibly an Argbash bug." 1
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
parse_commandline "$@"
|
||||
handle_passed_args_count
|
||||
assign_positional_args 1 "${_positionals[@]}"
|
||||
|
||||
# OTHER STUFF GENERATED BY Argbash
|
||||
# Validation of values
|
||||
_arg_runner_index="$(commands "$_arg_runner" "runner" idx)"
|
||||
|
||||
### END OF CODE GENERATED BY Argbash (sortof) ### ])
|
||||
# [ <-- needed because of Argbash
|
||||
# ] <-- needed because of Argbash
|
||||
|
||||
# Color definitions
|
||||
PURPLE='#c462fc'
|
||||
RED='#f44336'
|
||||
GREEN='#8bc34a'
|
||||
GOLD='#ffd700'
|
||||
|
||||
# Initial settings
|
||||
ORIGINAL_CONTEXT=""
|
||||
|
||||
# Function to print a styled message using gum
|
||||
print_gum_message() {
|
||||
local color="$1"
|
||||
local message="$2"
|
||||
echo -e $(gum style --bold --foreground="$color" -- "$message")
|
||||
}
|
||||
|
||||
# Function to handle confirmation prompts
|
||||
ask_confirmation() {
|
||||
if [ "$_arg_confirm" = "on" ]; then
|
||||
echo -e "$1"
|
||||
CHOICE=$(gum choose "Yes" "No")
|
||||
[ "$CHOICE" = "Yes" ] || exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to list available Kubernetes contexts
|
||||
list_contexts() {
|
||||
kubectl config get-contexts -o name
|
||||
}
|
||||
|
||||
# Function to validate the provided context
|
||||
validate_context() {
|
||||
local context="$1"
|
||||
if ! kubectl config get-contexts -o name | grep -q "^${context}$"; then
|
||||
print_gum_message "$RED" "Invalid context: $context"
|
||||
echo "Available contexts:"
|
||||
list_contexts
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to validate the existence of the script
|
||||
validate_script_existence() {
|
||||
local script="$1"
|
||||
if [ ! -f "$script" ]; then
|
||||
print_gum_message "$RED" "Script not found: $script"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -r "$script" ]; then
|
||||
print_gum_message "$RED" "Script is not readable: $script"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to backup the current Kubernetes context
|
||||
backup_current_context() {
|
||||
ORIGINAL_CONTEXT=$(kubectl config current-context)
|
||||
if [ -z "$ORIGINAL_CONTEXT" ]; then
|
||||
echo "Failed to retrieve the current context"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to restore the original Kubernetes context
|
||||
restore_original_context() {
|
||||
kubectl config use-context "$ORIGINAL_CONTEXT"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to restore the original context"
|
||||
exit 1
|
||||
fi
|
||||
print_gum_message "$GREEN" "Restored original context: $ORIGINAL_CONTEXT"
|
||||
}
|
||||
|
||||
# Function to set Kubernetes context and namespace
|
||||
set_kubernetes_context() {
|
||||
validate_context "$_arg_context"
|
||||
|
||||
kubectl config use-context "$_arg_context" || {
|
||||
echo "Failed to set context"
|
||||
exit 1
|
||||
}
|
||||
|
||||
kubectl config set-context --current --namespace=oc-app || {
|
||||
echo "Failed to set namespace"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Function to get the running pod name
|
||||
get_running_pod() {
|
||||
kubectl get pod --field-selector=status.phase==Running --selector app.kubernetes.io/name="$_arg_pod_name" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null
|
||||
}
|
||||
|
||||
# Main script logic
|
||||
main() {
|
||||
print_gum_message "$GREEN" "Using \"$_arg_runner\" runner"
|
||||
|
||||
validate_context "$_arg_context"
|
||||
|
||||
# Validate script existence
|
||||
validate_script_existence "$_arg_script"
|
||||
|
||||
if [ "$_arg_confirm" = "off" ]; then
|
||||
title=$(gum style --bold --foreground="$PURPLE" -- "Running without confirmation in 5 seconds...Press CTRL+C to cancel")
|
||||
echo -e "$title"
|
||||
sleep 5 || exit 1
|
||||
fi
|
||||
|
||||
# Backup the current Kubernetes context
|
||||
backup_current_context
|
||||
|
||||
# Ensure context will be restored on exit
|
||||
trap restore_original_context EXIT
|
||||
|
||||
ask_confirmation "Execute '\e[31m$_arg_script\e[0m' on context '\e[32m$_arg_context\e[0m' using pod '\e[32m$_arg_pod_name\e[0m'?"
|
||||
|
||||
set_kubernetes_context
|
||||
|
||||
print_gum_message "$GREEN" "Getting pod $_arg_pod_name..."
|
||||
pod=$(get_running_pod)
|
||||
if [ -z "$pod" ]; then
|
||||
print_gum_message "$RED" "Pod not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_gum_message "$GREEN" "Found pod $pod"
|
||||
ask_confirmation "Confirm execution of '\e[31m$_arg_script\e[0m' on pod '\e[32m$pod\e[0m'?"
|
||||
|
||||
print_gum_message "$GOLD" "Executing $_arg_script inside $pod..."
|
||||
|
||||
kubectl exec -i "$pod" -- "$_arg_runner" <"$_arg_script"
|
||||
}
|
||||
|
||||
main "$@"
|
51
mise/.config/mise/config.toml
Normal file
51
mise/.config/mise/config.toml
Normal file
|
@ -0,0 +1,51 @@
|
|||
[tools]
|
||||
usage = "latest"
|
||||
nodejs = "16.14.0"
|
||||
golang = "1.23.0"
|
||||
flyctl = "0.1.64"
|
||||
sops = "3.6.1"
|
||||
dotnet = "system"
|
||||
java = "openjdk-17"
|
||||
node = "20"
|
||||
dotnet-core = "8.0.401"
|
||||
bun = "1.2.4"
|
||||
go = "1.24.1"
|
||||
|
||||
[settings]
|
||||
# plugins can read the versions files used by other version managers (if enabled by the plugin)
|
||||
# for example, .nvmrc in the case of node's nvm
|
||||
legacy_version_file = true # enabled by default (unlike asdf)
|
||||
|
||||
# configure `mise install` to always keep the downloaded archive
|
||||
always_keep_download = false # deleted after install by default
|
||||
always_keep_install = false # deleted on failure by default
|
||||
|
||||
# configure how frequently (in minutes) to fetch updated plugin repository changes
|
||||
# this is updated whenever a new runtime is installed
|
||||
# (note: this isn't currently implemented but there are plans to add it: https://github.com/jdx/mise/issues/128)
|
||||
plugin_autoupdate_last_check_duration = '1 week' # set to 0 to disable updates
|
||||
|
||||
# config files with these prefixes will be trusted by default
|
||||
trusted_config_paths = [ ]
|
||||
|
||||
verbose = false # set to true to see full installation output, see `MISE_VERBOSE`
|
||||
asdf_compat = false # set to true to ensure .tool-versions will be compatible with asdf, see `MISE_ASDF_COMPAT`
|
||||
#http_timeout = 30 # set the timeout for http requests in seconds, see `MISE_HTTP_TIMEOUT`
|
||||
jobs = 4 # number of plugins or runtimes to install in parallel. The default is `4`.
|
||||
raw = false # set to true to directly pipe plugins to stdin/stdout/stderr
|
||||
yes = false # set to true to automatically answer yes to all prompts
|
||||
|
||||
not_found_auto_install = true # see MISE_NOT_FOUND_AUTO_INSTALL
|
||||
task_output = "prefix" # see Tasks Runner for more information
|
||||
paranoid = false # see MISE_PARANOID
|
||||
|
||||
shorthands_file = '~/.config/mise/shorthands.toml' # path to the shorthands file, see `MISE_SHORTHANDS_FILE`
|
||||
disable_default_shorthands = false # disable the default shorthands, see `MISE_DISABLE_DEFAULT_SHORTHANDS`
|
||||
# disable_tools = ['node'] # disable specific tools, generally used to turn off core tools
|
||||
|
||||
env_file = '.env' # load env vars from a dotenv file, see `MISE_ENV_FILE`
|
||||
|
||||
experimental = true # enable experimental features
|
||||
|
||||
# configure messages displayed when entering directories with config files
|
||||
status = { missing_tools = "if_other_versions_installed", show_env = false, show_tools = false }
|
BIN
npm/.config/npm/npmrc
Normal file
BIN
npm/.config/npm/npmrc
Normal file
Binary file not shown.
15
rofi/.config/rofi/config
Normal file
15
rofi/.config/rofi/config
Normal file
|
@ -0,0 +1,15 @@
|
|||
rofi.hide-scrollbar: true
|
||||
rofi.modi: combi
|
||||
rofi.terminal: alacritty
|
||||
rofi.kb-cancel: Escape,Alt+F1,Alt+F2
|
||||
rofi.lines: 5
|
||||
rofi.soft: true
|
||||
rofi.sorting-method: fzf
|
||||
rofi.combi-modi: drun,run
|
||||
rofi.combi-hide-mode-prefix: true
|
||||
rofi.display-combi: Search
|
||||
rofi.bw: 2
|
||||
rofi.padding: 0
|
||||
rofi.fixed-num-lines: false
|
||||
rofi.theme: toto.rasi
|
||||
rofi.yoffset: -130
|
60
rofi/.config/rofi/config.rasi
Normal file
60
rofi/.config/rofi/config.rasi
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
configuration {
|
||||
modi: "combi";
|
||||
lines: 5;
|
||||
bw: 2;
|
||||
padding: 0;
|
||||
yoffset: 0;
|
||||
fixed-num-lines: false;
|
||||
terminal: "alacritty";
|
||||
sorting-method: "fzf";
|
||||
combi-modi: "drun,run";
|
||||
hide-scrollbar: true;
|
||||
combi-hide-mode-prefix: true;
|
||||
display-combi: "Search";
|
||||
kb-cancel: "Escape,Alt+F1,Alt+F2";
|
||||
}
|
||||
|
||||
@theme "/usr/share/rofi/themes/fancy.rasi"
|
||||
@theme "/home/forbi/.config/rofi/toto.rasi"
|
||||
*/
|
||||
|
||||
configuration {
|
||||
modi: "drun,run,ssh,filebrowser,powermenu:~/.config/rofi/powermenu.lua";
|
||||
|
||||
me-accept-entry: "MousePrimary";
|
||||
me-select-entry: "";
|
||||
show-icons: true;
|
||||
icon-theme: "ePapirus";
|
||||
application-fallback-icon: "run-build";
|
||||
|
||||
drun-display-format: " {name} ";
|
||||
run-shell-command: "foot {cmd}";
|
||||
ssh-command: "foot --term=xterm ssh {host}";
|
||||
sidebar-mode: true;
|
||||
matching: "fuzzy";
|
||||
scroll-method: 0;
|
||||
disable-history: false;
|
||||
|
||||
display-drun: " Apps";
|
||||
display-run: " Run";
|
||||
display-ssh: " SSH";
|
||||
display-filebrowser: " Files";
|
||||
display-powermenu: " Power";
|
||||
|
||||
combi-modi: "drun,run";
|
||||
sort: true;
|
||||
sorting-method: "fzf";
|
||||
|
||||
timeout {
|
||||
action: "kb-cancel";
|
||||
delay: 30;
|
||||
}
|
||||
|
||||
filebrowser {
|
||||
directories-first: true;
|
||||
sorting-method: "name";
|
||||
}
|
||||
}
|
||||
|
||||
@theme "theme.rasi"
|
11
rofi/.config/rofi/kill.sh
Executable file
11
rofi/.config/rofi/kill.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$@" ]
|
||||
then
|
||||
pid=$(printf "%d" $(echo -e "$@" | cut -d ":" -f 1))
|
||||
echo "$pid"
|
||||
kill "$pid"
|
||||
else
|
||||
ps -U $UID --no-headers -o "%p %c"
|
||||
fi
|
22
rofi/.config/rofi/power.sh
Executable file
22
rofi/.config/rofi/power.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#!/bin/bash
|
||||
|
||||
OPTIONS="\tLogout\n⏻\tShutdown\n\tReboot"
|
||||
|
||||
option=`echo -e $OPTIONS | awk '{print $1}' | tr -d '\r\n\t'`
|
||||
if [ "$@" ]
|
||||
then
|
||||
case $@ in
|
||||
*Logout)
|
||||
i3-msg exit
|
||||
;;
|
||||
*Shutdown)
|
||||
shutdown now
|
||||
;;
|
||||
*Reboot)
|
||||
reboot
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo -e $OPTIONS
|
||||
fi
|
41
rofi/.config/rofi/powermenu.lua
Executable file
41
rofi/.config/rofi/powermenu.lua
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env luajit
|
||||
|
||||
-- Use a list because table keys are randomly sorted
|
||||
-- It's also easier to add options or edit them this way
|
||||
local options = {
|
||||
{
|
||||
name = "Sleep",
|
||||
icon = "system-suspend",
|
||||
command = "systemctl suspend",
|
||||
},
|
||||
{
|
||||
name = "Shut down",
|
||||
icon = "system-shutdown",
|
||||
command = "systemctl poweroff",
|
||||
},
|
||||
{
|
||||
name = "Restart",
|
||||
icon = "system-reboot",
|
||||
command = "systemctl reboot",
|
||||
},
|
||||
{
|
||||
name = "Lock",
|
||||
icon = "system-lock-screen",
|
||||
command = "swaylock",
|
||||
},
|
||||
{
|
||||
name = "Log out",
|
||||
icon = "system-log-out",
|
||||
command = "swaymsg exit",
|
||||
},
|
||||
}
|
||||
|
||||
for i, opt in ipairs(options) do
|
||||
if arg[1] then
|
||||
if opt.name == arg[1] then
|
||||
os.execute(opt.command)
|
||||
end
|
||||
else
|
||||
print(opt.name .. "\0icon\x1f" .. opt.icon)
|
||||
end
|
||||
end
|
135
rofi/.config/rofi/theme.rasi
Normal file
135
rofi/.config/rofi/theme.rasi
Normal file
|
@ -0,0 +1,135 @@
|
|||
@import "default"
|
||||
|
||||
* {
|
||||
bg: #191724;
|
||||
cur: #1f1d2e;
|
||||
fgd: #e0def4;
|
||||
cmt: #6e6a86;
|
||||
cya: #9ccfd8;
|
||||
grn: #31748f;
|
||||
ora: #ebbcba;
|
||||
pur: #c4a7e7;
|
||||
red: #eb6f92;
|
||||
yel: #f6c177;
|
||||
|
||||
font: "RobotoMono Nerd Font 14";
|
||||
|
||||
foreground: @fgd;
|
||||
background: @bg;
|
||||
active-background: @grn;
|
||||
urgent-background: @red;
|
||||
|
||||
selected-background: @active-background;
|
||||
selected-urgent-background: @urgent-background;
|
||||
selected-active-background: @active-background;
|
||||
separatorcolor: @active-background;
|
||||
bordercolor: @ora;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 3;
|
||||
border-radius: 6;
|
||||
border-color: @bordercolor;
|
||||
padding: 5;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 5;
|
||||
}
|
||||
#message {
|
||||
border: 1px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @bordercolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: false;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#element {
|
||||
border: 0;
|
||||
padding: 1px ;
|
||||
}
|
||||
#element.normal.normal {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
#element.normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @background;
|
||||
}
|
||||
#element.selected.normal {
|
||||
background-color: @selected-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @background;
|
||||
}
|
||||
#element.alternate.normal {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.alternate.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.alternate.active {
|
||||
background-color: @active-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#scrollbar {
|
||||
width: 2px ;
|
||||
border: 0;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
#sidebar {
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button.selected {
|
||||
background-color: @selected-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
padding: 1px ;
|
||||
}
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @cya;
|
||||
}
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @grn;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em;
|
||||
text-color: @grn;
|
||||
}
|
94
rofi/.config/rofi/toto.rasi
Normal file
94
rofi/.config/rofi/toto.rasi
Normal file
|
@ -0,0 +1,94 @@
|
|||
configuration {
|
||||
display-drun: "run";
|
||||
display-combi: "combi";
|
||||
show-icons: true;
|
||||
font: "Monaco for Powerline 12";
|
||||
}
|
||||
* {
|
||||
purple: #000000;
|
||||
black: #000000;
|
||||
red: #eb6e67;
|
||||
green: #95ee8f;
|
||||
yellow: #f8c456;
|
||||
blue: #35BF5C;
|
||||
mangenta: #d886f3;
|
||||
cyan: #6cdcf7;
|
||||
emphasis: #206255;
|
||||
text: #dfdfdf;
|
||||
text-alt: #b2b2b2;
|
||||
fg: #abb2bf;
|
||||
bg: #282c34;
|
||||
spacing: 0;
|
||||
background-color: transparent;
|
||||
font: "Knack Nerd Font 14";
|
||||
text-color: @text;
|
||||
}
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: #282c34dd;
|
||||
}
|
||||
mainbox {
|
||||
padding: 25px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
inputbar {
|
||||
margin: 0px 0px 20px 0px;
|
||||
children: [prompt, textbox-prompt-colon, entry, case-indicator];
|
||||
}
|
||||
prompt {
|
||||
text-color: @green;
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
text-color: @text-alt;
|
||||
}
|
||||
entry {
|
||||
margin: 0px 10px;
|
||||
text-color: @text-alt;
|
||||
}
|
||||
listview {
|
||||
spacing: 5px;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
}
|
||||
element.normal.normal {
|
||||
text-color: @text-alt;
|
||||
background-color: @bg;
|
||||
}
|
||||
element.alternate.normal {
|
||||
text-color: @text-alt;
|
||||
background-color: @bg;
|
||||
}
|
||||
element.selected.normal {
|
||||
text-color: @text-alt;
|
||||
background-color: @emphasis;
|
||||
}
|
||||
element {
|
||||
padding: 5px;
|
||||
text-color: @text-alt;
|
||||
highlight: bold #95ee8f; /* green */
|
||||
border-radius: 3px;
|
||||
}
|
||||
element selected {
|
||||
background-color: @emphasis;
|
||||
text-color: @text;
|
||||
}
|
||||
element urgent, element selected urgent {
|
||||
text-color: @red;
|
||||
}
|
||||
element active, element selected active {
|
||||
text-color: @purple;
|
||||
}
|
||||
message {
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
background-color: @emphasis;
|
||||
border: 1px;
|
||||
border-color: @cyan;
|
||||
}
|
||||
button selected {
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
background-color: @emphasis;
|
||||
}
|
151
rofi/.config/rofi/vapor.rasi
Normal file
151
rofi/.config/rofi/vapor.rasi
Normal file
|
@ -0,0 +1,151 @@
|
|||
/*******************************************************************************
|
||||
* ROFI Color theme
|
||||
* User: Sergio Morales
|
||||
* Copyright: Sergio Morales
|
||||
*******************************************************************************/
|
||||
|
||||
* {
|
||||
foreground: rgba ( 88, 105, 123, 100 % );
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: @normal-background;
|
||||
red: rgba ( 220, 50, 47, 100 % );
|
||||
selected-urgent-foreground: rgba ( 220, 50, 47, 100 % );
|
||||
blue: rgba ( 38, 139, 210, 100 % );
|
||||
urgent-foreground: rgba ( 220, 50, 47, 100 % );
|
||||
alternate-urgent-background: rgba ( 245, 245, 245, 100 % );
|
||||
active-foreground: rgba ( 194, 202, 208, 100 % );
|
||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||
alternate-active-background: rgba ( 245, 245, 245, 100 % );
|
||||
background: rgba ( 9, 6, 17, 100 % );
|
||||
bordercolor: rgba ( 195, 193, 61, 100 % );
|
||||
alternate-normal-foreground: @foreground;
|
||||
normal-background: rgba ( 255, 255, 255, 0 % );
|
||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||
selected-normal-background: rgba ( 150, 45, 76, 80 % );
|
||||
selected-normal-foreground: rgba ( 180, 144, 82, 100 % );
|
||||
selected-active-foreground: rgba ( 180, 144, 82, 100 % );
|
||||
border-color: rgba ( 150, 45, 76, 100 % );
|
||||
spacing: 2;
|
||||
separatorcolor: none;
|
||||
urgent-background: rgba ( 255, 255, 255, 100 % );
|
||||
selected-urgent-background: rgba ( 82, 148, 226, 100 % );
|
||||
alternate-urgent-foreground: @urgent-foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
alternate-active-foreground: @active-foreground;
|
||||
active-background: rgba ( 255, 255, 255, 100 % );
|
||||
selected-active-background: rgba ( 82, 148, 226, 100 % );
|
||||
|
||||
font: "Inconsolata Regular 13";
|
||||
}
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 2;
|
||||
padding: 20;
|
||||
width: 30%;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 10;
|
||||
}
|
||||
#message {
|
||||
border: 0px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 0px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: true;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#element {
|
||||
border: 0;
|
||||
padding: 15px 15px ;
|
||||
}
|
||||
#element.normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#element.normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
#element.normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
#element.selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#element.selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
#element.selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
#element.alternate.normal {
|
||||
background-color: @alternate-normal-background;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
#element.alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
#element.alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
#scrollbar {
|
||||
width: 0 ;
|
||||
border: 0;
|
||||
handle-width: 0px ;
|
||||
padding: 0;
|
||||
}
|
||||
#sidebar {
|
||||
border: 0px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button.selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
padding: 10px 20px 20px;
|
||||
margin: 0px 0px 15px;
|
||||
border: 0px 0px 2px;
|
||||
border-color: @selected-normal-background;
|
||||
}
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
font: "Inconsolata Bold 15";
|
||||
margin: -2px 0 0 0;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: " > ";
|
||||
margin: 0 0.3em 0em 0em ;
|
||||
text-color: @normal-foreground;
|
||||
font: "Inconsolata Bold 13";
|
||||
}
|
BIN
ssh/.ssh/config
Normal file
BIN
ssh/.ssh/config
Normal file
Binary file not shown.
329
sway/.config/sway/config
Normal file
329
sway/.config/sway/config
Normal file
|
@ -0,0 +1,329 @@
|
|||
# Sway Window Manager Configuration
|
||||
# ================================
|
||||
|
||||
# 1. Variables and General Settings
|
||||
# --------------------------------
|
||||
set {
|
||||
$mod Mod4
|
||||
# $term kitty
|
||||
$term kitty
|
||||
$menu fuzzel
|
||||
$left h
|
||||
$down j
|
||||
$up k
|
||||
$right l
|
||||
|
||||
# Monitor outputs
|
||||
$out1 DP-1
|
||||
$out2 HDMI-A-1
|
||||
|
||||
# Original Colors
|
||||
$focused_border #19141D
|
||||
$focused_text #CACACA
|
||||
}
|
||||
|
||||
# Font configuration
|
||||
font pango:monospace 12
|
||||
|
||||
# Use Mouse+$mod to drag floating windows
|
||||
floating_modifier $mod
|
||||
|
||||
# 2. Appearance
|
||||
# ------------
|
||||
# Window Decoration
|
||||
default_border pixel 1
|
||||
default_floating_border pixel 1
|
||||
smart_borders on
|
||||
|
||||
# Window Colors (Preserved from original config)
|
||||
client.focused #19141D #19141D #CACACA #19141D #CACACA
|
||||
|
||||
# Gaps Configuration
|
||||
gaps inner 5
|
||||
gaps outer 5
|
||||
|
||||
xwayland enable
|
||||
|
||||
# Optional SwayFX Settings
|
||||
smart_corner_radius on
|
||||
corner_radius 10
|
||||
|
||||
default_dim_inactive 0.05
|
||||
blur enable
|
||||
blur_passes 1
|
||||
blur_radius 1
|
||||
layer_effects "waybar" "blur enable"; shadows enable
|
||||
shadows on
|
||||
shadow_blur_radius 20
|
||||
|
||||
# 3. Workspaces
|
||||
# ------------
|
||||
set {
|
||||
$ws1 "1"
|
||||
$ws2 "2"
|
||||
$ws3 "3"
|
||||
$ws4 "4"
|
||||
$ws5 "5"
|
||||
$ws6 "6"
|
||||
$ws7 "7"
|
||||
$ws8 "8"
|
||||
$ws9 "9"
|
||||
$ws10 "10"
|
||||
}
|
||||
|
||||
# Workspace Monitor Assignments
|
||||
workspace {
|
||||
1 output $out1
|
||||
3 output $out1
|
||||
5 output $out1
|
||||
7 output $out1
|
||||
9 output $out1
|
||||
2 output $out2
|
||||
4 output $out2
|
||||
6 output $out2
|
||||
8 output $out2
|
||||
10 output $out2
|
||||
}
|
||||
|
||||
# 4. Key Bindings
|
||||
# --------------
|
||||
# System Controls
|
||||
bindsym {
|
||||
$mod+Shift+r exec swaymsg reload && notify-send "Reloaded sway config"
|
||||
$mod+Shift+e exec --no-startup-id wlogout
|
||||
}
|
||||
|
||||
# Application Launchers
|
||||
bindsym {
|
||||
$mod+Return exec $term
|
||||
# $mod+d exec fuzzel
|
||||
$mod+d exec rofi -show combi -combi-modi "window,drun" -modi combi
|
||||
$mod+t exec ~/.bin/code.sh -s ~/.bin/fuzzel.lua
|
||||
$mod+shift+t exec ~/.bin/present
|
||||
$mod+n exec ~/.bin/sdm-ui.sh dmenu
|
||||
$mod+o exec ~/.bin/obsidian-launcher
|
||||
$mod+e exec nemo
|
||||
}
|
||||
|
||||
# Window Management
|
||||
bindsym {
|
||||
$mod+c kill
|
||||
$mod+f fullscreen toggle
|
||||
$mod+space floating toggle
|
||||
$mod+a focus parent
|
||||
|
||||
# Layout
|
||||
$mod+s layout stacking
|
||||
$mod+w layout toggle tabbed split
|
||||
$mod+semicolon split h
|
||||
|
||||
# Focus
|
||||
$mod+$left focus left
|
||||
$mod+$down focus down
|
||||
$mod+$up focus up
|
||||
$mod+$right focus right
|
||||
|
||||
$mod+Left focus left
|
||||
$mod+Down focus down
|
||||
$mod+Up focus up
|
||||
$mod+Right focus right
|
||||
|
||||
# Move
|
||||
$mod+Shift+$left move left
|
||||
$mod+Shift+$down move down
|
||||
$mod+Shift+$up move up
|
||||
$mod+Shift+$right move right
|
||||
|
||||
$mod+Shift+Left move left
|
||||
$mod+Shift+Down move down
|
||||
$mod+Shift+Up move up
|
||||
$mod+Shift+Right move right
|
||||
}
|
||||
|
||||
# Workspace Management
|
||||
bindsym {
|
||||
$mod+1 workspace $ws1
|
||||
$mod+2 workspace $ws2
|
||||
$mod+3 workspace $ws3
|
||||
$mod+4 workspace $ws4
|
||||
$mod+5 workspace $ws5
|
||||
$mod+6 workspace $ws6
|
||||
$mod+7 workspace $ws7
|
||||
$mod+8 workspace $ws8
|
||||
$mod+9 workspace $ws9
|
||||
$mod+0 workspace $ws10
|
||||
|
||||
$mod+Shift+1 move container to workspace $ws1
|
||||
$mod+Shift+2 move container to workspace $ws2
|
||||
$mod+Shift+3 move container to workspace $ws3
|
||||
$mod+Shift+4 move container to workspace $ws4
|
||||
$mod+Shift+5 move container to workspace $ws5
|
||||
$mod+Shift+6 move container to workspace $ws6
|
||||
$mod+Shift+7 move container to workspace $ws7
|
||||
$mod+Shift+8 move container to workspace $ws8
|
||||
$mod+Shift+9 move container to workspace $ws9
|
||||
$mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
$mod+bracketright move workspace to output right
|
||||
$mod+bracketleft move workspace to output left
|
||||
}
|
||||
|
||||
# Scratchpad
|
||||
bindsym {
|
||||
$mod+Shift+minus move scratchpad
|
||||
$mod+minus scratchpad show
|
||||
$mod+u [app_id="uy.com.mzunino"] scratchpad show, move position center, fullscreen disable, resize set 1366 768
|
||||
}
|
||||
|
||||
# Floating Terminal
|
||||
bindsym $mod+Shift+u exec --no-startup-id $term --class="uy.com.mzunino"
|
||||
|
||||
# Other Special Bindings
|
||||
bindsym {
|
||||
$mod+g exec --no-startup-id gromit-mpx -t 0
|
||||
F4 exec switch-windows
|
||||
$mod+r exec --no-startup-id ~/.bin/wlrecord.sh
|
||||
$mod+p exec --no-startup-id grim -g "$(slurp -d)" - | swappy -f -
|
||||
$mod+shift+p exec --no-startup-id ~/.bin/screenshot-upload
|
||||
$mod+F5 exec --no-startup-id ~/.bin/pause-notifications
|
||||
$mod+Escape exec ~/.bin/lock.sh
|
||||
}
|
||||
|
||||
# 5. Multimedia Keys
|
||||
bindsym {
|
||||
XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +2%
|
||||
XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -2%
|
||||
XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
|
||||
XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
|
||||
}
|
||||
|
||||
# Mouse Bindings
|
||||
bindsym {
|
||||
--border button2 kill
|
||||
--whole-window $mod+button2 kill
|
||||
button3 floating toggle
|
||||
$mod+button3 floating toggle
|
||||
}
|
||||
|
||||
# 6. Window Rules (Preserving original detailed rules)
|
||||
for_window [app_id="uy.com.mzunino"] floating enable, move scratchpad
|
||||
for_window [app_id="Evolution-alarm-notify"] floating enable
|
||||
for_window [app_id="sm"] move to workspace 4, workspace --no-auto-back-and-forth 4
|
||||
for_window [title="JetBrains Toolbox"] floating enable
|
||||
for_window [app_id="Spotify"] move to workspace 5, workspace --no-auto-back-and-forth 5
|
||||
for_window [title="Espanso Sync Tool"] floating enable, move to workspace 10
|
||||
for_window [app_id="yad"] floating enable
|
||||
for_window [class="Pinentry-gtk"] floating enable
|
||||
for_window [app_id="com.github.hluk.copyq"] floating enable
|
||||
for_window [app_id="com.github.hluk.copyq"] resize set 1366 768
|
||||
for_window [app_id="authenticator"] floating enable
|
||||
for_window [app_id="authenticator"] resize set 400 800
|
||||
for_window [title="File Operation Progress"] floating enable
|
||||
for_window [title="Do Not Panic"] floating enable
|
||||
for_window [title="Unlock Keyring"] floating enable
|
||||
for_window [title="Confirm to replace files"] floating enable
|
||||
for_window [title="Extension: (Bitwarden Password Manager) - Bitwarden — Mozilla Firefox"] floating enable
|
||||
for_window [title="Bitwarden - Vivaldi"] floating enable
|
||||
|
||||
for_window [title="Write: .*" app_id="eu.betterbird.Betterbird"] floating enable
|
||||
for_window [app_id="eu.betterbird.Betterbird"] floating disable
|
||||
|
||||
for_window [title="win0"] floating enable border none
|
||||
for_window [class=".*"] border pixel 0
|
||||
for_window [app_id="org.pulseaudio.pavucontrol"] floating enable, resize set 700 800
|
||||
for_window [app_id="pdf_float"] floating enable, resize set width 1366 px height 900 px
|
||||
|
||||
# 7. Workspace Assignments (Preserving original detailed assignments)
|
||||
assign [class="^discord$"] 10
|
||||
assign [app_id="^de.shorsh.discord-screenaudio$"] 10
|
||||
assign [class="^WebCord$"] 10
|
||||
assign [class="^vesktop$"] 10
|
||||
assign [app_id="vesktop"] 10
|
||||
assign [app_id="thunderbird"] 7
|
||||
assign [app_id="eu.betterbird.Betterbird"] 7
|
||||
assign [class="DBeaver"] 4
|
||||
assign [app_id="sublime_merge"] 4
|
||||
assign [app_id="^jetbrains-idea$"] 3
|
||||
assign [title="^win0$"] 3
|
||||
assign [title=".*Visual Studio Code*."] 3
|
||||
assign [app_id="^nvim ~ "] 3
|
||||
assign [title="^nvim ~ "] 3
|
||||
assign [app_id="firefox-nightly"] 2
|
||||
assign [app_id="firefox"] 2
|
||||
assign [app_id="zen"] 2
|
||||
assign [instance="vivaldi-stable"] 2
|
||||
assign [class="Vivaldi-stable"] 2
|
||||
assign [class="Slack"] 1
|
||||
assign [app_id="^Chromium"] 1
|
||||
|
||||
# 8. Workspace Layouts
|
||||
for_window [workspace=$ws1] layout tabbed
|
||||
|
||||
# 9. Input Configuration
|
||||
input type:keyboard {
|
||||
xkb_layout us
|
||||
xkb_variant altgr-intl
|
||||
xkb_options caps:escape
|
||||
}
|
||||
|
||||
input type:touchpad {
|
||||
dwt enabled
|
||||
tap enabled
|
||||
accel_profile adaptive
|
||||
pointer_accel 0.5
|
||||
}
|
||||
|
||||
input "2:10:TPPS/2_Elan_TrackPoint" {
|
||||
accel_profile "flat"
|
||||
pointer_accel 0.7
|
||||
}
|
||||
|
||||
# # 10. Output Configuration
|
||||
output $out1 {
|
||||
resolution 1920x1080
|
||||
position 0 0
|
||||
}
|
||||
|
||||
output $out2 {
|
||||
resolution 1920x1080
|
||||
position 1920 0
|
||||
}
|
||||
|
||||
output * adaptive_sync off
|
||||
|
||||
# 11. Autostart Applications
|
||||
exec {
|
||||
~/.bin/randwall
|
||||
~/.bin/waybar.sh
|
||||
|
||||
# Environment and system integration
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_SESSION_DESKTOP=sway
|
||||
systemctl --user import-environment
|
||||
|
||||
# System services - lxsession includes polkit
|
||||
lxsession
|
||||
|
||||
# System tray applets
|
||||
blueman-applet
|
||||
nm-applet
|
||||
|
||||
# Background services
|
||||
easyeffects --gapplication-service
|
||||
swaync
|
||||
wlsunset -l -34.9 -L -56.2 -t 4500 -g 0.9
|
||||
|
||||
# Applications
|
||||
$term --class="uy.com.mzunino"
|
||||
slack
|
||||
#davmail
|
||||
betterbird
|
||||
vesktop
|
||||
|
||||
# Browser - using gtk-launch instead of BROWSER variable
|
||||
zen-browser
|
||||
|
||||
# Commented out for reference
|
||||
# gtk-launch correo
|
||||
swayidle -w
|
||||
}
|
4
swayidle/.config/swayidle/config
Normal file
4
swayidle/.config/swayidle/config
Normal file
|
@ -0,0 +1,4 @@
|
|||
timeout 600 '~/.bin/lock'
|
||||
timeout 1200 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
|
||||
before-sleep '~/.bin/lock'
|
||||
after-resume 'swaymsg "output * power on"'
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue