initial commit

This commit is contained in:
2024-04-01 11:32:56 +02:00
commit 4be63cf686
17 changed files with 891 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
[colors.primary]
background = "#230038"
foreground = "#fc28c3"
[env]
TERM = "xterm"
[font]
size = 9
[font.normal]
family = "Hack Nerd Font Mono"
style = "Regular"
[window]
opacity = 0.9

96
borg/.borg/backup.sh Executable file
View File

@@ -0,0 +1,96 @@
#! /usr/bin/env bash
set -e
if [ -z "$1" ]
then
REPO="nas:~/borg"
LOCAL=false
else
DISK="$1"
LOCAL=true
fi
if $LOCAL
then
#check if unlocked
if [ -e "/dev/disk/by-label/$DISK" ]
then
echo "Disk already unlocked"
else
udisksctl unlock -b /dev/disk/by-partlabel/$DISK --key-file "$HOME/.keys/luks.key"
fi
#check if mounted
if [ -e "/run/media/$USER/$DISK" ]
then
echo "Disk already mounted"
else
udisksctl mount -b /dev/disk/by-label/$DISK
fi
REPO="/run/media/$USER/$DISK/borg"
fi
ARCHIVE="$REPO::$HOSTNAME-$(date +%Y-%m-%dT%T)"
SRC="$HOME"
BORG_PASSPHRASE=""
echo "Enter passphrase for $REPO:"
read -s BORG_PASSPHRASE
export BORG_PASSPHRASE
borg create --progress --stats --exclude-caches \
--exclude $HOME/VirtualBox\ VMs \
--exclude $HOME/.cache \
--exclude $HOME/Downloads \
--exclude $HOME/Photos \
--exclude $HOME/Videos \
--exclude $HOME/tmp \
--exclude $HOME/.local/Steam \
--exclude $HOME/.local/share/Steam \
--exclude $HOME/Audio \
--exclude $HOME/nas \
--exclude $HOME/go \
--exclude $HOME/.var/app/com.valvesoftware.Steam \
$ARCHIVE $SRC && if ! $LOCAL; then date +%s > $HOME/.lastbak; fi
borg prune --stats --list --keep-within 1d --glob-archives "$HOSTNAME*" \
-d 7 \
-w 4 \
-m 6 \
-y 1 \
$REPO
if $LOCAL
then
SRC=""
if ! nmcli connection show --active | grep '^vt-net' > /dev/null
then
SRC="--from local"
fi
echo "backing up Photo archive..."
cd "/run/media/$USER/$DISK/photos"
git annex sync
# set +e
# git annex mirror --from=origin
git annex get $SRC
# set -e
git annex sync
echo "backing up Audio archive..."
cd "/run/media/$USER/$DISK/audio"
git annex sync
### git annex mirror --from=origin
git annex get $SRC
git annex sync
cd /
udisksctl unmount -b "/dev/disk/by-label/$DISK"
udisksctl lock -b "/dev/disk/by-partlabel/$DISK"
else
echo "Backing up Audo archive..."
cd "$HOME/Audio"
git annex copy --to origin > /dev/null
echo "Backing up Photo archive..."
cd "$HOME/Photos"
git annex copy --to origin > /dev/null
fi

9
borg/.borg/bakage.sh Executable file
View File

@@ -0,0 +1,9 @@
#! /usr/bin/env bash
last=$(cat $HOME/.lastbak)
time=$(date +%s)
age_s=$(( $time - $last ))
age=$(( $age_s / 86400 ))
echo $age

7
borg/.borg/i3status-bakage.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
i3status | while :
do
read line
echo "$(~/.borg/bakage.sh)d ★ ${line}" || exit 1
done

View File

@@ -0,0 +1,44 @@
# Only execute this file once per shell.
set -q __fish_home_manager_config_sourced; and exit
set -g __fish_home_manager_config_sourced 1
status --is-login; and begin
# Login shell initialisation
end
status --is-interactive; and begin
# Abbreviations
# Aliases
alias backup '$HOME/.borg/backup.sh'
alias budget 'hledger print income:krankengeld | grep -Po '\''^\d\d\d\d-\d\d-\d\d'\'' | tail -1 | xargs -I{} hledger balance budgets date:{}-today'
alias cat bat
alias fox cat
alias g git
alias grep rg
alias hl hledger
alias la 'exa --git -al'
alias ll 'exa --git -l'
alias ls 'exa --git'
alias mountNas 'systemctl start home-vi-nas.mount'
alias t task
alias tt 'exa --git -Tl'
alias vimdiff 'nvim -d'
# Interactive shell initialisation
set -gx GPG_TTY (tty)
if test "$TERM" != dumb
eval (/home/vi/.nix-profile/bin/starship init fish)
end
end

