From 2968f25fc15df365d3b4eadf107b3d8a2ccc11e8 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Sat, 19 Sep 2020 13:49:26 +0200 Subject: [PATCH] Added proxmox ssh-configsconfig/.scripts/sound.sh now shows mute state while changing volume/also corrected display of volume levelcompton -> picom in config/.config/i3/config --- config/.byobu/status | 37 +++++++++ config/.config/i3/config | 4 +- config/.local/share/ranger/bookmarks | 4 +- config/.scripts/sound.sh | 26 ++++-- config/.scripts/startup.sh | 2 +- config/.ssh/config | 115 ++++++++++++++++++++++----- zsh/.zshrc | 6 +- 7 files changed, 158 insertions(+), 36 deletions(-) create mode 100644 config/.byobu/status diff --git a/config/.byobu/status b/config/.byobu/status new file mode 100644 index 0000000..df97242 --- /dev/null +++ b/config/.byobu/status @@ -0,0 +1,37 @@ +# status - Byobu's default status enabled/disabled settings +# +# Override these in $BYOBU_CONFIG_DIR/status +# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined, +# and $HOME/.byobu otherwise. +# +# Copyright (C) 2009-2011 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Status beginning with '#' are disabled. + +# Screen has two status lines, with 4 quadrants for status +screen_upper_left="color" +screen_upper_right="color whoami hostname ip_address menu" +screen_lower_left="color logo distro release #arch session" +screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #time_utc date time" + +# Tmux has one status line, with 2 halves for status +tmux_left=" logo #distro #release #arch session" +# You can have as many tmux right lines below here, and cycle through them using Shift-F5 +tmux_right=" #network #disk_io #custom #entropy #raid #reboot_required #updates_available #apport #services #mail #users uptime #fan_speed #cpu_temp battery #wifi_quality #processes load_average #cpu_count #cpu_freq #memory #swap #disk #whoami #hostname ip_address #time_utc date time" +#tmux_right="network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail users uptime fan_speed cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk whoami hostname ip_address #time_utc date time" +#tmux_right="network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname ip_address #time_utc date time" +#tmux_right="#network disk_io #custom entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime fan_speed cpu_temp #battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap whoami hostname ip_address #time_utc disk date time" diff --git a/config/.config/i3/config b/config/.config/i3/config index fd007c8..75ab7de 100644 --- a/config/.config/i3/config +++ b/config/.config/i3/config @@ -98,9 +98,9 @@ for_window [title="^Steam Keyboard$"] floating enable ############################ Startup Applications ############################# ############################################################################### -exec --no-startup-id setxkbmap us,de; setxkbmap -option ctrl:nocaps; setxkbmap -option grp:lalt_lshift_toggle +# exec --no-startup-id setxkbmap us,de; setxkbmap -option ctrl:nocaps; setxkbmap -option grp:lalt_lshift_toggle exec --no-startup-id feh --randomize --bg-fill /home/tuan/Pictures/Wallpaper/* -exec --no-startup-id compton -b +exec --no-startup-id picom -b exec --no-startup-id nextcloud --background exec --no-startup-id udiskie exec --no-startup-id conky -c ~/.conky/syclo-crimson-bottomleft.conkyrc diff --git a/config/.local/share/ranger/bookmarks b/config/.local/share/ranger/bookmarks index 2ad7086..ea285c0 100644 --- a/config/.local/share/ranger/bookmarks +++ b/config/.local/share/ranger/bookmarks @@ -1,7 +1,7 @@ u:/home/tuan/Documents/Uni/Studium p:/home/tuan/Documents/Protokolle/FSE o:/home/tuan/.dotfiles/config -m:/run/media/tuan +m:/run/media a:/home/tuan/Documents/Arbeit l:/home/tuan/Local c:/home/tuan/Documents/CTF @@ -9,5 +9,5 @@ t:/home/tuan/Templates w:/home/tuan/workspace_l/Projects k:/home/tuan/Documents/CTF/TryHackMe/VulnUniversity q:/home/tuan/.nextcloud/Quick Drop -':/home/tuan/.local/share/ranger +':/home/tuan/workspace_l/Projects/hhkb_iso_1u4 e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon diff --git a/config/.scripts/sound.sh b/config/.scripts/sound.sh index 17a69c0..496577a 100755 --- a/config/.scripts/sound.sh +++ b/config/.scripts/sound.sh @@ -4,25 +4,35 @@ type pactl >/dev/null 2>&1 || { echo >&2 "I require pactl but it's not installed type amixer >/dev/null 2>&1 || { echo >&2 "I require amixer but it's not installed. Aborting."; exit 1; } type dunstify >/dev/null 2>&1 || { echo >&2 "I require dunstify but it's not installed. Aborting."; exit 1; } +function isMuted() { + if amixer get Master | grep -q off; then + muted=0; + else + muted=1; + fi +} + defaultSink=$(pactl info | grep 'Default Sink' | cut -d' ' -f3); -curVolume=$(amixer get Master | grep -o \[0-9\]\\+% -m 1); + +isMuted; +if [ $muted -eq 1 ]; then echo unmuted; else echo muted; fi case $1 in "up"*) pactl set-sink-volume $defaultSink +5%; - dunstify -r 2 'sound up'\ \($curVolume\); + curVolume=$(amixer get Master | grep -o \[0-9\]\\+% -m 1); + if [ $muted -eq 0 ]; then msg="(muted)"; else msg=""; fi + dunstify -r 2 'sound up'\ \($curVolume\) $msg; ;; "down"*) pactl set-sink-volume $defaultSink -5%; - dunstify -r 2 'sound up'\ \($curVolume\); + curVolume=$(amixer get Master | grep -o \[0-9\]\\+% -m 1); + if [ $muted -eq 0 ]; then msg="(muted)"; else msg=""; fi + dunstify -r 2 'sound up'\ \($curVolume\) $msg; ;; "toggle"*) - msg='muted'; - if amixer get Master | grep -q off; then - msg='unmuted'; - fi pactl set-sink-mute $defaultSink toggle; + if [ $muted -eq 0 ]; then msg=unmuted; else msg=muted; fi dunstify -r 2 'sound'\ $msg; - echo $msg ;; esac diff --git a/config/.scripts/startup.sh b/config/.scripts/startup.sh index e7affb2..13defd8 100755 --- a/config/.scripts/startup.sh +++ b/config/.scripts/startup.sh @@ -25,7 +25,7 @@ function kb_routine { function battery_routine { capacity=$(< /sys/class/power_supply/BAT0/capacity) if [[ $capacity -lt lower_battery_threshold ]]; then - dunstify "$capacity"; + acpi | grep -q 'Discharging' && dunstify "$capacity"; fi } diff --git a/config/.ssh/config b/config/.ssh/config index b619e76..274bb85 100644 --- a/config/.ssh/config +++ b/config/.ssh/config @@ -1,3 +1,4 @@ +# FSE Host mx HostName 132.252.238.12 Port 22 @@ -28,44 +29,114 @@ Host www User infra IdentityFile /mnt/veracrypt1/fse +# Own Server Host infinity HostName mos4.de Port 22 User infinity IdentityFile /mnt/veracrypt1/mos4.de -Host github.com - Hostname github.com - Port 22 - User git - IdentityFile /mnt/veracrypt1/git - -Host toya - Hostname 192.168.178.25 - Port 22 - User toya - IdentityFile /mnt/veracrypt1/raspberry - -Host gitlab.com - Hostname gitlab.com - Port 22 - User git - IdentityFile /mnt/veracrypt1/git - Host goldi HostName mos4.de Port 22 User goldi IdentityFile /mnt/veracrypt1/goldi +# Gitlab/Hub +Host github.com + Hostname github.com + Port 22 + User git + IdentityFile /mnt/veracrypt1/git + +Host gitlab.com + Hostname gitlab.com + Port 22 + User git + IdentityFile /mnt/veracrypt1/git + Host picoCTF HostName 2018shell4.picoctf.com Port 22 User mos4 IdentityFile "/home/tuan/Documents/CTF/picoCTF/2018/30 - ssh-keyz/picoCTF" -Host CentOS - HostName 3.125.43.27 +# Homeserver +Host proxmox + HostName 192.168.178.38 Port 22 - User centos - IdentityFile /mnt/veracrypt1/mos4.de + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host nginx + HostName 192.168.178.24 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host nextcloud + HostName 192.168.178.25 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host sonarr + HostName 192.168.178.43 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host portainer + HostName 192.168.178.39 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host fireflyiii + HostName 192.168.178.40 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host pfsense + HostName 192.168.178.55 + Port 2222 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host pihole + HostName 192.168.178.47 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host nfs + HostName 192.168.178.37 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host plex + HostName 192.168.178.48 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host torrent + HostName 192.168.178.51 + # HostName 192.168.178.55 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host minecraft + HostName 192.168.178.59 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox + +Host ftb + HostName 192.168.178.61 + Port 22 + User root + IdentityFile /mnt/veracrypt1/proxmox diff --git a/zsh/.zshrc b/zsh/.zshrc index cef5583..b1892d0 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -4,7 +4,8 @@ export PATH="$PATH:$HOME/.go/bin:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.dotnet export DOTNET_CLI_TELEMETRY_OPTOUT=1 export PenTestTools=$HOME/Local/PenTesting/ export CTF=$HOME/Documents/CTF/ - +export WORKSPACE=$HOME/workspace_l +export ZSHRC="$HOME/.zshrc" # Alias alias q="exit" @@ -12,6 +13,7 @@ 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" # Theme ZSH_THEME="agnoster" @@ -26,6 +28,8 @@ randpw() { < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-$1};echo;}; # History HISTORY_IGNORE='sudo veracrypt *|veracrypt *' +HISTSIZE=10000000 +SAVEHIST=10000000 # Source source $ZSH/oh-my-zsh.sh