feat: i3 update & other minor stuff
This commit is contained in:
parent
28ca2f79be
commit
c9010fe697
9 changed files with 169 additions and 73 deletions
27
configs/example/crate.toml
Normal file
27
configs/example/crate.toml
Normal file
|
@ -0,0 +1,27 @@
|
|||
name = "example" #*
|
||||
description = "hello"
|
||||
author = ":$3"
|
||||
|
||||
# [ LINKS ]
|
||||
# This defines what links should be made.
|
||||
# vars:
|
||||
# "$CRATE" expands to path of directory of this file.
|
||||
# "$CROOT" expands to base directory / cwd from the runner
|
||||
# prefixes:
|
||||
# "#" - system root
|
||||
# "~" - home of user or user defined in options
|
||||
# "%" - temp directory
|
||||
[links]
|
||||
"$CRATE/system.sh" = { name = "/etc/system_boot", su = "true" }
|
||||
"$CRATE/system2.sh" = "#/etc/system_boot.sh" # same as above
|
||||
|
||||
# [ COPIES ]
|
||||
# basically the same as links but copies
|
||||
[copies]
|
||||
"$CRATE/system3.sh" = "#/etc/system_boot.sh" # same as above
|
||||
|
||||
# [ SCRIPTS ]
|
||||
# Run stuff
|
||||
[scripts]
|
||||
"$CRATE/system/net_config.sh" = 1
|
||||
"$CRATE/system/net_config2.sh" = { su = "false" }
|
|
@ -13,19 +13,26 @@ set $screen_lock i3lock -c "#111111" --nofork
|
|||
set $appmenu i3-dmenu-desktop
|
||||
|
||||
set $screenshot maim -s | xclip -selection clipboard -t image/png
|
||||
set $alt_screenshot maim ~/Pictures/Screenshots/$(date +%s).png
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
set $font pango:monospace 8
|
||||
|
||||
# Startup Applications:
|
||||
# Things that will startup when starting i3.
|
||||
# ---
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- $screen_lock
|
||||
exec --no-startup-id gnome-keyring-daemon --start --components=ssh,secrets,pkcs11
|
||||
exec_always --no-startup-id dex --autostart --environment i3
|
||||
exec_always --no-startup-id nm-applet
|
||||
exec_always --no-startup-id xss-lock --transfer-sleep-lock -- $screen_lock
|
||||
exec_always --no-startup-id gnome-keyring-daemon --start --components=ssh,secrets,pkcs11
|
||||
exec_always --no-startup-id feh --bg-fill ~/Pictures/wallpaper.jpg
|
||||
|
||||
|
||||
# Gaps & Borders:
|
||||
# ---
|
||||
gaps inner 20
|
||||
smart_gaps on
|
||||
|
||||
default_border pixel 1
|
||||
hide_edge_borders smart_no_gaps
|
||||
|
||||
# Extra variables:
|
||||
# Only need changing for very specific installations.
|
||||
|
@ -38,26 +45,16 @@ set $audio_mute_mic XF86AudioMicMute
|
|||
set $brightness_up XF86MonBrightnessUp
|
||||
set $brightness_down XF86MonBrightnessDown
|
||||
|
||||
set $nav_up l
|
||||
set $nav_down k
|
||||
set $nav_left j
|
||||
set $nav_right semicolon
|
||||
|
||||
set $ws_1 "1:main"
|
||||
set $ws_2 "2:term"
|
||||
set $ws_3 "3:browser"
|
||||
set $ws_3 "3:docs"
|
||||
set $ws_4 "4:mail"
|
||||
set $ws_5 "5"
|
||||
set $ws_6 "6"
|
||||
set $ws_7 "7"
|
||||
set $ws_8 "8"
|
||||
set $ws_9 "9:background"
|
||||
set $ws_10 "10:multimedia"
|
||||
|
||||
set $mode_resize_combo Mod4+r
|
||||
set $mode_session_combo Mod4+Delete
|
||||
|
||||
set $op_floating_modifier Mod1
|
||||
set $ws_9 "9:bg"
|
||||
set $ws_10 "10:misc"
|
||||
|
||||
set $meta_refresh_statusbar killall -SIGUSR1 i3status
|
||||
bar {
|
||||
|
@ -67,18 +64,21 @@ bar {
|
|||
|
||||
# END OF CONFIG
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
|
||||
# Customization
|
||||
#! Customization
|
||||
# class border backgr. text indicator child_border
|
||||
client.focused #D991BA #D27099 #ffffff #D96FBA #D951B0
|
||||
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
|
||||
client.unfocused #333333 #222222 #888888 #292d2e #222222
|
||||
client.urgent #EF2929 #900000 #ffffff #900000 #900000
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
||||
client.background #888A85
|
||||
|
||||
# class border backgr. text indic. child_border
|
||||
client.focused #81A1C1 #81A1C1 #ffffff #D8DEE9
|
||||
client.focused_inactive #2E3440 #2E3440 #88C0D0 #454948
|
||||
client.unfocused #2E3440 #2E3440 #88C0D0 #454948
|
||||
client.urgent #D08770 #3B4252 #ffffff #268BD2
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||
client.background #3B4252
|
||||
|
||||
# Generic
|
||||
floating_modifier $op_floating_modifier
|
||||
floating_modifier $mod
|
||||
tiling_drag modifier titlebar
|
||||
font $font
|
||||
|
||||
|
@ -86,17 +86,16 @@ font $font
|
|||
bindsym $mod+Return exec $terminal
|
||||
|
||||
# Kill current window
|
||||
bindsym $alt+Shift+q kill
|
||||
bindsym $mod+$alt+q kill
|
||||
|
||||
# Open app menu
|
||||
bindsym $mod+Shift+d exec --no-startup-id $appmenu
|
||||
bindsym $mod+d exec --no-startup-id $appmenu
|
||||
|
||||
# Lock screen
|
||||
bindsym $mod+l exec --no-startup-id $screen_lock
|
||||
|
||||
# Screenshots
|
||||
bindsym Print exec $screenshot
|
||||
bindsym Mod1+Print exec $alt_screenshot
|
||||
|
||||
# Audio
|
||||
bindsym $audio_volume_up exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $meta_refresh_statusbar
|
||||
|
@ -109,43 +108,35 @@ bindsym $brightness_up exec --no-startup-id brightnessctl set +5% && $meta_refre
|
|||
bindsym $brightness_down exec --no-startup-id brightnessctl set 5%- && $meta_refresh_statusbar
|
||||
|
||||
# Change focused window
|
||||
bindsym $alt+$nav_up focus up
|
||||
bindsym $alt+$nav_down focus down
|
||||
bindsym $alt+$nav_left focus left
|
||||
bindsym $alt+$nav_right focus right
|
||||
bindsym $alt+Up focus up
|
||||
bindsym $alt+Down focus down
|
||||
bindsym $alt+Left focus left
|
||||
bindsym $alt+Right focus right
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move focused window
|
||||
bindsym $alt+Shift+Up move up
|
||||
bindsym $alt+Shift+Down move down
|
||||
bindsym $alt+Shift+Left move left
|
||||
bindsym $alt+Shift+Right move right
|
||||
bindsym $alt+Shift+$nav_up move up
|
||||
bindsym $alt+Shift+$nav_down move down
|
||||
bindsym $alt+Shift+$nav_left move left
|
||||
bindsym $alt+Shift+$nav_right move right
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# Splits
|
||||
bindsym $alt+h split h
|
||||
bindsym $alt+v split v
|
||||
|
||||
# Make current window fullscreen
|
||||
bindsym $alt+f fullscreen toggle
|
||||
bindsym $mod+Shift+h split h
|
||||
bindsym $mod+Shift+v split v
|
||||
|
||||
# Change container layout
|
||||
bindsym $mod+Mod1+s layout stacking
|
||||
bindsym $mod+Mod1+t layout tabbed
|
||||
bindsym $mod+Mod1+e layout toggle split
|
||||
bindsym $mod+Shift+s layout stacking
|
||||
bindsym $mod+Shift+t layout tabbed
|
||||
bindsym $mod+Shift+d layout toggle split
|
||||
|
||||
# Make current window fullscreen
|
||||
bindsym $mod+Shift+f fullscreen toggle
|
||||
|
||||
# Floating stuff
|
||||
bindsym $mod+space focus mode_toggle
|
||||
bindsym $alt+space floating toggle
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Scratchpad
|
||||
bindsym $alt+minus move scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
bindsym $mod+minus scratchpad show
|
||||
|
||||
# Switch to workspace
|
||||
|
@ -172,22 +163,20 @@ bindsym $mod+Shift+8 move container to workspace $ws_8
|
|||
bindsym $mod+Shift+9 move container to workspace $ws_9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws_10
|
||||
|
||||
# Move to workspace next to current
|
||||
bindsym $mod+$nav_left workspace prev
|
||||
bindsym $mod+$nav_right workspace next
|
||||
bindsym $mod+Left workspace prev
|
||||
bindsym $mod+Right workspace next
|
||||
# Move through workspaces
|
||||
bindsym $mod+$alt+Left workspace prev
|
||||
bindsym $mod+$alt+Right workspace next
|
||||
|
||||
# WM stuff
|
||||
# reload i3 config
|
||||
bindsym $mod+Control+c reload
|
||||
bindsym $mod+$alt+c reload
|
||||
# restart i3
|
||||
bindsym $mod+Control+r restart
|
||||
# exit i3 (recognized combo; for people who need to exit your session)
|
||||
bindsym $mod+$alt+r restart
|
||||
# exit i3
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# Modes
|
||||
bindsym $mode_resize_combo mode resize
|
||||
bindsym $mod+r mode resize
|
||||
mode "resize" {
|
||||
bindsym $nav_left resize shrink width 10 px or 10 ppt
|
||||
bindsym $nav_down resize grow height 10 px or 10 ppt
|
||||
|
@ -200,10 +189,10 @@ mode "resize" {
|
|||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mode_resize_combo mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mode_session_combo mode "session"
|
||||
bindsym $mod+s mode "session"
|
||||
mode "session" {
|
||||
bindsym l exec --no-startup-id $lock, mode "default"
|
||||
bindsym e exec --no-startup-id i3-msg exit, mode "default"
|
||||
|
@ -212,5 +201,5 @@ mode "session" {
|
|||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mode_session_combo mode "default"
|
||||
bindsym $mod+s mode "default"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
# Raine's .zshrc
|
||||
|
||||
if ! [ "$PROFILEINC" = "1" ]; then
|
||||
. ~/.profile
|
||||
fi
|
||||
|
||||
export EDITOR=vim
|
||||
export GPG_TTY=$(tty)
|
||||
export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/.local/bin"
|
||||
|
@ -10,7 +14,7 @@ export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$
|
|||
if [ -f "$HOME/.oh-my-zsh/oh-my-zsh.sh" ]; then
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
ZSH_THEME="afowler"
|
||||
plugins=(git docker docker-compose node zsh-autosuggestions zsh-syntax-highlighting)
|
||||
plugins=(git docker docker-compose node zsh-autosuggestions zsh-syntax-highlighting zsh-cargo-completion)
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
else
|
||||
echo "oh-my-zsh not detected :("
|
||||
|
@ -43,4 +47,5 @@ container() {
|
|||
}
|
||||
|
||||
alias q="exit"
|
||||
alias vim="nvim"
|
||||
alias vim="nvim"
|
||||
alias vi="nvim"
|
||||
|
|
|
@ -22,5 +22,6 @@ Plug 'ThePrimeagen/vim-be-good'
|
|||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'wellle/targets.vim'
|
||||
Plug 'vim-scripts/loremipsum'
|
||||
|
||||
call plug#end()
|
||||
call plug#end()
|
||||
|
|
8
crates/90-backups/crate.debian.sh
Normal file
8
crates/90-backups/crate.debian.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
apply() {
|
||||
echo "------------ WARNING ------------"
|
||||
echo "BACKUPS ARE NOT SETUP ON DEBIAN! "
|
||||
echo " PLEASE SETUP MANUALLY "
|
||||
echo "---------------------------------"
|
||||
}
|
4
crates/90-backups/crate.sh
Normal file
4
crates/90-backups/crate.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
describe="Setup restic backups"
|
||||
scripts="@distro" # only distro
|
41
crates/90-backups/scripts/backup.sh
Normal file
41
crates/90-backups/scripts/backup.sh
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
HOSTNAME=${HOSTNAME:-$(hostname)}
|
||||
|
||||
log() {
|
||||
echo "log: $@"
|
||||
if [ -f "/var/backups/ntfy.env" ]; then
|
||||
. /var/backups/ntfy.env
|
||||
curl \
|
||||
-s \
|
||||
-d "$@" \
|
||||
${NTFY_URL:-https://push.ixvd.net/logs}
|
||||
fi
|
||||
}
|
||||
|
||||
log starting backup for $HOSTNAME
|
||||
restic \
|
||||
-r /var/backups/$HOSTNAME \
|
||||
-p /var/backups/$HOSTNAME.secret \
|
||||
backup \
|
||||
--tag auto \
|
||||
--exclude-caches \
|
||||
--exclude dist \
|
||||
--exclude target \
|
||||
--exclude node_modules \
|
||||
--exclude bin \
|
||||
--exclude .cache \
|
||||
--exclude '.config/*/cache' \
|
||||
--exclude '.config/*/Cache' \
|
||||
--exclude .cargo/git \
|
||||
--exclude .cargo/registry \
|
||||
--exclude '.rustup' \
|
||||
--exclude '.local' \
|
||||
--exclude '.var' \
|
||||
--exclude Steam \
|
||||
--exclude '.config/Code' \
|
||||
--exclude '.config/Code - OSS' \
|
||||
--exclude 'code/linux' \
|
||||
--exclude Downloads \
|
||||
/srv /home /etc
|
||||
log backup finished with $?
|
10
crates/90-backups/scripts/setup.sh
Normal file
10
crates/90-backups/scripts/setup.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
HOSTNAME=${HOSTNAME:-$(hostname)}
|
||||
|
||||
[ -d "/var/backups" ] || mkdir -p /var/backups
|
||||
[ -f "/var/backups/$HOSTNAME.secret" ] || openssl rand -hex 64 > /var/backups/$HOSTNAME.secret
|
||||
|
||||
restic init \
|
||||
-r /var/backups/$HOSTNAME \
|
||||
-p /var/backups/$HOSTNAME.secret
|
11
crates/90-backups/scripts/sync.sh
Normal file
11
crates/90-backups/scripts/sync.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# sync backup to *the* external
|
||||
|
||||
HOSTNAME=${HOSTNAME:-$(hostname)}
|
||||
|
||||
set -e
|
||||
|
||||
rsync \
|
||||
--info=progress2 \
|
||||
-avzylu \
|
Loading…
Reference in a new issue