12
git/.config/git/config Normal file
View File

@@ -0,0 +1,12 @@
[alias]
cm = "commit"
co = "checkout"
l = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"
s = "status"
[init]
defaultBranch = "main"
[user]
email = "me@v-tr.org"
name = "Violet Truchseß"

View File

@@ -0,0 +1,48 @@
set number
set listchars=tab:>-,trail:~,extends:>,precedes:<
set list
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set colorcolumn=80
set cursorline
set mouse=a
set clipboard=unnamedplus
set nocompatible
filetype plugin on
syntax on
call plug#begin('~/.vim/plugged')
Plug 'Yggdroot/indentLine'
Plug 'EdenEast/nightfox.nvim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'vim-syntastic/syntastic'
Plug 'ur4ltz/surround.nvim'
Plug 'dense-analysis/ale'
call plug#end()
nnoremap <C-n> :Neotree<CR>
nnoremap <tab> <C-w>
nnoremap <C-h> :tabprevious<CR>
nnoremap <C-l> :tabnext<CR>
nnoremap <C-CR> :tabnew<CR>
let g:airline_theme='violet'
set modeline
autocmd FileType markdown set textwidth=80
autocmd FileType asciidoc set textwidth=80
set scrolloff=5
let g:org_agenda_files = ['~/org/*.org']
tnoremap <Esc> <C-\><C-n>

4
nvim/.config/nvim/init-plug.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

View File

@@ -0,0 +1,9 @@
vim.cmd [[source ./config.vim]]require("nightfox").setup({
palettes = {
duskfox = {
bg1 = "#230038",
fg1 = "#fc28c3",
}
}
})
vim.cmd("colorscheme duskfox")

31
ssh/.ssh/config Normal file
View File

@@ -0,0 +1,31 @@
Host git.v-tr.org
IdentityFile ~/.ssh/id_ed25519
Host jump
Port 2022
ForwardAgent yes
User jump
HostName jump.v-tr.org
IdentityFile ~/.ssh/jump_rsa
Host junk
User root
HostName junk.v-tr.org
IdentityFile ~/.ssh/id_ed25519
Host nas
User vi
HostName nas.v-tr.org
IdentityFile ~/.ssh/id_ed25519
Host *
ForwardAgent yes
AddKeysToAgent no
Compression no
ServerAliveInterval 0
ServerAliveCountMax 3
HashKnownHosts no
UserKnownHostsFile ~/.ssh/known_hosts
ControlMaster no
ControlPath ~/.ssh/master-%r@%n:%p
ControlPersist no
AddKeysToAgent yes
identityFile = ~/.ssh/id_ed25519

View File

@@ -0,0 +1,25 @@
add_newline = false
format = "$username$hostname $directory$all"
[character]
error_symbol = "[>>](bold red)"
success_symbol = "[>>](bold light-green)"
[cmd_duration]
disabled = true
[directory]
style = "bold bright-blue"
[hostname]
format = "[@$hostname$ssh_symbol]($style)"
ssh_only = false
style = "bold bright-purple"
[line_break]
disabled = true
[username]
format = "[$user]($style)"
show_always = true
style_user = "bold bright-purple"

View File

@@ -0,0 +1 @@
exec swaymsg "output * scale 1.5"

122
sway/.config/sway/config Normal file
View File

