From 59e661e620b2470b741e716ecfef6a57104c1551 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Thu, 15 Feb 2024 21:19:02 +0100 Subject: [PATCH] Configurations and Enhancements: Added Alacritty terminal settings, adjusted Cava audio visualizer and i3 window manager configurations, updated Nushell settings, refined Ranger bookmarks, introduced a battery statistics script, updated SSH configurations, fine-tuned Emacs and Zsh settings. Also, included new files for battery statistics and Emacs-related configurations. This commit enhances the overall user experience and system configurations. Signed-off-by: TuDatTr --- config/.config/alacritty/alacritty.toml | 19 ++++++++ config/.config/cava/config | 10 ++-- config/.config/i3/config | 3 +- config/.config/nushell/config.nu | 9 ++-- config/.config/nushell/env.nu | 4 -- config/.local/share/ranger/bookmarks | 4 +- config/.scripts/battery_stats.sh | 10 ++++ config/.ssh/config | 57 +++++++++-------------- emacs/.doom.d/custom.el | 5 ++ emacs/.doom.d/init.el | 2 +- emacs/.dotfiles/emacs/.emacs.d/config.org | 1 + emacs/.emacs.d | 2 +- zsh/.zshrc | 35 ++++++++++++-- 13 files changed, 100 insertions(+), 61 deletions(-) create mode 100644 config/.config/alacritty/alacritty.toml create mode 100755 config/.scripts/battery_stats.sh create mode 100644 emacs/.dotfiles/emacs/.emacs.d/config.org diff --git a/config/.config/alacritty/alacritty.toml b/config/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..4d3cc7a --- /dev/null +++ b/config/.config/alacritty/alacritty.toml @@ -0,0 +1,19 @@ +[font] +size = 10 + +[font.bold] +style = "Bold" + +[font.bold_italic] +style = "Bold Italic" + +[font.italic] +style = "Italic" + +[font.normal] +family = "DejaVu Sans Mono for Powerline" +style = "Regular" + +[window] +decorations = "none" +opacity = 0.9 diff --git a/config/.config/cava/config b/config/.config/cava/config index 3a35ade..f2494b0 100755 --- a/config/.config/cava/config +++ b/config/.config/cava/config @@ -21,7 +21,7 @@ # The number of bars (0-200). 0 sets it to auto (fill up console). # Bars' width and space between bars in number of characters. -; bars = 0 +; bars = 19 ; bar_width = 2 ; bar_spacing = 1 @@ -30,8 +30,8 @@ # the bandwidth of the visualizer. # Note: there is a minimum total bandwidth of 43Mhz x number of bars. # Cava will automatically increase the higher cutoff if a too low band is specified. -; lower_cutoff_freq = 50 -; higher_cutoff_freq = 10000 +lower_cutoff_freq = 0 +higher_cutoff_freq = 20000 @@ -48,8 +48,8 @@ # # For alsa 'source' will be the capture device. # For fifo 'source' will be the path to fifo-file. -; method = pulse -; source = auto +method = pulse +source = auto ; method = alsa ; source = hw:Loopback,1 diff --git a/config/.config/i3/config b/config/.config/i3/config index 3272e6e..5510cec 100644 --- a/config/.config/i3/config +++ b/config/.config/i3/config @@ -105,9 +105,10 @@ exec --no-startup-id conky -c ~/.conky/syclo-crimson-bottomleft.conkyrc # exec --no-startup-id synergyc -f --no-tray --debug INFO --name genesis --enable-crypto 192.168.178.38:24800 exec --no-startup-id dunst exec --no-startup-id ~/.scripts/startup.sh +exec --no-startup-id ~/.scripts/battery_stats.sh exec --no-startup-id llk exec --no-startup-id syncthing -exec --no-startup-id xrandr --output eDP1 --auto --left-of HDMI1 --output HDMI1 --off --output DP1 --off; feh --randomize --bg-fill /home/tuan/Pictures/Wallpaper/* +exec --no-startup-id xrandr --output eDP1 --auto --left-of HDMI1 --output HDMI1 --off --output DP1 --off exec --no-startup-id feh --randomize --bg-fill $HOME/Pictures/Wallpaper/* ############################################################################### diff --git a/config/.config/nushell/config.nu b/config/.config/nushell/config.nu index fd372b0..7c7bbae 100644 --- a/config/.config/nushell/config.nu +++ b/config/.config/nushell/config.nu @@ -191,9 +191,6 @@ $env.config = { rm: { always_trash: false # always act as if -t was given. Can be overridden with -p } - cd: { - abbreviations: false # allows `cd s/o/f` to expand to `cd some/other/folder` - } table: { mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column @@ -541,7 +538,7 @@ $env.config = { } def add_soft [project] { git remote add soft $"ssh://git.aya00:/($project)" } -export def-env own_ranger [] { +export def --env own_ranger [] { let lastdir_path = $"($env.HOME)/.rangerdir"; ^ranger $"--choosedir=($lastdir_path)"; let lastdir = (open $lastdir_path); @@ -550,8 +547,8 @@ export def-env own_ranger [] { def pwd_xsel [] { let path = $"(pwd)"; - $"cd `($path)`"| xsel -b; - $"Copied `($path)`"; + $"cd \"($path)\"; nu;"| xsel -b; + $"Copied \"($path)\"; nu;"; } alias ll = ls -la diff --git a/config/.config/nushell/env.nu b/config/.config/nushell/env.nu index c5453f4..4c5fff0 100644 --- a/config/.config/nushell/env.nu +++ b/config/.config/nushell/env.nu @@ -82,8 +82,4 @@ $env.NU_PLUGIN_DIRS = [ # To add entries to PATH (on Windows you might use Path), you can use the following pattern: # $env.PATH = ($env.PATH | split row (char esep)) -$env.EDITOR = "emacs -nw" -$env.VISUAL = "bat" -$env.PAGER = "bat --pager auto" - $env.KUBECONFIG = $"($env.HOME)/.kube/config" diff --git a/config/.local/share/ranger/bookmarks b/config/.local/share/ranger/bookmarks index aedfb48..14dc678 100644 --- a/config/.local/share/ranger/bookmarks +++ b/config/.local/share/ranger/bookmarks @@ -9,8 +9,8 @@ t:/home/tuan/Templates w:/home/tuan/workspace_l/home_lab/wiki k:/home/tuan/.syncthing/Documents/Uni/Studium/2022_Sommersemester/Bachelorprojekt/Implement EFCF based on libAFL/git/foundry/evm/src/executor q:/home/tuan/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/02-gps -':/home/tuan/.dotfiles/config/.config/nushell -e:/home/tuan/Documents/Uni/Studium/2022&2023_Wintersemester/Bachelorprojekt/LibAFL with EVM/Project/ethfuzz +':/home/tuan/workspace_l/rust/LibAFL/fuzzers +e:/home/tuan/Documents/Uni/Studium/2022&2023_Wintersemester/Bachelorprojekt/ethfuzz s:/home/tuan/Pictures/Screenshots v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible f:/home/tuan/Documents/Finanzen/Unternehmen/Rechnungen diff --git a/config/.scripts/battery_stats.sh b/config/.scripts/battery_stats.sh new file mode 100755 index 0000000..1f842cc --- /dev/null +++ b/config/.scripts/battery_stats.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +FILENAME=$(date -I) + +while true; do + TIMESTAMP=$(date +%s) + STATS=$(acpi | sed "s/.*\([0-9]\{2\}\)%.*/\1/") + echo "$TIMESTAMP,$STATS" >> ~/.scripts/battery_$FILENAME.log + sleep 1 +done diff --git a/config/.ssh/config b/config/.ssh/config index 954b450..400c44b 100644 --- a/config/.ssh/config +++ b/config/.ssh/config @@ -30,6 +30,12 @@ Host git.tudattr.dev IdentityFile /mnt/veracrypt1/git # Homeserver +Host behemoth + HostName 192.168.30.80 + Port 22 + User tuan + IdentityFile /mnt/veracrypt1/genesis + Host madrigal HostName 192.168.70.1 Port 2200 @@ -42,6 +48,12 @@ Host aya01 User tudattr IdentityFile /mnt/veracrypt1/genesis +Host inko + HostName 192.168.20.14 + Port 22 + User tudattr + IdentityFile /mnt/veracrypt1/genesis + Host naruto HostName 192.168.20.13 Port 22 @@ -88,12 +100,11 @@ Host naruto.mii ProxyJump mii # Work -Host ncs-head.mii - HostName 132.252.68.50 - Port 2122 - User tuan-dat.tran +Host ncs-tailscale + HostName 100.93.79.94 + Port 22 + User tuant IdentityFile /mnt/veracrypt1/genesis - ProxyJump mii Host ncs-head HostName 132.252.68.50 @@ -101,6 +112,7 @@ Host ncs-head User tuan-dat.tran IdentityFile /mnt/veracrypt1/genesis ForwardX11 yes + ProxyJump ncs-tailscale Host ncs-head-user HostName 132.252.68.50 @@ -214,34 +226,6 @@ Host ncs-wedge # ForwardX11 yes ProxyJump ncs-head -Host ncs-local-server - HostName 192.168.1.1 - Port 22 - User tuan-dat.tran - IdentityFile /mnt/veracrypt1/tudattr - StrictHostKeyChecking no - -Host ncs-local-server-user - HostName 192.168.1.1 - Port 22 - User user - IdentityFile /mnt/veracrypt1/tudattr - StrictHostKeyChecking no - -Host ncs-local-server2 - HostName 192.168.2.2 - Port 22 - User user - IdentityFile /mnt/veracrypt1/tudattr - StrictHostKeyChecking no - ProxyJump ncs-local-server - -Host phone - Hostname 192.168.30.245 - Port 2222 - User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis - Host ncs-gpu Hostname 192.168.1.21 Port 22 @@ -274,8 +258,9 @@ Host 5g-mec-ovpn User udue IdentityFile /mnt/veracrypt1/genesis -Host ncs-jetson00 - Hostname 192.168.0.147 +Host minis + Hostname 192.168.0.115 Port 22 - User user + User tudattr IdentityFile /mnt/veracrypt1/genesis + diff --git a/emacs/.doom.d/custom.el b/emacs/.doom.d/custom.el index aebb3fe..8325ada 100644 --- a/emacs/.doom.d/custom.el +++ b/emacs/.doom.d/custom.el @@ -139,6 +139,11 @@ " :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}") :unnarrowed t nil nil))) + '(warning-suppress-log-types + '((doom-first-file-hook) + (doom-first-file-hook) + (doom-first-file-hook) + (defvaralias))) '(warning-suppress-types '((doom-first-file-hook) (doom-first-file-hook) diff --git a/emacs/.doom.d/init.el b/emacs/.doom.d/init.el index a4a009a..fb787bc 100644 --- a/emacs/.doom.d/init.el +++ b/emacs/.doom.d/init.el @@ -134,7 +134,7 @@ ;;data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;dhall - ;;elixir ; erlang done right + elixir ; erlang done right ;;elm ; care for a cup of TEA? emacs-lisp ; drown in parentheses ;;erlang ; an elegant language for a more civilized age diff --git a/emacs/.dotfiles/emacs/.emacs.d/config.org b/emacs/.dotfiles/emacs/.emacs.d/config.org new file mode 100644 index 0000000..41cd5bf --- /dev/null +++ b/emacs/.dotfiles/emacs/.emacs.d/config.org @@ -0,0 +1 @@ +#+title: Config diff --git a/emacs/.emacs.d b/emacs/.emacs.d index 24601b3..4d072ce 160000 --- a/emacs/.emacs.d +++ b/emacs/.emacs.d @@ -1 +1 @@ -Subproject commit 24601b300e87e909340524476713dcaaa5d095cd +Subproject commit 4d072ce888577b023774460f6036abefcd0a1fa6 diff --git a/zsh/.zshrc b/zsh/.zshrc index a7e8ba7..733d6d4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -9,19 +9,44 @@ export ZSHRC="$HOME/.zshrc" # History -export HISTSIZE=10000000 -export SAVEHIST=10000000 +export HISTSIZE=50000 +export SAVEHIST=50000 export HISTTIMEFORMAT="[%F %T] " + +# Following commands from: https://registerspill.thorstenball.com/p/which-command-did-you-run-1731-days +# Immediately append to history file: +setopt INC_APPEND_HISTORY + +# Record timestamp in history: setopt EXTENDED_HISTORY + +# Expire duplicate entries first when trimming history: +setopt HIST_EXPIRE_DUPS_FIRST + +# Dont record an entry that was just recorded again: +setopt HIST_IGNORE_DUPS + +# Delete old recorded entry if new entry is a duplicate: +setopt HIST_IGNORE_ALL_DUPS + +# Do not display a line previously found: setopt HIST_FIND_NO_DUPS +# Dont record an entry starting with a space: +setopt HIST_IGNORE_SPACE + +# Dont write duplicate entries in the history file: +setopt HIST_SAVE_NO_DUPS + +# Share history between all sessions: +setopt SHARE_HISTORY + # Alias alias q="exit" alias b="byobu" alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"' alias xsel='xsel -ib' alias msfconsole="msfconsole -x \"db_connect metasploit@msf\"" -alias nmap="nmap -T5 --min-parallelism 100 -Pn" alias ed="\emacs --daemon" alias e="open_emacs" alias df="df -h" @@ -59,7 +84,7 @@ source $ZSH/oh-my-zsh.sh add_soft_git() { git remote add soft ssh://git.aya01:/$1 } open_emacs() { emacsclient -c $1 & disown; }; -nu - autoload -U +X bashcompinit && bashcompinit complete -o nospace -C /usr/bin/terraform terraform + +# echo "rm -rf braincells/*"