@@ -0,0 +1,122 @@
font pango:monospace 8.000000
floating_modifier Mod4
default_border pixel 2
default_floating_border normal 2
hide_edge_borders none
focus_wrapping no
focus_follows_mouse yes
focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #ef5ffc #ef5ffc #333333 #2e9ef4 #ef5ffc
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod4+1 workspace number 1
bindsym Mod4+2 workspace number 2
bindsym Mod4+3 workspace number 3
bindsym Mod4+4 workspace number 4
bindsym Mod4+5 workspace number 5
bindsym Mod4+6 workspace number 6
bindsym Mod4+7 workspace number 7
bindsym Mod4+8 workspace number 8
bindsym Mod4+9 workspace number 9
bindsym Mod4+0 workspace number 10
bindsym Mod4+Control+Space focus mode_toggle
bindsym Mod4+Control+p exec swaylock -f -c ef5ffc
bindsym Mod4+Down focus down
bindsym Mod4+Left focus left
bindsym Mod4+Return exec alacritty
bindsym Mod4+Right focus right
bindsym Mod4+Shift+1 move container to workspace number 1
bindsym Mod4+Shift+2 move container to workspace number 2
bindsym Mod4+Shift+3 move container to workspace number 3
bindsym Mod4+Shift+4 move container to workspace number 4
bindsym Mod4+Shift+5 move container to workspace number 5
bindsym Mod4+Shift+6 move container to workspace number 6
bindsym Mod4+Shift+7 move container to workspace number 7
bindsym Mod4+Shift+8 move container to workspace number 8
bindsym Mod4+Shift+9 move container to workspace number 9
bindsym Mod4+Shift+0 move container to workspace number 10
bindsym Mod4+Shift+Down move down
bindsym Mod4+Shift+Left move left
bindsym Mod4+Shift+Right move right
bindsym Mod4+Shift+Up move up
bindsym Mod4+Shift+c reload
bindsym Mod4+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym Mod4+Shift+h move left
bindsym Mod4+Shift+j move down
bindsym Mod4+Shift+k move up
bindsym Mod4+Shift+l move right
bindsym Mod4+Shift+minus move scratchpad
bindsym Mod4+Shift+q kill
bindsym Mod4+Shift+space floating toggle
bindsym Mod4+Up focus up
bindsym Mod4+a focus parent
bindsym Mod4+b splith
bindsym Mod4+d exec wofi -G | xargs swaymsg exec --
bindsym Mod4+e layout toggle split
bindsym Mod4+f fullscreen toggle
bindsym Mod4+h focus left
bindsym Mod4+j focus down
bindsym Mod4+k focus up
bindsym Mod4+l focus right
bindsym Mod4+minus scratchpad show
bindsym Mod4+r mode resize
bindsym Mod4+s layout stacking
bindsym Mod4+space exec wofi -G | xargs swaymsg exec --
bindsym Mod4+v splitv
bindsym Mod4+w layout tabbed
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86Launch1 exec ~/scripts/sunset.sh
input "type:keyboard" {
xkb_layout us
xkb_options caps:escape,compose:102,shift:both_capslock,eurosign:e
xkb_variant altgr-intl
}
output "*" {
bg ~/.config/sway/xenia.png fill
}
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
position top
swaybar_command waybar
}
gaps inner 8
smart_gaps on
smart_borders on
for_window [app_id="org.keepassxc.KeePassXC"] floating enable
exec swayidle -w \
timeout 300 'swaylock -f -c ef5ffc' \
timeout 600 'swaymsg output * dpms off' \
resume 'swaymsg putput * dpms on' \
before-sleep 'swaylock -f -c ef5ffc'
include ~/.config/sway/device-conf
exec swaymsg "output * scale 1.5"

BIN
sway/.config/sway/xenia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

View File

@@ -0,0 +1,173 @@
{
// "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 24, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/window", "sway/mode"],
"modules-center": [ ],
"modules-right": ["idle_inhibitor", "pulseaudio", "custom/backup", "battery", "network", "clock", "tray"],
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
// },
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": "{name} {icon}",
"format-icons": {
"locked": "",
"unlocked": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
"on": " "
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"format": "{:%a, %d.%m - %H:%M}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": "🔇 {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
},
"custom/backup": {
"format": "{} d",
"exec": "$HOME/.borg/bakage.sh",
"interval": 30
}
}
// vim: ft=json

View File

@@ -0,0 +1,290 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: Ubuntu, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: #ef5ffc;
border-bottom: #a15ffc;
color: #383333;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 2;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #fc5fbb;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #333333;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #a15ffc;
box-shadow: inset 0 -3px #fc5fbb;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#custom-backup,
#mpd {
padding: 0 10px;
color: #333333;
background-color: #a15ffc;
border-radius: 8;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
/*
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
*/
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
/*
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
*/
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
/*
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
*/
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
/*
#idle_inhibitor {
background-color: #2d3436;
}
*/
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}

5
wofi/.config/wofi/config Normal file
View File

@@ -0,0 +1,5 @@
show=drun
drun-print_command=true
show=drun
drun-print_command=true