From bf49545898401538c61e628bcca80b6802319336 Mon Sep 17 00:00:00 2001 From: Bob Slacker Date: Fri, 9 Jun 2023 19:34:24 +0200 Subject: [PATCH] 0.4 --- dotfiles/cwm/dot-cwmrc | 6 +- .../.config/applications/i2pb.desktop | 11 - dotfiles/dotfolder/.config/gtk-3.0/bookmarks | 16 +- .../dotfolder/.config/gtk-3.0/settings.ini | 2 +- dotfiles/dotfolder/.config/libfm/libfm.conf | 43 - .../.config/lxterminal/lxterminal.conf | 53 -- .../dotfolder/.config/micro/bindings.json | 4 - .../dotfolder/.config/micro/buffers/history | Bin 43 -> 0 bytes .../dotfolder/.config/micro/settings.json | 1 - .../!home!puffy!.config!tmux!tmux.conf~ | 10 - .../!home!puffy!.config!tmux!tmux.conf~.1 | 10 - .../!home!puffy!.config!tmux!tmux.conf~.2 | 10 - .../!home!puffy!.config!tmux!tmux.conf~.3 | 12 - .../!home!puffy!.config!tmux!tmux.conf~.4 | 17 - .../.config/nano/backup/!home!puffy!.cwmrc~ | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.1 | 180 ---- .../nano/backup/!home!puffy!.cwmrc~.10 | 180 ---- .../nano/backup/!home!puffy!.cwmrc~.11 | 191 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.2 | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.3 | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.4 | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.5 | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.6 | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.7 | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.8 | 180 ---- .../.config/nano/backup/!home!puffy!.cwmrc~.9 | 180 ---- .../.config/nano/backup/!home!puffy!.kshrc~ | 67 -- .../.config/nano/backup/!home!puffy!.kshrc~.1 | 67 -- .../.config/nano/backup/!home!puffy!.kshrc~.2 | 68 -- .../.config/nano/backup/!home!puffy!.kshrc~.3 | 68 -- .../.config/nano/backup/!home!puffy!.kshrc~.4 | 68 -- .../.config/nano/backup/!home!puffy!.kshrc~.5 | 68 -- .../nano/backup/!home!puffy!.local!bin!infos~ | 384 -------- .../backup/!home!puffy!.local!bin!infos~.1 | 384 -------- .../backup/!home!puffy!.local!bin!infos~.10 | 387 -------- .../backup/!home!puffy!.local!bin!infos~.11 | 386 -------- .../backup/!home!puffy!.local!bin!infos~.12 | 386 -------- .../backup/!home!puffy!.local!bin!infos~.13 | 383 -------- .../backup/!home!puffy!.local!bin!infos~.14 | 383 -------- .../backup/!home!puffy!.local!bin!infos~.15 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.16 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.17 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.18 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.19 | 383 -------- .../backup/!home!puffy!.local!bin!infos~.2 | 384 -------- .../backup/!home!puffy!.local!bin!infos~.20 | 383 -------- .../backup/!home!puffy!.local!bin!infos~.21 | 383 -------- .../backup/!home!puffy!.local!bin!infos~.22 | 383 -------- .../backup/!home!puffy!.local!bin!infos~.23 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.24 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.25 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.26 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.27 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.28 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.29 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.3 | 385 -------- .../backup/!home!puffy!.local!bin!infos~.30 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.31 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.32 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.33 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.34 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.35 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.36 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.37 | 382 -------- .../backup/!home!puffy!.local!bin!infos~.38 | 389 -------- .../backup/!home!puffy!.local!bin!infos~.39 | 390 -------- .../backup/!home!puffy!.local!bin!infos~.4 | 385 -------- .../backup/!home!puffy!.local!bin!infos~.40 | 390 -------- .../backup/!home!puffy!.local!bin!infos~.41 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.42 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.43 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.44 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.45 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.46 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.47 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.48 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.49 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.5 | 385 -------- .../backup/!home!puffy!.local!bin!infos~.50 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.51 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.52 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.53 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.54 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.55 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.56 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.57 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.58 | 392 -------- .../backup/!home!puffy!.local!bin!infos~.59 | 391 -------- .../backup/!home!puffy!.local!bin!infos~.6 | 385 -------- .../backup/!home!puffy!.local!bin!infos~.60 | 391 -------- .../backup/!home!puffy!.local!bin!infos~.61 | 391 -------- .../backup/!home!puffy!.local!bin!infos~.62 | 391 -------- .../backup/!home!puffy!.local!bin!infos~.63 | 391 -------- .../backup/!home!puffy!.local!bin!infos~.64 | 391 -------- .../backup/!home!puffy!.local!bin!infos~.65 | 391 -------- .../backup/!home!puffy!.local!bin!infos~.66 | 398 -------- .../backup/!home!puffy!.local!bin!infos~.67 | 400 -------- .../backup/!home!puffy!.local!bin!infos~.68 | 400 -------- .../backup/!home!puffy!.local!bin!infos~.69 | 400 -------- .../backup/!home!puffy!.local!bin!infos~.7 | 385 -------- .../backup/!home!puffy!.local!bin!infos~.70 | 397 -------- .../backup/!home!puffy!.local!bin!infos~.8 | 385 -------- .../backup/!home!puffy!.local!bin!infos~.9 | 385 -------- .../nano/backup/!home!puffy!.local!bin!lck~ | 3 - .../nano/backup/!home!puffy!.local!bin!lck~.1 | 3 - .../backup/!home!puffy!.local!bin!lemon.sh~ | 6 - .../backup/!home!puffy!.local!bin!lemon.sh~.1 | 6 - .../!home!puffy!.local!bin!lemon.sh~.10 | 12 - .../!home!puffy!.local!bin!lemon.sh~.11 | 13 - .../!home!puffy!.local!bin!lemon.sh~.12 | 12 - .../!home!puffy!.local!bin!lemon.sh~.13 | 13 - .../!home!puffy!.local!bin!lemon.sh~.14 | 13 - .../!home!puffy!.local!bin!lemon.sh~.15 | 13 - .../!home!puffy!.local!bin!lemon.sh~.16 | 13 - .../!home!puffy!.local!bin!lemon.sh~.17 | 13 - .../!home!puffy!.local!bin!lemon.sh~.18 | 13 - .../!home!puffy!.local!bin!lemon.sh~.19 | 13 - .../backup/!home!puffy!.local!bin!lemon.sh~.2 | 11 - .../backup/!home!puffy!.local!bin!lemon.sh~.3 | 11 - .../backup/!home!puffy!.local!bin!lemon.sh~.4 | 12 - .../backup/!home!puffy!.local!bin!lemon.sh~.5 | 13 - .../backup/!home!puffy!.local!bin!lemon.sh~.6 | 13 - .../backup/!home!puffy!.local!bin!lemon.sh~.7 | 13 - .../backup/!home!puffy!.local!bin!lemon.sh~.8 | 13 - .../backup/!home!puffy!.local!bin!lemon.sh~.9 | 12 - .../nano/backup/!home!puffy!.local!bin!testy~ | 31 - .../backup/!home!puffy!.local!bin!testy~.1 | 33 - .../backup/!home!puffy!.local!bin!testy~.2 | 33 - .../nano/backup/!home!puffy!.local!bin!test~ | 32 - .../backup/!home!puffy!.local!bin!test~.1 | 31 - .../nano/backup/!home!puffy!.xsession~ | 34 - .../nano/backup/!home!puffy!.xsession~.1 | 34 - .../nano/backup/!home!puffy!.xsession~.2 | 34 - .../backup/!home!puffy!Desktop!pkg_list.txt~ | 69 -- .../!home!puffy!Desktop!pkg_list.txt~.1 | 66 -- .../!home!puffy!Desktop!pkg_list.txt~.2 | 65 -- .../!home!puffy!Desktop!pkg_list.txt~.3 | 64 -- .../!home!puffy!Desktop!pkg_list.txt~.4 | 64 -- .../!home!puffy!Desktop!pkg_list_new.txt~ | 62 -- .../!home!puffy!Desktop!pkg_list_new.txt~.1 | 65 -- .../!home!puffy!Desktop!pkg_list_new.txt~.2 | 65 -- ...it-repos!obsd-bkp!etc!X11!xenodm!Xsetup_0~ | 21 - ..._repos!obsd-bkp!etc!X11!xenodm!Xresources~ | 143 --- ...epos!obsd-bkp!etc!X11!xenodm!Xresources~.1 | 143 --- .../nano/backup/!home!puffy!bkp!LICENSE~ | 11 - .../.config/nano/backup/!tmp!msg.2fa~ | 1 - .../.config/nano/backup/!tmp!msg.2fa~.1 | 1 - .../.config/nano/backup/!tmp!msg.2fa~.2 | 1 - .../.config/nano/backup/!tmp!msg.2fa~.3 | 1 - .../dotfolder/.config/nano/backup/!tmp!msg~ | 8 - dotfiles/dotfolder/.config/nano/nanorc | 2 +- .../dotfolder/.config/neofetch/config.conf | 864 ------------------ .../.config/qt5ct/colors/darker_yellow.conf | 4 - dotfiles/dotfolder/.config/qt5ct/qt5ct.conf | 32 - dotfiles/dotfolder/.config/tmux/tmux.conf | 26 - dotfiles/dotfolder/.config/xfe/xferc | 68 +- dotfiles/dotfolder/.local/bin/autostart.sh | 2 +- dotfiles/dotfolder/.local/bin/bkp-dot | 5 +- dotfiles/dotfolder/.local/bin/faq | 3 + dotfiles/dotfolder/.local/bin/infos-term | 2 +- dotfiles/dotfolder/.local/bin/mpm | 2 +- dotfiles/dotfolder/.local/bin/printscreen | 2 +- dotfiles/dotfolder/.local/bin/tilde-connect | 3 + dotfiles/dotfolder/.local/bin/upcvs | 6 +- dotfiles/ksh/dot-kshrc | 7 +- dotfiles/moc/dot-moc/cache/moc_version_tag | 1 - dotfiles/moc/dot-moc/cache/tags.db | Bin 81920 -> 0 bytes dotfiles/moc/dot-moc/equalizer | 2 - dotfiles/moc/dot-moc/last_directory | 1 - dotfiles/moc/dot-moc/pid | 1 - dotfiles/moc/dot-moc/playlist.m3u | 58 -- dotfiles/moc/dot-moc/softmixer | 4 - dotfiles/moc/dot-moc/themes/holly_theme | 38 - dotfiles/moc/dot-moc/themes/puffy_theme | 38 - dotfiles/xeno/dot-xsession | 3 +- etc/X11/xenodm/Xresources | 2 +- etc/X11/xorg.conf.d/20-intel.conf | 9 +- etc/groups | 1 + etc/rc.local | 2 +- etc/sysctl.conf | 3 + pkg_list.txt | 53 +- 181 files changed, 127 insertions(+), 32764 deletions(-) delete mode 100644 dotfiles/dotfolder/.config/applications/i2pb.desktop delete mode 100644 dotfiles/dotfolder/.config/libfm/libfm.conf delete mode 100644 dotfiles/dotfolder/.config/lxterminal/lxterminal.conf delete mode 100644 dotfiles/dotfolder/.config/micro/bindings.json delete mode 100644 dotfiles/dotfolder/.config/micro/buffers/history delete mode 100644 dotfiles/dotfolder/.config/micro/settings.json delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.1 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.2 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.3 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.4 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.1 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.10 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.11 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.2 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.3 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.4 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.5 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.6 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.7 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.8 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.9 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.1 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.2 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.3 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.4 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.5 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~ delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.1 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.10 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.11 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.12 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.13 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.14 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.15 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.16 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.17 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.18 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.19 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.2 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.20 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.21 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.22 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.23 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.24 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.25 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.26 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.27 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.28 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.29 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.3 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.30 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.31 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.32 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.33 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.34 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.35 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.36 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.37 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.38 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.39 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.4 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.40 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.41 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.42 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.43 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.44 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.45 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.46 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.47 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.48 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.49 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.5 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.50 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.51 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.52 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.53 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.54 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.55 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.56 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.57 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.58 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.59 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.6 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.60 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.61 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.62 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.63 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.64 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.65 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.66 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.67 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.68 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.69 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.7 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.70 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.8 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.9 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~ delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~.1 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~ delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.1 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.10 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.11 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.12 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.13 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.14 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.15 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.16 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.17 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.18 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.19 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.2 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.3 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.4 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.5 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.6 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.7 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.8 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.9 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~ delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.1 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.2 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~ delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~.1 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~ delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.1 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.2 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.1 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.2 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.3 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.4 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.1 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.2 delete mode 100755 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git-repos!obsd-bkp!etc!X11!xenodm!Xsetup_0~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~.1 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!home!puffy!bkp!LICENSE~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~ delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.1 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.2 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.3 delete mode 100644 dotfiles/dotfolder/.config/nano/backup/!tmp!msg~ delete mode 100644 dotfiles/dotfolder/.config/neofetch/config.conf delete mode 100644 dotfiles/dotfolder/.config/qt5ct/colors/darker_yellow.conf delete mode 100644 dotfiles/dotfolder/.config/qt5ct/qt5ct.conf delete mode 100644 dotfiles/dotfolder/.config/tmux/tmux.conf create mode 100755 dotfiles/dotfolder/.local/bin/faq create mode 100755 dotfiles/dotfolder/.local/bin/tilde-connect delete mode 100644 dotfiles/moc/dot-moc/cache/moc_version_tag delete mode 100644 dotfiles/moc/dot-moc/cache/tags.db delete mode 100644 dotfiles/moc/dot-moc/equalizer delete mode 100644 dotfiles/moc/dot-moc/last_directory delete mode 100644 dotfiles/moc/dot-moc/pid delete mode 100644 dotfiles/moc/dot-moc/playlist.m3u delete mode 100644 dotfiles/moc/dot-moc/softmixer delete mode 100644 dotfiles/moc/dot-moc/themes/holly_theme delete mode 100644 dotfiles/moc/dot-moc/themes/puffy_theme create mode 100644 etc/groups diff --git a/dotfiles/cwm/dot-cwmrc b/dotfiles/cwm/dot-cwmrc index 6bf3603..fa4a7ed 100644 --- a/dotfiles/cwm/dot-cwmrc +++ b/dotfiles/cwm/dot-cwmrc @@ -175,9 +175,9 @@ command "calc" xcalc command "i2pb" "/home/puffy/.local/bin/i2pb" # Autogroup this ports -autogroup 9 TelegramDesktop -autogroup 8 hexchat -autogroup 7 KeePassXC +autogroup 8 TelegramDesktop +autogroup 7 hexchat +autogroup 6 KeePassXC # ignore these windows when tiling/cycling ignore xclock diff --git a/dotfiles/dotfolder/.config/applications/i2pb.desktop b/dotfiles/dotfolder/.config/applications/i2pb.desktop deleted file mode 100644 index f8c7c19..0000000 --- a/dotfiles/dotfolder/.config/applications/i2pb.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Categories=Internet -NoDisplay=true -Exec=/home/puffy/.local/bin/i2pb -Icon=/home/puffy/.config/i2p/i2pd-logo.png -Name=i2pb -Terminal=false -Comment=Custom profile for Firefox and i2p+ diff --git a/dotfiles/dotfolder/.config/gtk-3.0/bookmarks b/dotfiles/dotfolder/.config/gtk-3.0/bookmarks index 1badf62..33b3a3b 100644 --- a/dotfiles/dotfolder/.config/gtk-3.0/bookmarks +++ b/dotfiles/dotfolder/.config/gtk-3.0/bookmarks @@ -1,8 +1,8 @@ -file:///home/puffy/Documents Documents -file:///home/puffy/Downloads Downloads -file:///home/puffy/Music Music -file:///home/puffy/Pictures Pictures -file:///home/puffy/Public Public -file:///home/puffy/Templates Templates -file:///home/puffy/tmp tmp -file:///home/puffy/Videos Videos +file:///home/b2r1s8/Documents Documents +file:///home/b2r1s8/Downloads Downloads +file:///home/b2r1s8/Music Music +file:///home/b2r1s8/Pictures Pictures +file:///home/b2r1s8/Public Public +file:///home/b2r1s8/Templates Templates +file:///home/b2r1s8/tmp tmp +file:///home/b2r1s8/usb usb diff --git a/dotfiles/dotfolder/.config/gtk-3.0/settings.ini b/dotfiles/dotfolder/.config/gtk-3.0/settings.ini index 4c5fcc5..a6a2bc0 100644 --- a/dotfiles/dotfolder/.config/gtk-3.0/settings.ini +++ b/dotfiles/dotfolder/.config/gtk-3.0/settings.ini @@ -2,7 +2,7 @@ gtk-theme-name=Flat-Remix-GTK-Yellow-Darkest gtk-icon-theme-name=hercules gtk-font-name=Hack Nerd Font 8 -gtk-cursor-theme-name=radioactive +gtk-cursor-theme-name=Radioactive gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR diff --git a/dotfiles/dotfolder/.config/libfm/libfm.conf b/dotfiles/dotfolder/.config/libfm/libfm.conf deleted file mode 100644 index 7301556..0000000 --- a/dotfiles/dotfolder/.config/libfm/libfm.conf +++ /dev/null @@ -1,43 +0,0 @@ -# Configuration file for the libfm version 1.3.2. -# Autogenerated file, don't edit, your changes will be overwritten. - -[config] -single_click=0 -use_trash=1 -confirm_del=1 -confirm_trash=1 -advanced_mode=0 -si_unit=0 -force_startup_notify=1 -backup_as_hidden=1 -no_usb_trash=1 -no_child_non_expandable=0 -show_full_names=0 -only_user_templates=0 -template_run_app=0 -template_type_once=0 -auto_selection_delay=600 -drop_default_action=auto -defer_content_test=0 -quick_exec=0 -thumbnail_local=1 -thumbnail_max=2048 -smart_desktop_autodrop=1 - -[ui] -big_icon_size=48 -small_icon_size=24 -pane_icon_size=24 -thumbnail_size=128 -show_thumbnail=1 -shadow_hidden=0 - -[places] -places_home=1 -places_desktop=1 -places_root=0 -places_computer=0 -places_trash=1 -places_applications=1 -places_network=0 -places_unmounted=1 diff --git a/dotfiles/dotfolder/.config/lxterminal/lxterminal.conf b/dotfiles/dotfolder/.config/lxterminal/lxterminal.conf deleted file mode 100644 index 9014cc3..0000000 --- a/dotfiles/dotfolder/.config/lxterminal/lxterminal.conf +++ /dev/null @@ -1,53 +0,0 @@ -[general] -fontname=Hack Nerd Font Mono 8 -selchars=-A-Za-z0-9,./?%&#:_ -scrollback=10000 -bgcolor=rgba(0,0,0,0.9) -fgcolor=rgb(229,165,10) -palette_color_0=rgb(0,0,0) -palette_color_1=rgb(170,0,0) -palette_color_2=rgb(0,170,0) -palette_color_3=rgb(170,85,0) -palette_color_4=rgb(0,0,170) -palette_color_5=rgb(170,0,170) -palette_color_6=rgb(0,170,170) -palette_color_7=rgb(170,170,170) -palette_color_8=rgb(85,85,85) -palette_color_9=rgb(255,85,85) -palette_color_10=rgb(85,255,85) -palette_color_11=rgb(255,255,85) -palette_color_12=rgb(85,85,255) -palette_color_13=rgb(255,85,255) -palette_color_14=rgb(85,255,255) -palette_color_15=rgb(255,255,255) -color_preset=Custom -disallowbold=false -cursorblinks=true -cursorunderline=false -audiblebell=true -tabpos=top -geometry_columns=80 -geometry_rows=24 -hidescrollbar=true -hidemenubar=true -hideclosebutton=true -hidepointer=false -disablef10=false -disablealt=false -disableconfirm=false - -[shortcut] -new_window_accel=n -new_tab_accel=t -close_tab_accel=w -close_window_accel=q -copy_accel=c -paste_accel=v -name_tab_accel=i -previous_tab_accel=Page_Up -next_tab_accel=Page_Down -move_tab_left_accel=Page_Up -move_tab_right_accel=Page_Down -zoom_in_accel=plus -zoom_out_accel=underscore -zoom_reset_accel=parenright diff --git a/dotfiles/dotfolder/.config/micro/bindings.json b/dotfiles/dotfolder/.config/micro/bindings.json deleted file mode 100644 index 83659cb..0000000 --- a/dotfiles/dotfolder/.config/micro/bindings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Alt-/": "lua:comment.comment", - "CtrlUnderscore": "lua:comment.comment" -} diff --git a/dotfiles/dotfolder/.config/micro/buffers/history b/dotfiles/dotfolder/.config/micro/buffers/history deleted file mode 100644 index 46bcecb0a5f4e0d623df1deadea1f1c2c77efd26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 ucmd=8-^{|u^uL9Hk%#er69WU!|3)StzX`}^VBiIbvpeVK<|gK)FaQ7(s0<+h diff --git a/dotfiles/dotfolder/.config/micro/settings.json b/dotfiles/dotfolder/.config/micro/settings.json deleted file mode 100644 index 0967ef4..0000000 --- a/dotfiles/dotfolder/.config/micro/settings.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~ deleted file mode 100644 index 3be5ab9..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~ +++ /dev/null @@ -1,10 +0,0 @@ -set -g window-status-current-style fg=black,bg='#ff0000' -set-option -g status-position top -set-option -g status-style bg=black -set-option -g status-style fg='#ff0000' -set -g pane-active-border-style fg=''#ff0000'' -set -g pane-border-style fg=''#ff0000'' -set -g mode-style bg='#ff0000',fg=black -set -g clock-mode-colour red -set -g mouse on -set -g default-shell /usr/local/bin/zsh diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.1 deleted file mode 100644 index f07b51c..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.1 +++ /dev/null @@ -1,10 +0,0 @@ -set -g window-status-current-style fg=black,bg=yellow -set-option -g status-position top -set-option -g status-style bg=black -set-option -g status-style fg=yellow -set -g pane-active-border-style fg=yellow -set -g pane-border-style fg=yellow -set -g mode-style bg=yellow,fg=black -set -g clock-mode-colour red -set -g mouse on -set -g default-shell /usr/local/bin/zsh diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.2 deleted file mode 100644 index be7d66f..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.2 +++ /dev/null @@ -1,10 +0,0 @@ -set -g window-status-current-style fg=black,bg=yellow -set-option -g status-position top -set-option -g status-style bg=black -set-option -g status-style fg=yellow -set -g pane-active-border-style fg=yellow -set -g pane-border-style fg=yellow -set -g mode-style bg=yellow,fg=black -set -g clock-mode-colour red -set -g mouse on -#set -g default-shell /usr/local/bin/zsh diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.3 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.3 deleted file mode 100644 index bca879b..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.3 +++ /dev/null @@ -1,12 +0,0 @@ -# Colors -set-option -g status-style bg=black -set-option -g status-style fg=yellow -set -g window-status-current-style fg=black,bg=yellow -set -g pane-active-border-style fg=yellow -set -g pane-border-style fg=yellow -set -g mode-style bg=yellow,fg=black -set -g clock-mode-colour red - -# Settigs -set-option -g status-position top -set -g mouse on diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.4 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.4 deleted file mode 100644 index b7fed5d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.config!tmux!tmux.conf~.4 +++ /dev/null @@ -1,17 +0,0 @@ -# Colors -# Enable color support inside of tmux. -set -g default-terminal "xterm-256color" -set -ga terminal-overrides ",*256col*:Tc" -set-option -g status-style bg=black -set-option -g status-style fg=yellow -set -g window-status-current-style fg=black,bg=yellow -set -g pane-active-border-style fg=yellow -set -g pane-border-style fg=yellow -set -g mode-style bg=yellow,fg=black -set -g clock-mode-colour red - -# Settigs -set-option -g status-position top -set -g mouse on -# Add a bit more scroll history in the buffer. -set -g history-limit 50000 diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~ deleted file mode 100644 index 9348bc6..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~ +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 27 0 0 0 -moveamount 3 -vtile 50 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "terminator --geometry 480x325" -#bind-key 4-Return "/home/b2r1s8/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l lock -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/b2r1s8/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/b2r1s8/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.1 deleted file mode 100644 index 7415755..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.1 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 27 0 0 0 -moveamount 3 -vtile 50 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "terminator --geometry 480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l lock -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.10 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.10 deleted file mode 100644 index 84a0c40..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.10 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 20 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "lxterminal --geometry=80x25" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l /home/puffy/.local/bin/lck -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.11 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.11 deleted file mode 100644 index d37bd3e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.11 +++ /dev/null @@ -1,191 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 20 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "lxterminal --geometry=80x25 -e /home/puffy/.local/bin/tm" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l /home/puffy/.local/bin/lck -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu to run a command (configured bellow) -bind-key 4-slash menu-cmd -# mod + ? = menu-window-hidden to search for hidden windows -bind-key 4-question menu-window-hiden -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# some unbinds -unbind-key 4-w - -# some bindings -bind-key 4-w menu-window - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" "lxterminal" -command "Browser" "firefox" -command "clock" "xclock -d -update 1 -render" -command "calc" xcalc -command "i2pb" "/home/puffy/.local/bin/i2pb" - -# Autogroup this ports -autogroup 9 TelegramDesktop -autogroup 8 hexchat -autogroup 7 KeePassXC - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.2 deleted file mode 100644 index 9a377ce..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.2 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 23 0 0 0 -moveamount 3 -vtile 50 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "terminator --geometry 480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l lock -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.3 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.3 deleted file mode 100644 index 23788c1..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.3 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 23 0 0 0 -moveamount 3 -vtile 70 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "terminator --geometry 480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l lock -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.4 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.4 deleted file mode 100644 index 61ba578..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.4 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 23 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "terminator --geometry 480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l lock -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.5 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.5 deleted file mode 100644 index 1ad3460..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.5 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 20 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "terminator --geometry 480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l lock -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.6 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.6 deleted file mode 100644 index bdc5990..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.6 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 20 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "terminator --geometry 480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l /home/puffy/.local/bin/lck -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.7 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.7 deleted file mode 100644 index 8ee5385..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.7 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 20 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "lxterminal --geometry 480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l /home/puffy/.local/bin/lck -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.8 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.8 deleted file mode 100644 index 14b2f30..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.8 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 20 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "lxterminal --geometry=480x325" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l /home/puffy/.local/bin/lck -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.9 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.9 deleted file mode 100644 index 84a0c40..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.cwmrc~.9 +++ /dev/null @@ -1,180 +0,0 @@ -# Defaults - -sticky yes -snapdist 4 -gap 20 0 0 0 -moveamount 3 -vtile 60 - -# set font for menus -fontname "fixed:pixelsize=13:style=semicondensed" - -# remove all default keybindings -unbind-key all - -# Layout -borderwidth 1 -color activeborder yellow -color inactiveborder orange -color urgencyborder red -color font yellow -color menubg black -color menufg yellow - -# KEYBINDINGS: -# 4 = mod (windows key) -# S = shift -# C = control -# M = meta (alt) - -# mod + enter = new terminal -bind-key 4-Return "lxterminal --geometry=80x25" -#bind-key 4-Return "/home/puffy/.local/bin/term" - -# mod + b = browser -bind-key 4-b firefox -# mod+ E = Emacs -bind-key 4-e "emacs" -# ctrl + alt + L = lock screen (xlock) -bind-key CM-l /home/puffy/.local/bin/lck -# mod + backspace = hide window -bind-key 4-BackSpace window-hide -# mod + prtsc = screenshot -bind-key 4-Print /home/puffy/.local/bin/printscreen -# mod + M = mocp -bind-key 4-m /home/puffy/.local/bin/mpm - -## mocp binds -# Toggle play and pause -bind-key 4-p "mocp -G" -# Toggle shuffle -bind-key 4S-p "mocp -t s" -# Toggle auto next -bind-key 4M-p "mocp -t n" -# Toggle repeat -bind-key 4SM-p "mocp -t r" - -# mod + down arrow = lower window's focus -bind-key 4-Down window-lower -# mod + up arrow = raise window's focus -bind-key 4-Up window-raise -# mod/alt + tab = cycle through current windows -bind-key 4-Tab window-cycle -bind-key M-Tab window-cycle -# mod/alt + shift + tab = same thing in reverse -bind-key 4S-Tab window-rcycle -bind-key MS-Tab window-rcycle -# mod + w = kill window -bind-key 4-w window-delete -# set a window's label -bind-key 4-n window-menu-label - -# mod + $N = show only windows for group $N -# (you can think of this as switching to virtual desktop $N) -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -# mod + shift +$N = move window to group $N -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -# mod + A = toggle showing windows from all groups -bind-key 4-a group-toggle-all -# mod + G = toggle current window's group membership -bind-key 4-g window-group - -# mod + right arrow = cycle through the window groups -# (you can think of this as switching to the next virtual desktop) -bind-key 4-Right group-cycle -# mod + left arrow = same thing in reverse -bind-key 4-Left group-rcycle -# mod + S = stick current window to be visible in all groups -bind-key 4-s window-stick - -# mod + shift + F = make current window fullscreen -bind-key 4S-f window-fullscreen -# mod + f = maximize current window -bind-key 4-f window-maximize -# mod + equals = maximize window in vertical direction only -bind-key 4-equal window-vmaximize -# mod + shift + equals = maximize window in horizontal direction only -bind-key 4S-equal window-hmaximize - -# mod + H,J,K,L = move window left, down, up, right 10 pixels -bind-key 4-h window-move-left -bind-key 4-j window-move-down -bind-key 4-k window-move-up -bind-key 4-l window-move-right - -# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels -bind-key 4S-h window-resize-left -bind-key 4S-j window-resize-down -bind-key 4S-k window-resize-up -bind-key 4S-l window-resize-right - -# mod + V = tile windows vertically, current window to the left -bind-key 4-v window-vtile -# mod + C = tile windows horizontally, current window to the top -bind-key 4-c window-htile - -# mod + / = show popup menu of current windows -bind-key 4-slash menu-window -# mod + ? = show popup menu to run a command (configured below) -bind-key 4-question menu-cmd -# mod + d = show popup menu to run an arbitrary command -bind-key 4-d menu-exec -# mod + . = show popup menu of known ssh hosts to connect to -bind-key 4-period menu-ssh - -# mod + shift + R = restart cwm, reloading configuration -bind-key 4S-r restart -# mod + shift + E = log out -bind-key 4S-e quit - -# unbind default mouse actions -unbind-mouse M-1 -unbind-mouse CM-1 -unbind-mouse M-2 -unbind-mouse M-3 -unbind-mouse CMS-3 - -# mod + left click drag = move window -bind-mouse 4-1 window-move -# mod + right click drag = resize window -bind-mouse 4-3 window-resize -# mod + middle click = lower window's focus -bind-mouse 4-2 window-lower -# mod + shift + middle click = hide window -bind-mouse 4S-2 window-hide - -# these commands will appear in the command menu -command "Terminal" urxvtc -command Browser "firefox" -command xclock "xclock -d -update 1 -render" -command xcalc xcalc - -# ignore these windows when tiling/cycling -ignore xclock -autogroup 0 xclock -ignore lemonbar -autogroup 0 lemonbar -ignore termbar -autogroup 0 termbar -ignore dunst -autogroup 0 dunst -ignore xmessage -autogroup 0 xmessage diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~ deleted file mode 100644 index 03a6f55..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~ +++ /dev/null @@ -1,67 +0,0 @@ -PATH=$HOME/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games -export PATH HOME TERM -export PAGER=most -export LESS='-iMRS -x2' -export LANG=en_US.UTF-8 -export LC_CTYPE=en_US.UTF-8 -export CLICOLOR=1 -export CVSROOT=anoncvs@anoncvs.comstyle.com:/cvs -export MAILCHECK=0 - -HISTFILE=$HOME/.ksh_history -HISTSIZE=20000 - -export _little_puffy=' - _____ - \- -/ _________________________ - \_/ \ / \ - | O O | / Wellcome to OpenBSD! | - |_ < ) 3 ) \ 7.1 GENERIC.MP#3 | - / \ / \_________________________/ - /-_____-\ -' - -[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" >/dev/null - -# emacs mode gives you the familiar Ctrl-A, Ctrl-E, etc -set -o emacs - -# Aliases -alias ls='exa --icons' -alias ll='ls -l' -alias la='ls -a' -alias lla='ll -a' -alias cp='cp -vi' -alias mv='mv -vi' -alias rm='rm -vi' -alias ..='cd ..' -alias ...='cd ...' -alias mkdir='mkdir -p' -alias df='df -h' -alias du='du -ch' -alias lsblk='df' -alias pingobsd='ping -c 3 openbsd.org' -alias enw='emacs -nw' -alias tbin='nc termbin.com 9999' -alias sysclean='doas sysclean' -alias pkg_add='doas pkg_add' -alias pkg_delete='doas pkg_delete' -alias pkg_list="pkg_info -zm | sed 's/--$//g'" -alias dotstow='stow --dotfiles' -alias reboot='doas shutdown -r now' -alias poweroff='doas shutdown -p now' -alias dsu='doas su -' -alias cdt="cd ~/Documents/livros/ocultismo/Thelema/" -alias cdo="cd ~/Documents/livros/tech/openbsd/" -alias faq='w3m ~/Templates/unixlike/openbsd/projects/www/faq/index.html' -alias stilde='ssh b2r1s8@tilde.institute' -alias hss='hugo server --noHTTPCache' - -PS1="\u\e[1;36m<@>\e[1;33m\h \e[1;34m\w \n\e[0;32m§\033[0m\] " -#PS1=" \e[1;34m\w \e[m$ " -#PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1" - -export PS1 - -echo "$_little_puffy" -thelemic-date diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.1 deleted file mode 100644 index 2d4c7be..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.1 +++ /dev/null @@ -1,67 +0,0 @@ -PATH=$HOME/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games -export PATH HOME TERM -export PAGER=most -export LESS='-iMRS -x2' -export LANG=en_US.UTF-8 -export LC_CTYPE=en_US.UTF-8 -export CLICOLOR=1 -export CVSROOT=anoncvs@anoncvs.comstyle.com:/cvs -export MAILCHECK=0 - -HISTFILE=$HOME/.ksh_history -HISTSIZE=20000 - -export _little_puffy=' - _____ - \- -/ _________________________ - \_/ \ / \ - | O O | / Wellcome to OpenBSD! | - |_ < ) 3 ) \ 7.1 GENERIC.MP#3 | - / \ / \_________________________/ - /-_____-\ -' - -[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" >/dev/null - -# emacs mode gives you the familiar Ctrl-A, Ctrl-E, etc -set -o emacs - -# Aliases -alias ls='exa --icons' -alias ll='ls -l' -alias la='ls -a' -alias lla='ll -a' -alias cp='cp -vi' -alias mv='mv -vi' -alias rm='rm -vi' -alias ..='cd ..' -alias ...='cd ...' -alias mkdir='mkdir -p' -alias df='df -h' -alias du='du -ch' -alias lsblk='df' -alias pingobsd='ping -c 3 openbsd.org' -alias enw='emacs -nw' -alias tbin='nc termbin.com 9999' -alias sysclean='doas sysclean' -alias pkg_add='doas pkg_add' -alias pkg_delete='doas pkg_delete' -alias pkg_list="pkg_info -zm | sed 's/--$//g'" -alias dotstow='stow --dotfiles' -alias reboot='doas shutdown -r now' -alias poweroff='doas shutdown -p now' -alias dsu='doas su -' -alias cdt="cd ~/Documents/livros/ocultismo/Thelema/" -alias cdo="cd ~/Documents/livros/tech/openbsd/" -alias faq='w3m ~/Templates/unixlike/openbsd/projects/www/faq/index.html' -alias stilde='ssh b2r1s8@tilde.institute' -alias hss='hugo server --noHTTPCache' - -PS1="\u\e[1;36m<@>\e[1;33m\h \e[1;34m\w \n\e[0;32m§\033[0m\] " -#PS1=" \e[1;34m\w \e[m$ " -#PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1" - -export PS1 - -echo "$_little_puffy" -#thelemic-date diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.2 deleted file mode 100644 index d66f560..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.2 +++ /dev/null @@ -1,68 +0,0 @@ -PATH=$HOME/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games -export PATH HOME TERM -export PAGER=most -export LESS='-iMRS -x2' -export LANG=en_US.UTF-8 -export LC_CTYPE=en_US.UTF-8 -export CLICOLOR=1 -export CVSROOT=anoncvs@anoncvs.comstyle.com:/cvs -export MAILCHECK=0 - -HISTFILE=$HOME/.ksh_history -HISTSIZE=20000 - -export _little_puffy=' - _____ - \- -/ _________________________ - \_/ \ / \ - | O O | / Wellcome to OpenBSD! | - |_ < ) 3 ) \ 7.1 GENERIC.MP#3 | - / \ / \_________________________/ - /-_____-\ -' - -[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" >/dev/null - -# emacs mode gives you the familiar Ctrl-A, Ctrl-E, etc -set -o emacs - -# Aliases -alias ls='exa --icons' -alias ll='ls -l' -alias la='ls -a' -alias lla='ll -a' -alias cp='cp -vi' -alias mv='mv -vi' -alias rm='rm -vi' -alias ..='cd ..' -alias ...='cd ...' -alias mkdir='mkdir -p' -alias df='df -h' -alias du='du -ch' -alias lsblk='df' -alias pingobsd='ping -c 3 openbsd.org' -alias enw='emacs -nw' -alias tbin='nc termbin.com 9999' -alias sysclean='doas sysclean' -alias pkg_add='doas pkg_add' -alias pkg_delete='doas pkg_delete' -alias pkg_list="pkg_info -zm | sed 's/--$//g'" -alias pkg_search="pkg_info -Q" -alias dotstow='stow --dotfiles' -alias reboot='doas shutdown -r now' -alias poweroff='doas shutdown -p now' -alias dsu='doas su -' -alias cdt="cd ~/Documents/livros/ocultismo/Thelema/" -alias cdo="cd ~/Documents/livros/tech/openbsd/" -alias faq='w3m ~/Templates/unixlike/openbsd/projects/www/faq/index.html' -alias stilde='ssh b2r1s8@tilde.institute' -alias hss='hugo server --noHTTPCache' - -PS1="\u\e[1;36m<@>\e[1;33m\h \e[1;34m\w \n\e[0;32m§\033[0m\] " -#PS1=" \e[1;34m\w \e[m$ " -#PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1" - -export PS1 - -echo "$_little_puffy" -#thelemic-date diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.3 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.3 deleted file mode 100644 index dcd470d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.3 +++ /dev/null @@ -1,68 +0,0 @@ -PATH=$HOME/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games -export PATH HOME TERM -export PAGER=most -export LESS='-iMRS -x2' -export LANG=en_US.UTF-8 -export LC_CTYPE=en_US.UTF-8 -export CLICOLOR=1 -export CVSROOT=anoncvs@anoncvs.comstyle.com:/cvs -export MAILCHECK=0 - -HISTFILE=$HOME/.ksh_history -HISTSIZE=20000 - -export _little_puffy=' - _____ - \- -/ _________________________ - \_/ \ / \ - | O O | / Wellcome to OpenBSD! | - |_ < ) 3 ) \ 7.3 GENERIC.MP#1125 | - / \ / \_________________________/ - /-_____-\ -' - -[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" >/dev/null - -# emacs mode gives you the familiar Ctrl-A, Ctrl-E, etc -set -o emacs - -# Aliases -alias ls='exa --icons' -alias ll='ls -l' -alias la='ls -a' -alias lla='ll -a' -alias cp='cp -vi' -alias mv='mv -vi' -alias rm='rm -vi' -alias ..='cd ..' -alias ...='cd ...' -alias mkdir='mkdir -p' -alias df='df -h' -alias du='du -ch' -alias lsblk='df' -alias pingobsd='ping -c 3 openbsd.org' -alias enw='emacs -nw' -alias tbin='nc termbin.com 9999' -alias sysclean='doas sysclean' -alias pkg_add='doas pkg_add' -alias pkg_delete='doas pkg_delete' -alias pkg_list="pkg_info -zm | sed 's/--$//g'" -alias pkg_search="pkg_info -Q" -alias dotstow='stow --dotfiles' -alias reboot='doas shutdown -r now' -alias poweroff='doas shutdown -p now' -alias dsu='doas su -' -alias cdt="cd ~/Documents/livros/ocultismo/Thelema/" -alias cdo="cd ~/Documents/livros/tech/openbsd/" -alias faq='w3m ~/Templates/unixlike/openbsd/projects/www/faq/index.html' -alias stilde='ssh b2r1s8@tilde.institute' -alias hss='hugo server --noHTTPCache' - -PS1="\u\e[1;36m<@>\e[1;33m\h \e[1;34m\w \n\e[0;32m§\033[0m\] " -#PS1=" \e[1;34m\w \e[m$ " -#PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1" - -export PS1 - -echo "$_little_puffy" -#thelemic-date diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.4 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.4 deleted file mode 100644 index b00bef2..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.4 +++ /dev/null @@ -1,68 +0,0 @@ -PATH=$HOME/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games -export PATH HOME TERM -export PAGER=most -export LESS='-iMRS -x2' -export LANG=en_US.UTF-8 -export LC_CTYPE=en_US.UTF-8 -export CLICOLOR=1 -export CVSROOT=anoncvs@anoncvs.comstyle.com:/cvs -export MAILCHECK=0 - -HISTFILE=$HOME/.ksh_history -HISTSIZE=20000 - -export _little_puffy=' - _____ - \- -/ _________________________ - \_/ \ / \ - | O O | / Wellcome to OpenBSD! | - |_ < ) 3 ) \ 7.3 GENERIC.MP#1125 | - / \ / \_________________________/ - /-_____-\ -' - -[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" >/dev/null - -# emacs mode gives you the familiar Ctrl-A, Ctrl-E, etc -set -o emacs - -# Aliases -alias ls='exa --icons' -alias ll='ls -l' -alias la='ls -a' -alias lla='ll -a' -alias cp='cp -vi' -alias mv='mv -vi' -alias rm='rm -vi' -alias ..='cd ..' -alias ...='cd ...' -alias mkdir='mkdir -p' -alias df='df -h' -alias du='du -ch' -alias lsblk='df' -alias pingobsd='ping -c 3 openbsd.org' -alias enw='emacs -nw' -alias tbin='nc termbin.com 9999' -alias sysclean='doas sysclean' -alias pkg_add='doas pkg_add' -alias pkg_delete='doas pkg_delete' -alias pkg_list="pkg_info -zm | sed 's/--$//g'" -alias pkg_search="pkg_info -Q" -alias dotstow='stow --dotfiles' -alias reboot='doas shutdown -r now' -alias poweroff='doas shutdown -p now' -alias dsu='doas su -' -alias cdt="cd ~/Documents/livros/ocultismo/Thelema/" -alias cdo="cd ~/Documents/livros/tech/openbsd/" -alias faq='w3m ~/Templates/unixlike/openbsd/projects/www/faq/index.html' -alias stilde='ssh b2r1s8@tilde.institute' -alias hss='hugo server --noHTTPCache' -alias tm='tmux -f ~/.config/tmux/tmux.conf' -PS1="\u\e[1;36m<@>\e[1;33m\h \e[1;34m\w \n\e[0;32m§\033[0m\] " -#PS1=" \e[1;34m\w \e[m$ " -#PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1" - -export PS1 - -echo "$_little_puffy" -#thelemic-date diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.5 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.5 deleted file mode 100644 index dcd470d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.kshrc~.5 +++ /dev/null @@ -1,68 +0,0 @@ -PATH=$HOME/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games -export PATH HOME TERM -export PAGER=most -export LESS='-iMRS -x2' -export LANG=en_US.UTF-8 -export LC_CTYPE=en_US.UTF-8 -export CLICOLOR=1 -export CVSROOT=anoncvs@anoncvs.comstyle.com:/cvs -export MAILCHECK=0 - -HISTFILE=$HOME/.ksh_history -HISTSIZE=20000 - -export _little_puffy=' - _____ - \- -/ _________________________ - \_/ \ / \ - | O O | / Wellcome to OpenBSD! | - |_ < ) 3 ) \ 7.3 GENERIC.MP#1125 | - / \ / \_________________________/ - /-_____-\ -' - -[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" >/dev/null - -# emacs mode gives you the familiar Ctrl-A, Ctrl-E, etc -set -o emacs - -# Aliases -alias ls='exa --icons' -alias ll='ls -l' -alias la='ls -a' -alias lla='ll -a' -alias cp='cp -vi' -alias mv='mv -vi' -alias rm='rm -vi' -alias ..='cd ..' -alias ...='cd ...' -alias mkdir='mkdir -p' -alias df='df -h' -alias du='du -ch' -alias lsblk='df' -alias pingobsd='ping -c 3 openbsd.org' -alias enw='emacs -nw' -alias tbin='nc termbin.com 9999' -alias sysclean='doas sysclean' -alias pkg_add='doas pkg_add' -alias pkg_delete='doas pkg_delete' -alias pkg_list="pkg_info -zm | sed 's/--$//g'" -alias pkg_search="pkg_info -Q" -alias dotstow='stow --dotfiles' -alias reboot='doas shutdown -r now' -alias poweroff='doas shutdown -p now' -alias dsu='doas su -' -alias cdt="cd ~/Documents/livros/ocultismo/Thelema/" -alias cdo="cd ~/Documents/livros/tech/openbsd/" -alias faq='w3m ~/Templates/unixlike/openbsd/projects/www/faq/index.html' -alias stilde='ssh b2r1s8@tilde.institute' -alias hss='hugo server --noHTTPCache' - -PS1="\u\e[1;36m<@>\e[1;33m\h \e[1;34m\w \n\e[0;32m§\033[0m\] " -#PS1=" \e[1;34m\w \e[m$ " -#PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1" - -export PS1 - -echo "$_little_puffy" -#thelemic-date diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~ deleted file mode 100755 index 808c645..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~ +++ /dev/null @@ -1,384 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n ${_h} | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/b2r1s8 | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="cha" ;; - "idle") _states="idl" ;; - "full") _states="ful" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.1 deleted file mode 100755 index 0f3a28f..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.1 +++ /dev/null @@ -1,384 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n ${_h} | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="cha" ;; - "idle") _states="idl" ;; - "full") _states="ful" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.10 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.10 deleted file mode 100755 index 9343107..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.10 +++ /dev/null @@ -1,387 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _dig="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' - sed s/[0-9]*//)" - -# if [ "${_dig - -_mem_use="11" - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.11 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.11 deleted file mode 100755 index 0bca94c..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.11 +++ /dev/null @@ -1,386 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# if [ "${_dig - -_mem_use="11" - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.12 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.12 deleted file mode 100755 index 5ed587e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.12 +++ /dev/null @@ -1,386 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - -_mem_use="11" - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.13 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.13 deleted file mode 100755 index 840ceed..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.13 +++ /dev/null @@ -1,383 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_used="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case dig in - M) echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) echo "${_blue}Ram:%{F-} ${_green}$_mem_use/16G%{F-}" ;; - esac - -_mem_use="11" - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.14 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.14 deleted file mode 100755 index f7cb273..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.14 +++ /dev/null @@ -1,383 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_used="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case dig in - M) echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -_mem_use="11" - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.15 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.15 deleted file mode 100755 index fa34645..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.15 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="11G" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_used="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case dig in - M) echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.16 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.16 deleted file mode 100755 index 70f96b0..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.16 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="11G" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_used="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - M) echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.17 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.17 deleted file mode 100755 index 11e0059..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.17 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="11G" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - M) echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.18 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.18 deleted file mode 100755 index 115d85a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.18 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="111M" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - M) echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.19 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.19 deleted file mode 100755 index 5d00dc1..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.19 +++ /dev/null @@ -1,383 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="111M" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - M) _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) _out="${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -echo -n "${_out}" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.2 deleted file mode 100755 index 3a9830b..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.2 +++ /dev/null @@ -1,384 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="cha" ;; - "idle") _states="idl" ;; - "full") _states="ful" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.20 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.20 deleted file mode 100755 index d92bb18..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.20 +++ /dev/null @@ -1,383 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="1111M" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - M) _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) _out="${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -echo -n "${_out}" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.21 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.21 deleted file mode 100755 index f08522c..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.21 +++ /dev/null @@ -1,383 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="1111M" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - M) _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - G) _out="${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -echo "${_out}" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.22 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.22 deleted file mode 100755 index c4bb29e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.22 +++ /dev/null @@ -1,383 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="1111M" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out="${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -echo "${_out}" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.23 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.23 deleted file mode 100755 index b175884..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.23 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_mem="111M" - _dig="$(printf '%s' $_mem | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_mem | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.24 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.24 deleted file mode 100755 index 2416b8a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.24 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - -_memo="111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.25 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.25 deleted file mode 100755 index cd7b6b9..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.25 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.26 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.26 deleted file mode 100755 index f31810e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.26 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.27 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.27 deleted file mode 100755 index f31810e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.27 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.28 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.28 deleted file mode 100755 index f31810e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.28 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.29 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.29 deleted file mode 100755 index 7600b2b..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.29 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.3 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.3 deleted file mode 100755 index aac1437..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.3 +++ /dev/null @@ -1,385 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M// | \ - sed s/G//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="cha" ;; - "idle") _states="idl" ;; - "full") _states="ful" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.30 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.30 deleted file mode 100755 index c363399..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.30 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.31 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.31 deleted file mode 100755 index 4087aa0..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.31 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case ${_net} in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.32 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.32 deleted file mode 100755 index 25ce404..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.32 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.33 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.33 deleted file mode 100755 index 0fc4d6d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.33 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os} " - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.34 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.34 deleted file mode 100755 index 067cbec..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.34 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}] " - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.35 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.35 deleted file mode 100755 index 7167b6f..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.35 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}] " - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.36 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.36 deleted file mode 100755 index a25f52c..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.36 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}] " - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.37 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.37 deleted file mode 100755 index 2f23c22..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.37 +++ /dev/null @@ -1,382 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}] " - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.38 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.38 deleted file mode 100755 index ee676f2..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.38 +++ /dev/null @@ -1,389 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.39 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.39 deleted file mode 100755 index 30bd14d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.39 +++ /dev/null @@ -1,390 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) |\ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.4 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.4 deleted file mode 100755 index 1686be1..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.4 +++ /dev/null @@ -1,385 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M// | \ - sed s/G//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.40 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.40 deleted file mode 100755 index 10eb7fa..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.40 +++ /dev/null @@ -1,390 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.41 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.41 deleted file mode 100755 index 44216d8..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.41 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.42 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.42 deleted file mode 100755 index 48bca7a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.42 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.43 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.43 deleted file mode 100755 index bd37b13..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.43 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.44 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.44 deleted file mode 100755 index d7d2a10..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.44 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.45 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.45 deleted file mode 100755 index 4833a9d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.45 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.46 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.46 deleted file mode 100755 index 9c5ed63..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.46 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.47 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.47 deleted file mode 100755 index 423502a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.47 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -#echo "test" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.48 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.48 deleted file mode 100755 index 1fbd49e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.48 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out-"${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "_out" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.49 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.49 deleted file mode 100755 index e9dff12..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.49 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out-"${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "$_out" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.5 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.5 deleted file mode 100755 index 1686be1..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.5 +++ /dev/null @@ -1,385 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M// | \ - sed s/G//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.50 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.50 deleted file mode 100755 index 1106f3c..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.50 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case "${_dig}" in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out-"${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "$_out" -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.51 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.51 deleted file mode 100755 index a93989f..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.51 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.52 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.52 deleted file mode 100755 index b60de8d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.52 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.53 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.53 deleted file mode 100755 index bb1836c..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.53 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.54 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.54 deleted file mode 100755 index d5acb90..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.54 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -(_temp) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.55 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.55 deleted file mode 100755 index 17d0fda..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.55 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.56 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.56 deleted file mode 100755 index 57adee5..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.56 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -# -#$(_thelemic_date) \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.57 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.57 deleted file mode 100755 index bf97bf6..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.57 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo "" - -} - -# -#$(_thelemic_date) \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.58 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.58 deleted file mode 100755 index 61bdc2d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.58 +++ /dev/null @@ -1,392 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo "" - -} - -# -#$(_thelemic_date) \ -#$(_rec) | \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.59 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.59 deleted file mode 100755 index 7a87f9f..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.59 +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo "" - -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.6 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.6 deleted file mode 100755 index fecb9f0..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.6 +++ /dev/null @@ -1,385 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M// | \ - sed s/G//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.60 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.60 deleted file mode 100755 index c1df61c..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.60 +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.61 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.61 deleted file mode 100755 index 94aff55..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.61 +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}V/%{F-}${_pink}A:%{F-} ${_video_color}/${_audio_color}" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.62 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.62 deleted file mode 100755 index b360aa9..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.62 +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.63 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.63 deleted file mode 100755 index 72cb03a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.63 +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo "" - -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.64 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.64 deleted file mode 100755 index bf0c310..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.64 +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.65 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.65 deleted file mode 100755 index d62c275..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.65 +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ -_net="em0" -# _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - - echo " " - -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.66 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.66 deleted file mode 100755 index ad740ff..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.66 +++ /dev/null @@ -1,398 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ -_net="em0" -# _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - -_net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - -if [ "${_net}" = "em0" ]; then - echo " " -elif [ "$_net" = "iwn0" ]; then - echo " " -else - echo " " -fi -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.67 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.67 deleted file mode 100755 index 31d0ca1..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.67 +++ /dev/null @@ -1,400 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ -_net="em0" -# _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - -_net="em0" - -#_net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - -if [ "${_net}" = "em0" ]; then - echo " " -elif [ "$_net" = "iwn0" ]; then - echo " " -else - echo " " -fi -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.68 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.68 deleted file mode 100755 index 09d5f88..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.68 +++ /dev/null @@ -1,400 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ -_net="em0" -# _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - -_net="ecdv" - -#_net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - -if [ "${_net}" = "em0" ]; then - echo " " -elif [ "$_net" = "iwn0" ]; then - echo " " -else - echo " " -fi -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.69 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.69 deleted file mode 100755 index 17976df..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.69 +++ /dev/null @@ -1,400 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ -_net="kvav" -# _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - -_net="ecdv" - -#_net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - -if [ "${_net}" = "em0" ]; then - echo " " -elif [ "$_net" = "iwn0" ]; then - echo " " -else - echo " " -fi -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.7 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.7 deleted file mode 100755 index 8a99a4d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.7 +++ /dev/null @@ -1,385 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M// | \ - sed s/G//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.70 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.70 deleted file mode 100755 index 13218c5..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.70 +++ /dev/null @@ -1,397 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case "${_net}" in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "| ${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _memo="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}')" - -# _memo="1111M" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - if [ "${_dig}" = "M" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" - fi -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}A/%{F-}${_pink}V:%{F-} ${_audio_color}/${_video_color}" - -} - -_network(){ - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%a 1%Y-%m-%d %H:%M:%S") ;; - *) _date=$(date "+%a 1%Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date |" - -} - -_space(){ - -_net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - -if [ "${_net}" = "em0" ]; then - echo " " -elif [ "$_net" = "iwn0" ]; then - echo " " -else - echo " " -fi -} - -#$(_thelemic_date) \ - -while true; do - echo "%{l}%{+u}%{+o}\ -$(_os_type) \ -$(_grp) \ -$(_space) \ -%{c}$(_space) | \ -$(_mem) | \ -$(_smt_func) | \ -$(_fan_speed) | \ -$(_temp) | \ -$(_network) | \ -$(_sec) | \ -$(_pf) | \ -$(_mail) | \ -$(_rec) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -$(_space) \ -%{r}$(_space) \ -$(_clock)" - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.8 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.8 deleted file mode 100755 index ebacce9..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.8 +++ /dev/null @@ -1,385 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage - _mem_use="$(top -d1 | \ - head -n "${_h}" | \ - tail -1 | \ - awk '{print $3}' | \ - awk -F / '{print $1}' | \ - sed s/M// | \ - sed s/G//)" - - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.9 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.9 deleted file mode 100755 index 9e98731..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!infos~.9 +++ /dev/null @@ -1,385 +0,0 @@ -#!/bin/ksh - -# Colors - -_pink="%{F#FF00B6}" -_purple="%{F#7C00FF}" -_cyan="%{F#00F0FF}" -_blue="%{F#002EFF}" -_orange="%{F#FF9E00}" -_green="%{F#00FF00}" -_red="%{F#FF0000}" -_yellow="%{F#FFF000}" - -# Functions - -## Define OS version -_os_type(){ - - _net=$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}') - - case $_net in - "em0") _os="Open${_orange}BSD%{F-} ${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - "iwn0") _os="${_cyan}$(sysctl -n kern.osrelease)%{F-} ${_red}$(sysctl -n kern.osversion)%{F-}" ;; - esac - - echo "${_os}" - -} - -## Thelemic date -_thelemic_date(){ - - # Vars - _dayw=$(date "+%a") ## Day of the week - _daym=$(date "+%d") ## Day of the mounth - _mounth=$(date "+%m") ## Mounth number - _year=$(date "+%Y") ## Current year - _year_zero="1904" - _year_diff="$(echo "${_year} - ${_year_zero}" | bc)" - _year_cicles="$(echo "scale=0; ${_year_diff} / 22" | bc)" - _year_cur_cicle="$(echo "${_year_diff} - (${_year_cicles} * 22)" | bc)" - #_zone="-z -3" ## Time zone - _lat="-20.351034" - _log="-40.284485" - #_coord="-zl ${_log} ${_lat}" - _sun="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | sed 's/[0-9]//g')" - _sun_pos="$(astrolog -n ${_zone} ${_coord} | head -4 | tail -1 | awk '{print $3}' | ghead -c 2 | sed 's/[A-Z]//')" - _moon="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | sed 's/[0-9]//g')" - _moon_pos="$(astrolog -n ${_zone} ${_coord} | head -5 | tail -1 | awk '{print $2}' | ghead -c 2 | sed 's/[A-Z]//')" - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - - case $_sun in - "Aqu") _sun_done="Aquarii";; - "Gem") _sun_done="Geminorum";; - "Sag") _sun_done="Sagittarii";; - "Tau") _sun_done="Tauri";; - "Ari") _sun_done="Arietis";; - "Pis") _sun_done="Piscis";; - "Cap") _sun_done="Capricorni";; - "Can") _sun_done="Cancri";; - "Sco") _sun_done="Scorpii";; - "Lib") _sun_done="Librae";; - "Leo") _sun_done="Leonis";; - "Vir") _sun_done="Virginis";; - esac - - case $_moon in - "Aqu") _moon_done="Aquarii";; - "Gem") _moon_done="Geminorum";; - "Sag") _moon_done="Sagittarii";; - "Tau") _moon_done="Tauri";; - "Ari") _moon_done="Arietis";; - "Pis") _moon_done="Piscis";; - "Cap") _moon_done="Capricorni";; - "Can") _moon_done="Cancri";; - "Sco") _moon_done="Scorpii";; - "Lib") _moon_done="Librae";; - "Leo") _moon_done="Leonis";; - "Vir") _moon_done="Virginis";; - esac - - case $_dayw in - "Sun") _dayw_done="Solis";; - "Mon") _dayw_done="Lunae";; - "Tue") _dayw_done="Martis";; - "Wed") _dayw_done="Mercurii";; - "Thu") _dayw_done="Jovis";; - "Fri") _dayw_done="Veneris";; - "Sat") _dayw_done="Saturnis";; - esac - - case $_net in - "em0") _date="Sol in ${_sun_pos}° ${_sun_done} : Luna in ${_moon_pos}° ${_moon_done} : Dies ${_dayw_done} : Anno Vviii e.l." ;; - "iwn0") _date="Sol in ${_sun_pos}° ${_sun_done} Luna in ${_moon_pos}° ${_moon_done} Dies ${_dayw_done} Anno Vviii e.l." ;; - esac - - # Main function - echo "$_date" - -# echo " -# ☉︎ in ${_sun_pos}° ${_sun_done} -# ☽︎ in ${_moon_pos}° ${_moon_done} -# Dies ${_dayw_done} -# Anno V:viii a.n. -#" -} - -## Show current group -_grp(){ - - _cur_grp="$(xprop -root _NET_CURRENT_DESKTOP | awk -F '=' '{print $2}' | sed 's/ //')" - - echo "[${_cur_grp}]" - -} - -## Show memory usage -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _mem_use="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}' | \ -# sed s/M// | \ -# sed s/G//)" -_mem_use="10" - _b=999 - - ### Build the output - if [ "$_mem_use" -ge "$_b" ]; then - echo "${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - else - echo "${_blue}Ram:%{F-} ${_green}0$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" - fi - -} - -## Define cpu clock rate -_cpu_clock(){ - - _CSPEED="$(sysctl -n hw.cpuspeed)" - - _CP="$(echo "scale=2; $_CSPEED / 1024" | bc)" - - echo "${_orange}CPU:%{F-} ${_green}${_CP}Ghz%{F-}" - -} - -## Get hardware temperatures -_temp(){ - - ### Some limits - y=60 - r=70 - - ### Get cpu temp - _cpu_temp="$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Get acpitz temp - _acpitz_temp="$(sysctl -n hw.sensors.acpitz0.temp0 | awk '{print $1}' | awk -F '.' '{print $1}')" - ### Correct bug temperature - _temp_c="$(echo "scale=0; $_cpu_temp - 15" | bc)" - _temp_a="$(echo "scale=0; $_acpitz_temp - 15" | bc)" - - ### Some color acording to temperature - if [ "$_temp_c" -ge "$r" ]; then - _tempc="${_red}${_cpu_temp}ºC%{F-}" - elif [ "$_temp_c" -ge "$y" ]; then - _tempc="%{F#FFF000}${_temp_c}ºC%{F-}" - else - _tempc="${_green}${_temp_c}ºC%{F-}" - fi - - if [ "$_temp_a" -ge "$r" ]; then - _tempa="${_red}${_temp_a}ºC%{F-}" - elif [ "$_temp_a" -ge "$y" ]; then - _tempa="%{F#FFF000}${_temp_a}ºC%{F-}" - else - _tempa="${_green}${_temp_a}ºC%{F-}" - fi - - ### Build output - echo "${_orange}CPU:%{F-} ${_tempc} ${_purple}ACPITZ:%{F-} ${_tempa}" -} - -_fan_speed(){ - - _fspeed="$(sysctl -n hw.sensors.acpithinkpad0.fan0 | awk '{print $1}')" - - _fp="$(echo "scale=2; $_fspeed / 1024" | bc)" - - echo -e "${_cyan}FAN:%{F-} ${_green}${_fp}kRPM%{F-}" - -} - -_smt_func(){ - - _smt="$(sysctl -n hw.smt)" - - echo "${_purple}SMT:%{F-} ${_green}${_smt}%{F-}" - -} - -_sec(){ - - _sec_lvl="$(sysctl -n kern.securelevel)" - - if [ $_sec_lvl = "1" ]; then - - _result="${_green}$_sec_lvl%{F-}" - - elif [ $_sec_lvl = "2" ]; then - - _result="${_orange}$_sec_lvl%{F-}" - - else - - _result="${_red}ERROR!%{F-}" - - fi - - echo "${_red}Sec_lvl=%{F-} $_result" - -} - -## PF Status -_pf(){ - - _pf_status="$(rcctl get pf | sed 's/pf=//')" - - case "$_pf_status" in - "YES") echo "${_cyan}PF: %{F-}${_green}ON%{F-}";; - "NO") echo "${_cyan}PF: %{F-}${_red}OFF%{F-}";; - esac - -} - -_rec(){ - - _audio="$(sysctl -n kern.audio.record)" - _video="$(sysctl -n kern.video.record)" - - if [ $_audio = 0 ]; then - _audio_color="${_green}$_audio%{F-}" - else - _audio_color="${_orange}$_audio%{F-}" - fi - - if [ $_video = 0 ]; then - _video_color="${_green}$_video%{F-}" - else - _video_color="${_orange}$_video%{F-}" - fi - - echo "${_blue}Video:%{F-} $_video_color | ${_pink}Audio:%{F-} $_audio_color" - -} - -_network(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _iplocal="$(ifconfig trunk0 | tail -1 | awk '{print $2}')" - _wifiname="$(ifconfig iwn0 | tail -1 | awk '{print $3}')" - _wifistr="$(ifconfig iwn0 | tail -1 | awk '{print $8}' | sed 's/dBm//')" - - - if [ "$_wifistr" -ge -45 ]; then - _wifistr_color="${_green}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -45 ] && [ "$_wifistr" -ge -60 ]; then - _wifistr_color="${_orange}${_wifistr}dbm%{F-}" - elif [ "$_wifistr" -lt -60 ]; then - _wifistr_color="${_red}${_wifistr}dbm%{F-}" - fi - - if [ "$_net" = "em0" ]; then - - echo "${_pink}${_net}:%{F-} ${_green}${_iplocal}%{F-}" - - elif [ "$_net" = "iwn0" ]; then - - echo "${_pink}${_wifiname}:%{F-} ${_green}${_iplocal}%{F-} ${_wifistr_color}" - else - echo "${_red}No network!%{F-}" - fi - -} - -_mail(){ - - _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" - - echo "${_cyan}Mail:%{F-}${_green}${_mail_count}%{F-}" - -} - -_sound(){ - - _vol="$(sndioctl -n output.level)" - _vol_done="$(echo "scale=0; $_vol * 100" | bc | awk -F'[.=]' '{print $1}')%" - - echo "${_orange}Sound:%{F-} ${_green}${_vol_done}" - -} - -_batt(){ - - _full="$(sysctl -n hw.sensors.acpibat0.watthour0 | awk '{print $1}')" - - _real="$(sysctl -n hw.sensors.acpibat0.watthour3 | awk '{print $1}')" - - _percent="$(echo "scale=2; ${_real} / ${_full} * 100" | bc | awk -F '.' '{print $1}')" - _state="$(sysctl -n hw.sensors.acpibat0.raw0 | awk '{print $3}' | sed s/\)\,//)" - - case $_state in - "discharging") _states="dis" ;; - "charging") _states="char" ;; - "idle") _states="idle" ;; - "full") _states="full" ;; - esac - - _y=50 - _r=30 - - if [ "$_percent" -ge "$_y" ]; then - _percent_color="${_green}${_percent}%" - elif [ "$_percent" -ge "$_r" ]; then - _percent_color="${_yellow}${_percent}%" - else - _percent_color="${_red}${_percent}%" - fi - - echo "${_purple}${_states}:%{F-} ${_percent_color}" - -} - -_clock(){ - - _net="$(ifconfig trunk0 | grep active | head -1 | awk '{print $1}')" - _day="$()" - - case $_net in - "em0") _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - "iwn0") _date=$(date "+%Y-%m-%d %H:%M") ;; - *) _date=$(date "+%a %Y-%m-%d e.v. %H:%M:%S") ;; - esac - - echo -n "$_date" - -} - -# -#$(_thelemic_date) \ -#$(_fan_speed) | \ -#$(_smt_func) | \ -#$(_sec) | \ -#$(_pf) | \ -#$(_rec) | \ -#(_temp) | \ - -while true; do - echo "%{l}%{+u}%{+o} \ -$(_os_type) \ -$(_grp) \ -%{c}| $(_mem) | \ -$(_network) | \ -$(_mail) | \ -$(_sound) %{F-}| \ -$(_batt) %{F-}|\ -%{r}$(_clock) " - sleep 1 -done diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~ deleted file mode 100755 index b1a6f50..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~ +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - - diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~.1 deleted file mode 100755 index 01b220f..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lck~.1 +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -xlock -mode matrix -fg yellow diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~ deleted file mode 100755 index 5703c2b..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~ +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -/home/b2r1s8/.local/bin/infos | lemonbar -g 1366x27 -F "#FFFF00" -u 1 -n "lemonbar" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.1 deleted file mode 100755 index b74a648..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.1 +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar -g 1366x27 -F "#FFFF00" -u 1 -n "lemonbar" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.10 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.10 deleted file mode 100755 index 021c971..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.10 +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -u 0 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=9" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.11 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.11 deleted file mode 100755 index 7cbd549..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.11 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=9" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.12 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.12 deleted file mode 100755 index 021c971..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.12 +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -u 0 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=9" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.13 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.13 deleted file mode 100755 index 7cbd549..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.13 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=9" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.14 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.14 deleted file mode 100755 index 6b19e6e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.14 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=7" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.15 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.15 deleted file mode 100755 index 04cb408..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.15 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x25 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=7" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.16 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.16 deleted file mode 100755 index dbc5def..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.16 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x23 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=7" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.17 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.17 deleted file mode 100755 index 286b83a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.17 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x23 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=5" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.18 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.18 deleted file mode 100755 index 1c1bbdc..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.18 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x23 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=6" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.19 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.19 deleted file mode 100755 index 234367e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.19 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x20 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=6" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.2 deleted file mode 100755 index f98827d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.2 +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar \ - -g 1366x27 \ - -F "#FFFF00" \ - -u 1 \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.3 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.3 deleted file mode 100755 index 2451973..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.3 +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -u 1 \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.4 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.4 deleted file mode 100755 index 2b6af47..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.4 +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.5 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.5 deleted file mode 100755 index 7545a0b..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.5 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.6 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.6 deleted file mode 100755 index 2bdcebe..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.6 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ -# -B "#000000" \ - -u 0 \ -# -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.7 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.7 deleted file mode 100755 index 7cbd549..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.7 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=9" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.8 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.8 deleted file mode 100755 index 7711c71..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.8 +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ -# -B "#000000" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=9" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.9 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.9 deleted file mode 100755 index db1d547..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!lemon.sh~.9 +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh - -pkill lemonbar -pkill infos.sh - -"${HOME}"/.local/bin/infos | lemonbar-xft \ - -g 1366x27 \ - -F "#FFFF00" \ - -u 1 \ - -U "#FFFF00" \ - -n "lemonbar" \ - -f "Hack Nerd Font Mono:size=9" & diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~ deleted file mode 100755 index 8f1448a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~ +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env sh - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out-"${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "$_out" - diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.1 deleted file mode 100755 index 3ac3a42..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.1 +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env sh - -_smt="$(sysctl -n hw.smt)" - -### Define number of threads -if [ "$_smt" = "0" ]; then - - _h="7" - -elif [ "$_smt" = "1" ]; then - - _h="11" - -fi - -### Get memory usage -#_memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out-"${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "$_out" -echo "$_memo" -echo "$_dig" -echo "$_mem_use" diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.2 deleted file mode 100755 index ddedcde..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!testy~.2 +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env sh - -_smt="$(sysctl -n hw.smt)" - -### Define number of threads -if [ "$_smt" = "0" ]; then - - _h="7" - -elif [ "$_smt" = "1" ]; then - - _h="11" - -fi - -### Get memory usage -#_memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") _out="Ram:$(echo "scale=2; $_mem_use / 1024" | bc)G/16G" ;; - "G") _out-"Ram:${_mem_use}G/16G" ;; - esac -echo "$_out" -echo "$_memo" -echo "$_dig" -echo "$_mem_use" diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~ deleted file mode 100755 index 9a56366..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~ +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env sh -_mem(){ - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out-"${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "$_out" -} diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~.1 deleted file mode 100755 index 8f1448a..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.local!bin!test~.1 +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env sh - - _smt="$(sysctl -n hw.smt)" - - ### Define number of threads - if [ "$_smt" = "0" ]; then - - _h="7" - - elif [ "$_smt" = "1" ]; then - - _h="11" - - fi - - ### Get memory usage -# _memo="$(top -d1 | \ -# head -n "${_h}" | \ -# tail -1 | \ -# awk '{print $3}' | \ -# awk -F / '{print $1}')" - - _memo="11G" - _dig="$(printf '%s' $_memo | sed s/[0-9]*//)" - _mem_use="$(printf '%s' $_memo | sed s/[A-Z]*//g)" - case _dig in - "M") _out="${_blue}Ram:%{F-} ${_green}$(echo "scale=2; $_mem_use / 1024" | bc)G/16G%{F-}" ;; - "G") _out-"${_blue}Ram:%{F-} ${_green}${_mem_use}G/16G%{F-}" ;; - esac -echo "$_out" - diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~ deleted file mode 100755 index 752bb45..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~ +++ /dev/null @@ -1,34 +0,0 @@ -export ENV=$HOME/.kshrc -export PAGER=most -export LANG=en_US.UTF-8 -export LC_NUMERIC=en_US.UTF-8 -export LC_MONETARY=en_US.UTF-8 -export QT_QPA_PLATFORMTHEME=qt5ct - -if [ -d /usr/local/share/fonts ]; then - for i in /usr/local/share/fonts/*; do - xset fp+ $i - done - xset fp rehash -fi - -xrandr --dpi 96 & -dunst & -picom -b & -mocp -S & -/home/b2r1s8/.local/bin/lemon.sh & -exec /home/b2r1s8/.fehbg & -xset dpms 0 0 0 & -xset s off -dpms & -xset s 0 0 & -xset s noblank & -xset s noexpose & -urxvtd --quiet --opendisplay --fork & -setxkbmap -model thinkpad60 -layout br & -ulimit -Sc 0 - -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 - -exec ck-launch-session cwm diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.1 deleted file mode 100755 index 67adec0..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.1 +++ /dev/null @@ -1,34 +0,0 @@ - export ENV=$HOME/.kshrc -export PAGER=most -export LANG=en_US.UTF-8 -export LC_NUMERIC=en_US.UTF-8 -export LC_MONETARY=en_US.UTF-8 -export QT_QPA_PLATFORMTHEME=qt5ct - -if [ -d /usr/local/share/fonts ]; then - for i in /usr/local/share/fonts/*; do - xset fp+ $i - done - xset fp rehash -fi - -xrandr --dpi 96 & -dunst & -picom -b & -mocp -S & -/home/b2r1s8/.local/bin/lemon.sh & -exec /home/b2r1s8/.fehbg & -xset dpms 0 0 0 & -xset s off -dpms & -xset s 0 0 & -xset s noblank & -xset s noexpose & -urxvtd --quiet --opendisplay --fork & -setxkbmap -model thinkpad60 -layout br & -ulimit -Sc 0 - -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 - -exec ck-launch-session cwm diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.2 deleted file mode 100755 index 752bb45..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!.xsession~.2 +++ /dev/null @@ -1,34 +0,0 @@ -export ENV=$HOME/.kshrc -export PAGER=most -export LANG=en_US.UTF-8 -export LC_NUMERIC=en_US.UTF-8 -export LC_MONETARY=en_US.UTF-8 -export QT_QPA_PLATFORMTHEME=qt5ct - -if [ -d /usr/local/share/fonts ]; then - for i in /usr/local/share/fonts/*; do - xset fp+ $i - done - xset fp rehash -fi - -xrandr --dpi 96 & -dunst & -picom -b & -mocp -S & -/home/b2r1s8/.local/bin/lemon.sh & -exec /home/b2r1s8/.fehbg & -xset dpms 0 0 0 & -xset s off -dpms & -xset s 0 0 & -xset s noblank & -xset s noexpose & -urxvtd --quiet --opendisplay --fork & -setxkbmap -model thinkpad60 -layout br & -ulimit -Sc 0 - -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 - -exec ck-launch-session cwm diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~ deleted file mode 100644 index 772be21..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~ +++ /dev/null @@ -1,69 +0,0 @@ -ImageMagick -astrolog -automake%1.15 -boost -chromium -cmake -consolekit2 -coreutils -deluge -doxygen -dunst -emacsno_x11%emacs -exa -feh -ffmpeg -firefox -gimp -git -gmake -graphviz -hexchat -homebank -hugoextended -jpeg -keepassxcbrowser -kristall -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -lynis -meld -moc -most -mpv -nano -ncdu -neofetch -pcmanfm -picom -pkglocatedb -portslist -qbittorrent -qt5ct -quirks -scrot -shotcut -speedtest-cli -sshfs-fuse -stow -supertux -sysclean -tdesktop -terminator -tor-browser -transset-df -typespeed -w3mimage -wget -wtf -xarchiver -xclip -xdg-user-dirs -xdotool -xpdf -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.1 deleted file mode 100644 index b1c3659..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.1 +++ /dev/null @@ -1,66 +0,0 @@ -ImageMagick -astrolog -automake%1.15 -boost -cmake -consolekit2 -coreutils -doxygen -dunst -emacsno_x11%emacs -exa -feh -ffmpeg -file-roller -firefox -gimp -git -gmake -graphviz -hexchat -homebank -jpeg -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -lynis -meld -moc -most -mousepad -mpv -nano -ncdu -neofetch -pcmanfm-qt -picom -pkglocatedb -portslist -qbittorrent -qt5ct -quirks -scrot -shotcut -speedtest-cli -sshfs-fuse -stow -supertux -sysclean -tdesktop -terminator -tor-browser -transset-df -typespeed -w3mimage -wget -wtf -xarchiver -xclip -xdg-user-dirs -xdotool -xpdf -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.2 deleted file mode 100644 index 632911d..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.2 +++ /dev/null @@ -1,65 +0,0 @@ -ImageMagick -astrolog -automake%1.15 -boost -cmake -consolekit2 -coreutils -doxygen -dunst -emacsno_x11%emacs -exa -feh -ffmpeg -file-roller -firefox -gimp -git -gmake -graphviz -hexchat -homebank -jpeg -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -lynis -meld -moc -most -mousepad -mpv -nano -ncdu -neofetch -pcmanfm-qt -picom -pkglocatedb -portslist -qbittorrent -qt5ct -quirks -scrot -shotcut -speedtest-cli -stow -supertux -sysclean -tdesktop -terminator -tor-browser -transset-df -typespeed -w3mimage -wget -wtf -xarchiver -xclip -xdg-user-dirs -xdotool -xpdf -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.3 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.3 deleted file mode 100644 index b9319fd..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.3 +++ /dev/null @@ -1,64 +0,0 @@ -ImageMagick -astrolog -automake%1.15 -boost -cmake -consolekit2 -coreutils -doxygen -dunst -emacsno_x11%emacs -exa -feh -ffmpeg -file-roller -firefox -gimp -git -gmake -graphviz -hexchat -homebank -jpeg -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -lynis -meld -moc -most -mousepad -mpv -nano -ncdu -neofetch -pcmanfm-qt -picom -pkglocatedb -portslist -qbittorrent -qt5ct -quirks -scrot -shotcut -speedtest-cli -stow -supertux -sysclean -tdesktop -terminator -tor-browser -transset-df -typespeed -w3mimage -wget -wtf -xclip -xdg-user-dirs -xdotool -xpdf -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.4 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.4 deleted file mode 100644 index 9ea5c29..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list.txt~.4 +++ /dev/null @@ -1,64 +0,0 @@ -ImageMagick -astrolog -automake -boost -cmake -consolekit2 -coreutils -doxygen -dunst -emacs -exa -feh -ffmpeg -file-roller -firefox -gimp -git -gmake -graphviz -hexchat -homebank -jpeg -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -lynis -meld -moc -most -mousepad -mpv -nano -ncdu -neofetch -pcmanfm-qt -picom -pkglocatedb -portslist -qbittorrent -qt5ct -quirks -scrot -shotcut -speedtest-cli -stow -supertux -sysclean -tdesktop -terminator -tor-browser -transset-df -typespeed -w3mimage -wget -wtf -xclip -xdg-user-dirs -xdotool -xpdf -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~ deleted file mode 100644 index 638bec9..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~ +++ /dev/null @@ -1,62 +0,0 @@ -ImageMagick -automake--%1.16 -boost -cmake -consolekit2 -coreutils -doxygen -dunst -emacs--gtk3%emacs -exa -feh -ffmpeg -file-roller -firefox -gimp--%stable -git -gmake -graphviz -hexchat -homebank -jpeg -keepassxc -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -meld -moc -most -mousepad -mpv -nano -ncdu -neofetch -pcmanfm-qt -picom -pkglocatedb -portslist -qt5ct -quirks -rxvt-unicode--everything -scrot -shotcut -speedtest-cli -supertux -sysclean -tdesktop -terminator -tor-browser -typespeed -unzip -wget -wtf -xclip -xdg-user-dirs -xdotool -xpdf -xz -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.1 deleted file mode 100644 index 87d58ad..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.1 +++ /dev/null @@ -1,65 +0,0 @@ -ImageMagick -astrolog -automake--%1.16 -boost -cmake -consolekit2 -coreutils -doxygen -dunst -emacs--gtk3%emacs -exa -feh -ffmpeg -file-roller -firefox -gimp--%stable -git -gmake -graphviz -hexchat -homebank -jpeg -keepassxc -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -lynis -meld -moc -most -mousepad -mpv -nano -ncdu -neofetch -pcmanfm-qt -picom -pkglocatedb -portslist -qt5ct -quirks -rxvt-unicode--everything -scrot -shotcut -speedtest-cli -supertux -sysclean -tdesktop -terminator -tor-browser -typespeed -unzip -w3m--image -wget -wtf -xclip -xdg-user-dirs -xdotool -xpdf -xz -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.2 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.2 deleted file mode 100644 index b4eb735..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Desktop!pkg_list_new.txt~.2 +++ /dev/null @@ -1,65 +0,0 @@ -ImageMagick -astrolog -automake -boost -cmake -consolekit2 -coreutils -doxygen -dunst -emacs -exa -feh -ffmpeg -file-roller -firefox -gimp--%stable -git -gmake -graphviz -hexchat -homebank -jpeg -keepassxc -lemonbar -lfm -libiconv -libreoffice -lsw -lxappearance -lynis -meld -moc -most -mousepad -mpv -nano -ncdu -neofetch -pcmanfm-qt -picom -pkglocatedb -portslist -qt5ct -quirks -rxvt-unicode--everything -scrot -shotcut -speedtest-cli -supertux -sysclean -tdesktop -terminator -tor-browser -typespeed -unzip -w3m--image -wget -wtf -xclip -xdg-user-dirs -xdotool -xpdf -xz -youtube-dl -zeromq diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git-repos!obsd-bkp!etc!X11!xenodm!Xsetup_0~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git-repos!obsd-bkp!etc!X11!xenodm!Xsetup_0~ deleted file mode 100755 index 4e4cf16..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git-repos!obsd-bkp!etc!X11!xenodm!Xsetup_0~ +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# $OpenBSD: Xsetup_0.in,v 1.1 2021/08/30 15:38:27 matthieu Exp $ - -prefix="/usr/X11R6" -exec_prefix="${prefix}" - -${exec_prefix}/bin/xsetroot -fg \#6f6f6f -bg \#bfbfbf -bitmap ${prefix}/include/X11/bitmaps/root_weave - -#${exec_prefix}/bin/xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail - -# install package openbsd-backgrounds -# then uncomment: -# -# if test -x /usr/local/bin/openbsd-wallpaper -# then -# /usr/local/bin/openbsd-wallpaper -# fi - -#sxpm /usr/local/share/wallpapers/openbased-little-xdm.xpm & -/usr/local/bin/feh --bg-center /usr/local/share/wallpapers/openbased-little-xdm.jpg -#${exec_prefix}/bin/xsetroot -bitmap /usr/local/share/wallpapers/openbased-little-xdm.bmp diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~ deleted file mode 100644 index 67e017e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~ +++ /dev/null @@ -1,143 +0,0 @@ -! $OpenBSD: Xresources.in,v 1.3 2020/06/28 15:38:34 matthieu Exp $ -! -! -! -! -! - - - - -xlogin*login.translations: #override \ - F1: set-session-argument(failsafe) finish-field()\n\ - Left: move-backward-character()\n\ - Right: move-forward-character()\n\ - Home: move-to-begining()\n\ - End: move-to-end()\n\ - CtrlKP_Enter: set-session-argument(failsafe) finish-field()\n\ - KP_Enter: set-session-argument() finish-field()\n\ - CtrlReturn: set-session-argument(failsafe) finish-field()\n\ - Return: set-session-argument() finish-field() - -xlogin*greeting: 93, 93/93 A.:.A.:. -xlogin*failColor: red -xlogin*namePrompt: \040\040\040\040\040\040\040Mote: -xlogin*fail: Not that one\! - -#if WIDTH > 800 -xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1 -xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 -xlogin*promptFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 -xlogin*failFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 -xlogin*greetFace: DejaVu Sans Condensed-22:bold:italic:dpi=75 -xlogin*face: DejaVu Sans Condensed-16:dpi=75 -xlogin*promptFace: DejaVu Sans Condensed-16:bold:dpi=75 -xlogin*failFace: DejaVu Sans Condensed-16:bold:dpi=75 -#else -xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1 -xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 -xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1 -xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1 -xlogin*greetFace: DejaVu Sans Condensed-18:bold:italic:dpi=75 -xlogin*face: DejaVu Sans Condensed-12:dpi=75 -xlogin*promptFace: DejaVu Sans Condensed-12:bold:dpi=75 -xlogin*failFace: DejaVu Sans Condensed-12:bold:dpi=75 -#endif - -#if !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15)) -# if PLANES < 4 -# ifndef bpp1 -# define bpp1 -# endif -# else -# if PLANES > 4 -# if PLANES > 8 -# ifndef bpp15 -# define bpp15 -# endif -# else -# ifndef bpp8 -# define bpp8 -# endif bpp8 -# endif -# else -# ifndef bpp4 -# define bpp4 -# endif -# endif -# endif -#endif /* If manual override */ - -#ifndef bpp1 -xlogin*borderWidth: 1 -xlogin*frameWidth: 2 -xlogin*innerFramesWidth: 0 - -xlogin.Login.sepWidth: 0 - -! top/left border -xlogin*hiColor: #FFFF00 - -! bottom/right border -xlogin*shdColor: #FFFF00 - -! 'Welcome to..' text color -xlogin*greetColor: yellow -#if defined(bpp4) || defined(bpp8) || defined(bpp15) -! flood fill -xlogin*background: #000000 -xlogin*inpColor: #000000 -#endif -xlogin*failColor: #ff0000 - -! 'Login:' and 'Password:' -*Foreground: #FFFF00 -xlogin.Login.foreground: #FFFF00 -xlogin.Login.echoPasswd: false - -! border/shadow -*Background: #FF9E00 -#else -xlogin*borderWidth: 3 -xlogin*frameWidth: 5 -xlogin*innerFramesWidth: 1 -xlogin*shdColor: green -xlogin*hiColor: green -xlogin*background: black -xlogin*promptColor: yellow -*Foreground:green -*Background: black -#endif -!#ifdef bpp1 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_1bpp.xpm -!#endif -!#ifdef bpp4 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_4bpp.xpm -!#endif -!#ifdef bpp8 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_8bpp.xpm -!#endif -!#ifdef bpp15 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_15bpp.xpm -!#endif - -xlogin*useShape: true -xlogin*logoPadding: 5 - -! xlogin -xlogin.Login.x: 440 -xlogin.Login.y: 398 -xlogin.Login.width: 450 -xlogin.Login.height: 250 - -! uncomment to disable logins -xlogin.Login.allowRootLogin: false - -XConsole*background: black -XConsole*foreground: yellow -XConsole*borderWidth: 2 -XConsole*borderColor: yellow -XConsole.text.geometry: 480x130 -XConsole.verbose: true -XConsole*iconic: true -XConsole*font: fixed diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~.1 b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~.1 deleted file mode 100644 index 67e017e..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!Downloads!git_repos!obsd-bkp!etc!X11!xenodm!Xresources~.1 +++ /dev/null @@ -1,143 +0,0 @@ -! $OpenBSD: Xresources.in,v 1.3 2020/06/28 15:38:34 matthieu Exp $ -! -! -! -! -! - - - - -xlogin*login.translations: #override \ - F1: set-session-argument(failsafe) finish-field()\n\ - Left: move-backward-character()\n\ - Right: move-forward-character()\n\ - Home: move-to-begining()\n\ - End: move-to-end()\n\ - CtrlKP_Enter: set-session-argument(failsafe) finish-field()\n\ - KP_Enter: set-session-argument() finish-field()\n\ - CtrlReturn: set-session-argument(failsafe) finish-field()\n\ - Return: set-session-argument() finish-field() - -xlogin*greeting: 93, 93/93 A.:.A.:. -xlogin*failColor: red -xlogin*namePrompt: \040\040\040\040\040\040\040Mote: -xlogin*fail: Not that one\! - -#if WIDTH > 800 -xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1 -xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 -xlogin*promptFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 -xlogin*failFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 -xlogin*greetFace: DejaVu Sans Condensed-22:bold:italic:dpi=75 -xlogin*face: DejaVu Sans Condensed-16:dpi=75 -xlogin*promptFace: DejaVu Sans Condensed-16:bold:dpi=75 -xlogin*failFace: DejaVu Sans Condensed-16:bold:dpi=75 -#else -xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1 -xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 -xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1 -xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1 -xlogin*greetFace: DejaVu Sans Condensed-18:bold:italic:dpi=75 -xlogin*face: DejaVu Sans Condensed-12:dpi=75 -xlogin*promptFace: DejaVu Sans Condensed-12:bold:dpi=75 -xlogin*failFace: DejaVu Sans Condensed-12:bold:dpi=75 -#endif - -#if !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15)) -# if PLANES < 4 -# ifndef bpp1 -# define bpp1 -# endif -# else -# if PLANES > 4 -# if PLANES > 8 -# ifndef bpp15 -# define bpp15 -# endif -# else -# ifndef bpp8 -# define bpp8 -# endif bpp8 -# endif -# else -# ifndef bpp4 -# define bpp4 -# endif -# endif -# endif -#endif /* If manual override */ - -#ifndef bpp1 -xlogin*borderWidth: 1 -xlogin*frameWidth: 2 -xlogin*innerFramesWidth: 0 - -xlogin.Login.sepWidth: 0 - -! top/left border -xlogin*hiColor: #FFFF00 - -! bottom/right border -xlogin*shdColor: #FFFF00 - -! 'Welcome to..' text color -xlogin*greetColor: yellow -#if defined(bpp4) || defined(bpp8) || defined(bpp15) -! flood fill -xlogin*background: #000000 -xlogin*inpColor: #000000 -#endif -xlogin*failColor: #ff0000 - -! 'Login:' and 'Password:' -*Foreground: #FFFF00 -xlogin.Login.foreground: #FFFF00 -xlogin.Login.echoPasswd: false - -! border/shadow -*Background: #FF9E00 -#else -xlogin*borderWidth: 3 -xlogin*frameWidth: 5 -xlogin*innerFramesWidth: 1 -xlogin*shdColor: green -xlogin*hiColor: green -xlogin*background: black -xlogin*promptColor: yellow -*Foreground:green -*Background: black -#endif -!#ifdef bpp1 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_1bpp.xpm -!#endif -!#ifdef bpp4 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_4bpp.xpm -!#endif -!#ifdef bpp8 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_8bpp.xpm -!#endif -!#ifdef bpp15 -!xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_15bpp.xpm -!#endif - -xlogin*useShape: true -xlogin*logoPadding: 5 - -! xlogin -xlogin.Login.x: 440 -xlogin.Login.y: 398 -xlogin.Login.width: 450 -xlogin.Login.height: 250 - -! uncomment to disable logins -xlogin.Login.allowRootLogin: false - -XConsole*background: black -XConsole*foreground: yellow -XConsole*borderWidth: 2 -XConsole*borderColor: yellow -XConsole.text.geometry: 480x130 -XConsole.verbose: true -XConsole*iconic: true -XConsole*font: fixed diff --git a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!bkp!LICENSE~ b/dotfiles/dotfolder/.config/nano/backup/!home!puffy!bkp!LICENSE~ deleted file mode 100644 index e8f3956..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!home!puffy!bkp!LICENSE~ +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2022 Bob Slacker - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~ b/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~ deleted file mode 100644 index 8b13789..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~ +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.1 b/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.1 deleted file mode 100644 index 8b13789..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.1 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.2 b/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.2 deleted file mode 100644 index 8b13789..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.2 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.3 b/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.3 deleted file mode 100644 index 8b13789..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg.2fa~.3 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg~ b/dotfiles/dotfolder/.config/nano/backup/!tmp!msg~ deleted file mode 100644 index b130e7f..0000000 --- a/dotfiles/dotfolder/.config/nano/backup/!tmp!msg~ +++ /dev/null @@ -1,8 +0,0 @@ -Good afternoon ManoLSD. - -So, nothing arrived yet. I extended the Auto-FE deadline again. The first date it was on 2023-06-03, -I extended to 2023-06-08. And now to 2023-06-13. -What should I do if it doesn't arrive next week? - -Best regards -secapunch diff --git a/dotfiles/dotfolder/.config/nano/nanorc b/dotfiles/dotfolder/.config/nano/nanorc index fc11c0e..dff7c86 100644 --- a/dotfiles/dotfolder/.config/nano/nanorc +++ b/dotfiles/dotfolder/.config/nano/nanorc @@ -1,7 +1,7 @@ set atblanks set autoindent set backup -set backupdir /home/puffy/.config/nano/backup +set backupdir /home/b2r1s8/.config/nano/backup set boldtext set constantshow set emptyline diff --git a/dotfiles/dotfolder/.config/neofetch/config.conf b/dotfiles/dotfolder/.config/neofetch/config.conf deleted file mode 100644 index cdba4c6..0000000 --- a/dotfiles/dotfolder/.config/neofetch/config.conf +++ /dev/null @@ -1,864 +0,0 @@ -# See this wiki page for more info: -# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info -print_info() { - info title - info underline - - info "OS" distro - info "Host" model - info "Kernel" kernel - info "Uptime" uptime - info "Packages" packages - info "Shell" shell - info "Resolution" resolution - info "DE" de - info "WM" wm - info "WM Theme" wm_theme - info "Theme" theme - info "Icons" icons - info "Terminal" term - info "Terminal Font" term_font - info "CPU" cpu - info "GPU" gpu - info "Memory" memory - - # info "GPU Driver" gpu_driver # Linux/macOS only - # info "CPU Usage" cpu_usage - # info "Disk" disk - # info "Battery" battery - # info "Font" font - # info "Song" song - # [[ "$player" ]] && prin "Music Player" "$player" - # info "Local IP" local_ip - # info "Public IP" public_ip - # info "Users" users - # info "Locale" locale # This only works on glibc systems. - - info cols -} - -# Title - - -# Hide/Show Fully qualified domain name. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --title_fqdn -title_fqdn="off" - - -# Kernel - - -# Shorten the output of the kernel function. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --kernel_shorthand -# Supports: Everything except *BSDs (except PacBSD and PC-BSD) -# -# Example: -# on: '4.8.9-1-ARCH' -# off: 'Linux 4.8.9-1-ARCH' -kernel_shorthand="on" - - -# Distro - - -# Shorten the output of the distro function -# -# Default: 'off' -# Values: 'on', 'tiny', 'off' -# Flag: --distro_shorthand -# Supports: Everything except Windows and Haiku -distro_shorthand="off" - -# Show/Hide OS Architecture. -# Show 'x86_64', 'x86' and etc in 'Distro:' output. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --os_arch -# -# Example: -# on: 'Arch Linux x86_64' -# off: 'Arch Linux' -os_arch="on" - - -# Uptime - - -# Shorten the output of the uptime function -# -# Default: 'on' -# Values: 'on', 'tiny', 'off' -# Flag: --uptime_shorthand -# -# Example: -# on: '2 days, 10 hours, 3 mins' -# tiny: '2d 10h 3m' -# off: '2 days, 10 hours, 3 minutes' -uptime_shorthand="on" - - -# Memory - - -# Show memory pecentage in output. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --memory_percent -# -# Example: -# on: '1801MiB / 7881MiB (22%)' -# off: '1801MiB / 7881MiB' -memory_percent="off" - -# Change memory output unit. -# -# Default: 'mib' -# Values: 'kib', 'mib', 'gib' -# Flag: --memory_unit -# -# Example: -# kib '1020928KiB / 7117824KiB' -# mib '1042MiB / 6951MiB' -# gib: ' 0.98GiB / 6.79GiB' -memory_unit="mib" - - -# Packages - - -# Show/Hide Package Manager names. -# -# Default: 'tiny' -# Values: 'on', 'tiny' 'off' -# Flag: --package_managers -# -# Example: -# on: '998 (pacman), 8 (flatpak), 4 (snap)' -# tiny: '908 (pacman, flatpak, snap)' -# off: '908' -package_managers="on" - - -# Shell - - -# Show the path to $SHELL -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --shell_path -# -# Example: -# on: '/bin/bash' -# off: 'bash' -shell_path="off" - -# Show $SHELL version -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --shell_version -# -# Example: -# on: 'bash 4.4.5' -# off: 'bash' -shell_version="on" - - -# CPU - - -# CPU speed type -# -# Default: 'bios_limit' -# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. -# Flag: --speed_type -# Supports: Linux with 'cpufreq' -# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. -speed_type="bios_limit" - -# CPU speed shorthand -# -# Default: 'off' -# Values: 'on', 'off'. -# Flag: --speed_shorthand -# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz -# -# Example: -# on: 'i7-6500U (4) @ 3.1GHz' -# off: 'i7-6500U (4) @ 3.100GHz' -speed_shorthand="off" - -# Enable/Disable CPU brand in output. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --cpu_brand -# -# Example: -# on: 'Intel i7-6500U' -# off: 'i7-6500U (4)' -cpu_brand="on" - -# CPU Speed -# Hide/Show CPU speed. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --cpu_speed -# -# Example: -# on: 'Intel i7-6500U (4) @ 3.1GHz' -# off: 'Intel i7-6500U (4)' -cpu_speed="on" - -# CPU Cores -# Display CPU cores in output -# -# Default: 'logical' -# Values: 'logical', 'physical', 'off' -# Flag: --cpu_cores -# Support: 'physical' doesn't work on BSD. -# -# Example: -# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores) -# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores) -# off: 'Intel i7-6500U @ 3.1GHz' -cpu_cores="logical" - -# CPU Temperature -# Hide/Show CPU temperature. -# Note the temperature is added to the regular CPU function. -# -# Default: 'off' -# Values: 'C', 'F', 'off' -# Flag: --cpu_temp -# Supports: Linux, BSD -# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable -# coretemp kernel module. This only supports newer Intel processors. -# -# Example: -# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' -# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]' -# off: 'Intel i7-6500U (4) @ 3.1GHz' -cpu_temp="off" - - -# GPU - - -# Enable/Disable GPU Brand -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gpu_brand -# -# Example: -# on: 'AMD HD 7950' -# off: 'HD 7950' -gpu_brand="on" - -# Which GPU to display -# -# Default: 'all' -# Values: 'all', 'dedicated', 'integrated' -# Flag: --gpu_type -# Supports: Linux -# -# Example: -# all: -# GPU1: AMD HD 7950 -# GPU2: Intel Integrated Graphics -# -# dedicated: -# GPU1: AMD HD 7950 -# -# integrated: -# GPU1: Intel Integrated Graphics -gpu_type="all" - - -# Resolution - - -# Display refresh rate next to each monitor -# Default: 'off' -# Values: 'on', 'off' -# Flag: --refresh_rate -# Supports: Doesn't work on Windows. -# -# Example: -# on: '1920x1080 @ 60Hz' -# off: '1920x1080' -refresh_rate="off" - - -# Gtk Theme / Icons / Font - - -# Shorten output of GTK Theme / Icons / Font -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --gtk_shorthand -# -# Example: -# on: 'Numix, Adwaita' -# off: 'Numix [GTK2], Adwaita [GTK3]' -gtk_shorthand="off" - - -# Enable/Disable gtk2 Theme / Icons / Font -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gtk2 -# -# Example: -# on: 'Numix [GTK2], Adwaita [GTK3]' -# off: 'Adwaita [GTK3]' -gtk2="on" - -# Enable/Disable gtk3 Theme / Icons / Font -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gtk3 -# -# Example: -# on: 'Numix [GTK2], Adwaita [GTK3]' -# off: 'Numix [GTK2]' -gtk3="on" - - -# IP Address - - -# Website to ping for the public IP -# -# Default: 'http://ident.me' -# Values: 'url' -# Flag: --ip_host -public_ip_host="http://ident.me" - -# Public IP timeout. -# -# Default: '2' -# Values: 'int' -# Flag: --ip_timeout -public_ip_timeout=2 - - -# Desktop Environment - - -# Show Desktop Environment version -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --de_version -de_version="on" - - -# Disk - - -# Which disks to display. -# The values can be any /dev/sdXX, mount point or directory. -# NOTE: By default we only show the disk info for '/'. -# -# Default: '/' -# Values: '/', '/dev/sdXX', '/path/to/drive'. -# Flag: --disk_show -# -# Example: -# disk_show=('/' '/dev/sdb1'): -# 'Disk (/): 74G / 118G (66%)' -# 'Disk (/mnt/Videos): 823G / 893G (93%)' -# -# disk_show=('/'): -# 'Disk (/): 74G / 118G (66%)' -# -disk_show=('/') - -# Disk subtitle. -# What to append to the Disk subtitle. -# -# Default: 'mount' -# Values: 'mount', 'name', 'dir', 'none' -# Flag: --disk_subtitle -# -# Example: -# name: 'Disk (/dev/sda1): 74G / 118G (66%)' -# 'Disk (/dev/sdb2): 74G / 118G (66%)' -# -# mount: 'Disk (/): 74G / 118G (66%)' -# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' -# 'Disk (/mnt/Videos): 74G / 118G (66%)' -# -# dir: 'Disk (/): 74G / 118G (66%)' -# 'Disk (Local Disk): 74G / 118G (66%)' -# 'Disk (Videos): 74G / 118G (66%)' -# -# none: 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' -disk_subtitle="mount" - -# Disk percent. -# Show/Hide disk percent. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --disk_percent -# -# Example: -# on: 'Disk (/): 74G / 118G (66%)' -# off: 'Disk (/): 74G / 118G' -disk_percent="on" - - -# Song - - -# Manually specify a music player. -# -# Default: 'auto' -# Values: 'auto', 'player-name' -# Flag: --music_player -# -# Available values for 'player-name': -# -# amarok -# audacious -# banshee -# bluemindo -# clementine -# cmus -# deadbeef -# deepin-music -# dragon -# elisa -# exaile -# gnome-music -# gmusicbrowser -# gogglesmm -# guayadeque -# io.elementary.music -# iTunes -# juk -# lollypop -# mocp -# mopidy -# mpd -# muine -# netease-cloud-music -# olivia -# playerctl -# pogo -# pragha -# qmmp -# quodlibet -# rhythmbox -# sayonara -# smplayer -# spotify -# strawberry -# tauonmb -# tomahawk -# vlc -# xmms2d -# xnoise -# yarock -music_player="auto" - -# Format to display song information. -# -# Default: '%artist% - %album% - %title%' -# Values: '%artist%', '%album%', '%title%' -# Flag: --song_format -# -# Example: -# default: 'Song: Jet - Get Born - Sgt Major' -song_format="%artist% - %album% - %title%" - -# Print the Artist, Album and Title on separate lines -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --song_shorthand -# -# Example: -# on: 'Artist: The Fratellis' -# 'Album: Costello Music' -# 'Song: Chelsea Dagger' -# -# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' -song_shorthand="off" - -# 'mpc' arguments (specify a host, password etc). -# -# Default: '' -# Example: mpc_args=(-h HOST -P PASSWORD) -mpc_args=() - - -# Text Colors - - -# Text Colors -# -# Default: 'distro' -# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' -# Flag: --colors -# -# Each number represents a different part of the text in -# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info' -# -# Example: -# colors=(distro) - Text is colored based on Distro colors. -# colors=(4 6 1 8 8 6) - Text is colored in the order above. -colors=(distro) - - -# Text Options - - -# Toggle bold text -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --bold -bold="on" - -# Enable/Disable Underline -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --underline -underline_enabled="on" - -# Underline character -# -# Default: '-' -# Values: 'string' -# Flag: --underline_char -underline_char="-" - - -# Info Separator -# Replace the default separator with the specified string. -# -# Default: ':' -# Flag: --separator -# -# Example: -# separator="->": 'Shell-> bash' -# separator=" =": 'WM = dwm' -separator=":" - - -# Color Blocks - - -# Color block range -# The range of colors to print. -# -# Default: '0', '15' -# Values: 'num' -# Flag: --block_range -# -# Example: -# -# Display colors 0-7 in the blocks. (8 colors) -# neofetch --block_range 0 7 -# -# Display colors 0-15 in the blocks. (16 colors) -# neofetch --block_range 0 15 -block_range=(0 15) - -# Toggle color blocks -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --color_blocks -color_blocks="on" - -# Color block width in spaces -# -# Default: '3' -# Values: 'num' -# Flag: --block_width -block_width=3 - -# Color block height in lines -# -# Default: '1' -# Values: 'num' -# Flag: --block_height -block_height=1 - -# Color Alignment -# -# Default: 'auto' -# Values: 'auto', 'num' -# Flag: --col_offset -# -# Number specifies how far from the left side of the terminal (in spaces) to -# begin printing the columns, in case you want to e.g. center them under your -# text. -# Example: -# col_offset="auto" - Default behavior of neofetch -# col_offset=7 - Leave 7 spaces then print the colors -col_offset="auto" - -# Progress Bars - - -# Bar characters -# -# Default: '-', '=' -# Values: 'string', 'string' -# Flag: --bar_char -# -# Example: -# neofetch --bar_char 'elapsed' 'total' -# neofetch --bar_char '-' '=' -bar_char_elapsed="-" -bar_char_total="=" - -# Toggle Bar border -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --bar_border -bar_border="on" - -# Progress bar length in spaces -# Number of chars long to make the progress bars. -# -# Default: '15' -# Values: 'num' -# Flag: --bar_length -bar_length=15 - -# Progress bar colors -# When set to distro, uses your distro's logo colors. -# -# Default: 'distro', 'distro' -# Values: 'distro', 'num' -# Flag: --bar_colors -# -# Example: -# neofetch --bar_colors 3 4 -# neofetch --bar_colors distro 5 -bar_color_elapsed="distro" -bar_color_total="distro" - - -# Info display -# Display a bar with the info. -# -# Default: 'off' -# Values: 'bar', 'infobar', 'barinfo', 'off' -# Flags: --cpu_display -# --memory_display -# --battery_display -# --disk_display -# -# Example: -# bar: '[---=======]' -# infobar: 'info [---=======]' -# barinfo: '[---=======] info' -# off: 'info' -cpu_display="off" -memory_display="off" -battery_display="off" -disk_display="off" - - -# Backend Settings - - -# Image backend. -# -# Default: 'ascii' -# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', -# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' -# Flag: --backend -image_backend="ascii" - -# Image Source -# -# Which image or ascii file to display. -# -# Default: 'auto' -# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' -# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' -# Flag: --source -# -# NOTE: 'auto' will pick the best image source for whatever image backend is used. -# In ascii mode, distro ascii art will be used and in an image mode, your -# wallpaper will be used. -image_source="auto" - - -# Ascii Options - - -# Ascii distro -# Which distro's ascii art to display. -# -# Default: 'auto' -# Values: 'auto', 'distro_name' -# Flag: --ascii_distro -# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS", -# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs, -# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, -# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD, -# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, -# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, -# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin, -# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary, -# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, -# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, -# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, -# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, -# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite, -# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, -# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib, -# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner, -# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba, -# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD, -# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint, -# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, -# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, -# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, -# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, -# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, -# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, -# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, -# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin, -# and IRIX have ascii logos -# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants. -# Use '{distro name}_old' to use the old logos. -# NOTE: Ubuntu has flavor variants. -# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, -# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. -# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, -# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, -# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, -# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, -# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, -# postmarketOS, and Void have a smaller logo variant. -# Use '{distro name}_small' to use the small variants. -ascii_distro="auto" - -# Ascii Colors -# -# Default: 'distro' -# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' -# Flag: --ascii_colors -# -# Example: -# ascii_colors=(distro) - Ascii is colored based on Distro colors. -# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. -ascii_colors=(distro) - -# Bold ascii logo -# Whether or not to bold the ascii logo. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --ascii_bold -ascii_bold="on" - - -# Image Options - - -# Image loop -# Setting this to on will make neofetch redraw the image constantly until -# Ctrl+C is pressed. This fixes display issues in some terminal emulators. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --loop -image_loop="off" - -# Thumbnail directory -# -# Default: '~/.cache/thumbnails/neofetch' -# Values: 'dir' -thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" - -# Crop mode -# -# Default: 'normal' -# Values: 'normal', 'fit', 'fill' -# Flag: --crop_mode -# -# See this wiki page to learn about the fit and fill options. -# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F -crop_mode="normal" - -# Crop offset -# Note: Only affects 'normal' crop mode. -# -# Default: 'center' -# Values: 'northwest', 'north', 'northeast', 'west', 'center' -# 'east', 'southwest', 'south', 'southeast' -# Flag: --crop_offset -crop_offset="center" - -# Image size -# The image is half the terminal width by default. -# -# Default: 'auto' -# Values: 'auto', '00px', '00%', 'none' -# Flags: --image_size -# --size -image_size="auto" - -# Gap between image and text -# -# Default: '3' -# Values: 'num', '-num' -# Flag: --gap -gap=3 - -# Image offsets -# Only works with the w3m backend. -# -# Default: '0' -# Values: 'px' -# Flags: --xoffset -# --yoffset -yoffset=0 -xoffset=0 - -# Image background color -# Only works with the w3m backend. -# -# Default: '' -# Values: 'color', 'blue' -# Flag: --bg_color -background_color= - - -# Misc Options - -# Stdout mode -# Turn off all colors and disables image backend (ASCII/Image). -# Useful for piping into another command. -# Default: 'off' -# Values: 'on', 'off' -stdout="off" diff --git a/dotfiles/dotfolder/.config/qt5ct/colors/darker_yellow.conf b/dotfiles/dotfolder/.config/qt5ct/colors/darker_yellow.conf deleted file mode 100644 index cf2f69f..0000000 --- a/dotfiles/dotfolder/.config/qt5ct/colors/darker_yellow.conf +++ /dev/null @@ -1,4 +0,0 @@ -[ColorScheme] -active_colors=#ffffffff, #ff424245, #ff979797, #ff5e5c5b, #ff302f2e, #ff4a4947, #ffffffff, #ffffffff, #ffffffff, #ff3d3d3d, #ff222020, #ffe7e4e0, #ff12608a, #fff9f9f9, #ff0986d3, #ffa70b06, #ff5c5b5a, #ffffffff, #ff3f3f36, #ffffffff, #80ffffff -disabled_colors=#ff808080, #ff424245, #ff979797, #ff5e5c5b, #ff302f2e, #ff4a4947, #ff808080, #ffffffff, #ff808080, #ff3d3d3d, #ff222020, #ffe7e4e0, #ff12608a, #ff808080, #ff0986d3, #ffa70b06, #ff5c5b5a, #ffffffff, #ff3f3f36, #ffffffff, #80ffffff -inactive_colors=#ffffffff, #ff424245, #ff979797, #ff5e5c5b, #ff302f2e, #ff4a4947, #ffffffff, #ffffffff, #ffffffff, #ff3d3d3d, #ff222020, #ffe7e4e0, #ff12608a, #fff9f9f9, #ff0986d3, #ffa70b06, #ff5c5b5a, #ffffffff, #ff3f3f36, #ffffffff, #80ffffff diff --git a/dotfiles/dotfolder/.config/qt5ct/qt5ct.conf b/dotfiles/dotfolder/.config/qt5ct/qt5ct.conf deleted file mode 100644 index a586a81..0000000 --- a/dotfiles/dotfolder/.config/qt5ct/qt5ct.conf +++ /dev/null @@ -1,32 +0,0 @@ -[Appearance] -color_scheme_path=/home/puffy/.config/qt5ct/colors/darker_yellow.conf -custom_palette=true -icon_theme=hercules -standard_dialogs=default -style=Fusion - -[Fonts] -fixed=@Variant(\0\0\0@\0\0\0&\0H\0\x61\0\x63\0k\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t\0 \0M\0o\0n\0o@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) -general=@Variant(\0\0\0@\0\0\0\x1c\0H\0\x61\0\x63\0k\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) - -[Interface] -activate_item_on_single_click=1 -buttonbox_layout=0 -cursor_flash_time=1000 -dialog_buttons_have_icons=1 -double_click_interval=400 -gui_effects=@Invalid() -keyboard_scheme=2 -menus_have_icons=true -show_shortcuts_in_context_menus=true -stylesheets=@Invalid() -toolbutton_style=4 -underline_shortcut=1 -wheel_scroll_lines=3 - -[SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1u\0\0\0T\0\0\x4U\0\0\x2\xb8\0\0\x1v\0\0\0U\0\0\x4T\0\0\x2\xb7\0\0\0\0\0\0\0\0\x5V\0\0\x1v\0\0\0U\0\0\x4T\0\0\x2\xb7) - -[Troubleshooting] -force_raster_widgets=1 -ignored_applications=@Invalid() diff --git a/dotfiles/dotfolder/.config/tmux/tmux.conf b/dotfiles/dotfolder/.config/tmux/tmux.conf deleted file mode 100644 index ee67ea2..0000000 --- a/dotfiles/dotfolder/.config/tmux/tmux.conf +++ /dev/null @@ -1,26 +0,0 @@ -# Colors -# Enable color support inside of tmux. -set -g default-terminal "xterm-256color" -set -ga terminal-overrides ",*256col*:Tc" -set-option -g status-style bg=black -set-option -g status-style fg=yellow -set -g window-status-current-style fg=black,bg=yellow -set -g pane-active-border-style fg=yellow -set -g pane-border-style fg=yellow -set -g mode-style bg=yellow,fg=black -set -g clock-mode-colour red - -# Settigs -set-option -g status-position top -set -g mouse on -# Add a bit more scroll history in the buffer. -set -g history-limit 50000 -# Ensure window titles get renamed automatically. -setw -g automatic-rename -# Ensure window index numbers get reordered on delete. -set-option -g renumber-windows on -# Start windows and panes index at 1, not 0. -set -g base-index 1 -setw -g pane-base-index 1 -# Reload the tmux config. -bind-key r source-file ~/.config/tmux/tmux.conf diff --git a/dotfiles/dotfolder/.config/xfe/xferc b/dotfiles/dotfolder/.config/xfe/xferc index 1f92f2a..8f66ebf 100644 --- a/dotfiles/dotfolder/.config/xfe/xferc +++ b/dotfiles/dotfolder/.config/xfe/xferc @@ -1,41 +1,41 @@ [OPTIONS] -height=746 -locationbar=1 +height=541 toolstoolbar=1 folder_warn=1 panel_view=3 -width=1364 -confirm_drag_and_drop=1 +width=840 use_startup_notification=1 +use_trash_can=1 preserve_date_warn=1 confirm_delete=1 no_script=0 -ypos=1 -root_warn=0 +ypos=0 +su_cmd="su root -c \'nohup xfe >/dev/null 2>&1 & sleep 1\'" auto_save_layout=1 use_trash_bypass=1 sudo_cmd="doas su root -c \'nohup xfe >/dev/null 2>&1 & sleep 1\'" root_mode=1 -su_cmd="su root -c \'nohup xfe >/dev/null 2>&1 & sleep 1\'" +treetwopanels_lpanel_pct=0.398 +xfv_replaced=1 confirm_overwrite=1 paneltoolbar=1 confirm_delete_emptydir=1 startdir_mode=0 ask_before_copy=1 -confirm_execute=1 +status=1 confirm_properties=1 twopanels_lpanel_pct=0.5 vert_panels=1 -use_trash_can=1 +root_warn=0 confirm_trash=1 -treetwopanels_lpanel_pct=0.4 +confirm_execute=1 use_sudo=1 treepanel_tree_pct=0.2 -treetwopanels_tree_pct=0.2 +treetwopanels_tree_pct=0.201 generaltoolbar=1 -xpos=1 -status=1 -xfv_replaced=1 +xpos=0 +locationbar=1 +confirm_drag_and_drop=1 [SETTINGS] listforecolor=Yellow @@ -49,7 +49,7 @@ font=Hack Nerd Font [SRC],100,normal,regular listbackcolor=Gray24 scrollbarsize=15 shadowcolor=#171616 -file_tooltips=1 +show_pathlinker=1 tippause=500 scrollbarcolor=Yellow forecolor=Yellow @@ -66,7 +66,7 @@ tiptime=10000 relative_resize=1 pbarcolor=Yellow save_win_pos=1 -show_pathlinker=1 +file_tooltips=1 [KEYBINDINGS] search_prev=Shift-Ctrl-G @@ -143,46 +143,46 @@ empty_trash_can=Ctrl-Del rotate_left=Ctrl-L [RIGHT PANEL] -type_size=100 +type_size=62 deldate_size=150 origpath_size=200 liststyle=0 -attr_size=100 -user_size=50 -hiddenfiles=0 +attr_size=62 +size_size=37 +user_size=31 dirs_first=1 -ext_size=100 -grou_size=50 -modd_size=150 +ext_size=62 +grou_size=31 +modd_size=92 ignore_case=1 sort_func=ascendingCase showthumbnails=0 -name_size=200 +name_size=123 lastdir=/home/puffy -size_size=60 +hiddenfiles=0 [DIR PANEL] hidden_dir=0 sort_func=ascendingCase [LEFT PANEL] -type_size=171 +type_size=105 deldate_size=150 origpath_size=200 liststyle=0 -attr_size=171 -user_size=85 -hiddenfiles=1 +attr_size=105 +size_size=63 +user_size=52 dirs_first=1 -ext_size=171 -grou_size=85 -modd_size=256 +ext_size=105 +grou_size=52 +modd_size=158 ignore_case=1 sort_func=ascendingCase showthumbnails=0 -name_size=341 +name_size=210 lastdir=/home/puffy -size_size=102 +hiddenfiles=1 [FILETYPES] sdw=lowriter,lowriter,lowriter;Starwriter 5.0 Document;sxw_32x32.png;sxw_16x16.png;; diff --git a/dotfiles/dotfolder/.local/bin/autostart.sh b/dotfiles/dotfolder/.local/bin/autostart.sh index cf4b85d..4c137b6 100755 --- a/dotfiles/dotfolder/.local/bin/autostart.sh +++ b/dotfiles/dotfolder/.local/bin/autostart.sh @@ -4,7 +4,7 @@ xidle -timeout 600 & tint2 & picom -b & -/home/b2r1s8/.fehbg & +"${HOME}"/.fehbg & xset dpms 0 0 0 & xset s off -dpms & xset s 0 0 & diff --git a/dotfiles/dotfolder/.local/bin/bkp-dot b/dotfiles/dotfolder/.local/bin/bkp-dot index 0ddc1d5..02da765 100755 --- a/dotfiles/dotfolder/.local/bin/bkp-dot +++ b/dotfiles/dotfolder/.local/bin/bkp-dot @@ -1,7 +1,7 @@ #!/usr/bin/env sh conf_loc="/etc" -bkp_loc="/home/b2r1s8/bkp" +bkp_loc=""${HOME}"/bkp" bkp_sys(){ @@ -14,8 +14,9 @@ bkp_sys(){ cp -vr "${conf_loc}"/mk.conf "${bkp_loc}"/etc/. cp -vrf "${conf_loc}"/apm "${bkp_loc}"/etc/. cp -vrf "${conf_loc}"/X11 "${bkp_loc}"/etc/. + cp -vrf "${conf_loc}"/rc.local "${bkp_loc}"/etc/. cp -vrf /usr/local/share/wallpapers/* "${bkp_loc}"/usr/local/share/wallpapers/. - + groups puffy > "${bkp_loc}"/etc/groups } bkp_home() { diff --git a/dotfiles/dotfolder/.local/bin/faq b/dotfiles/dotfolder/.local/bin/faq new file mode 100755 index 0000000..72e45e2 --- /dev/null +++ b/dotfiles/dotfolder/.local/bin/faq @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +"${term}" -e "w3m ~/Templates/projects/tech/unixlike/openbsd/projects/www/faq/index.html" diff --git a/dotfiles/dotfolder/.local/bin/infos-term b/dotfiles/dotfolder/.local/bin/infos-term index 7f8e0a5..e779772 100755 --- a/dotfiles/dotfolder/.local/bin/infos-term +++ b/dotfiles/dotfolder/.local/bin/infos-term @@ -300,7 +300,7 @@ _network(){ _mail(){ - _mail_count="$(grep '^To:' /var/mail/b2r1s8 | wc -l | sed 's/ //g')" + _mail_count="$(grep '^To:' /var/mail/puffy | wc -l | sed 's/ //g')" case $_mail_count in "0") echo ":${_mail_count}";; diff --git a/dotfiles/dotfolder/.local/bin/mpm b/dotfiles/dotfolder/.local/bin/mpm index 46eb3cb..6b726b1 100755 --- a/dotfiles/dotfolder/.local/bin/mpm +++ b/dotfiles/dotfolder/.local/bin/mpm @@ -1,6 +1,6 @@ #!/usr/bin/env sh -terminator -e "mocp --theme puffy_theme" +lxterminal -e "mocp --theme puffy_theme" #urxvtc -e mocp --theme black_theme #urxvtc -e mocp --theme transparent-background #terminator -e "mocp --theme holly_theme" diff --git a/dotfiles/dotfolder/.local/bin/printscreen b/dotfiles/dotfolder/.local/bin/printscreen index 6cc87e7..2a2db7e 100755 --- a/dotfiles/dotfolder/.local/bin/printscreen +++ b/dotfiles/dotfolder/.local/bin/printscreen @@ -1,5 +1,5 @@ #!/usr/bin/env sh -sav="$HOME/Pictures/sys_images/screenshots/obsd" +sav="$HOME/Pictures/sys_images/screenshots/BaSeD" scrot -b -p -d 3 -s -f -q 100 -e 'xclip -selection clipboard -t image/png -i $f' "$sav"/ss_%Y-%m-%d_%H.%M.%S.png diff --git a/dotfiles/dotfolder/.local/bin/tilde-connect b/dotfiles/dotfolder/.local/bin/tilde-connect new file mode 100755 index 0000000..7d38abc --- /dev/null +++ b/dotfiles/dotfolder/.local/bin/tilde-connect @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +ssh brs418@tilde.team diff --git a/dotfiles/dotfolder/.local/bin/upcvs b/dotfiles/dotfolder/.local/bin/upcvs index 0aa2f57..eef09c9 100755 --- a/dotfiles/dotfolder/.local/bin/upcvs +++ b/dotfiles/dotfolder/.local/bin/upcvs @@ -4,7 +4,7 @@ upsrc(){ echo "Changing to the src directory." cd /usr/src - cvs -q up -Pd -rOPENBSD_7_1 + cvs -q up -Pd -rOPENBSD_7_3 echo "Done!" } @@ -13,7 +13,7 @@ uports(){ echo "Changing to the ports directory." cd /usr/ports - cvs -q up -Pd -rOPENBSD_7_1 + cvs -q up -Pd -rOPENBSD_7_3 echo "Done!." } @@ -21,7 +21,7 @@ uports(){ upfaq(){ echo "Changing to the faq directory." - cd $HOME/Templates/unixlike/openbsd/projects + cd $HOME/Templates/projects/tech/unixlike/openbsd/projects cvs update -P www/faq echo "Done!." diff --git a/dotfiles/ksh/dot-kshrc b/dotfiles/ksh/dot-kshrc index 6dcbd7e..1ae4b22 100644 --- a/dotfiles/ksh/dot-kshrc +++ b/dotfiles/ksh/dot-kshrc @@ -27,8 +27,8 @@ export _little_puffy=' set -o emacs # Aliases -alias ls='exa --icons' -alias ll='ls -l' +alias ls='exa --icons -F -x' +alias ll='ls -lgh' alias la='ls -a' alias lla='ll -a' alias cp='cp -vi' @@ -54,7 +54,6 @@ alias poweroff='doas shutdown -p now' alias dsu='doas su -' alias cdt="cd ~/Documents/livros/ocultismo/Thelema/" alias cdo="cd ~/Documents/livros/tech/openbsd/" -alias faq='w3m ~/Templates/unixlike/openbsd/projects/www/faq/index.html' alias stilde='ssh b2r1s8@tilde.institute' alias hss='hugo server --noHTTPCache' alias gpu="gpg -u bobslacker@protonmail.com" @@ -65,5 +64,5 @@ PS1="\u\e[1;36m<@>\e[1;33m\h \e[1;34m\w \n\e[0;32m§\033[0m\] " export PS1 -echo "$_little_puffy" +#echo "$_little_puffy" #thelemic-date diff --git a/dotfiles/moc/dot-moc/cache/moc_version_tag b/dotfiles/moc/dot-moc/cache/moc_version_tag deleted file mode 100644 index dfb3384..0000000 --- a/dotfiles/moc/dot-moc/cache/moc_version_tag +++ /dev/null @@ -1 +0,0 @@ -1 4 6 rUnversioned directory \ No newline at end of file diff --git a/dotfiles/moc/dot-moc/cache/tags.db b/dotfiles/moc/dot-moc/cache/tags.db deleted file mode 100644 index 3561630385d16a2d2dc6ec01c65cb8b58588430f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 81920 zcmeHw4{#LcmFIv32oV2_jD?X+BMBiu)0&Y+|3C-?BM`CvS&}iaaauhyElr1+=}FIw zENQ7T-f$_hVRyX=w@Y299CoM*$=MgS&beY!+^#BeQe2ANqApx5@v;e7lU+8;RBsBB>eeZkU``-J$_Z$v~V*&or<8v=^ETwPu;2-_C16XymVhk*TLQKOYzf#Buq9wiz?Oh50b2sL z1Z)Y|60jv;OTd_C16XymVhk*TLQKO zYzf#Buq9wiz?MKZ3D8~r^!xfxIO4k(K5>8dh28Ppx3{0(KD@nV`~7WG+fHrsZo9tq zkK?fM607t6}au0MU`>C&gquIpNN^{Eq2 z-7lRg4U|@uUR`@~Ew}d8ljBd;K6!o3sWnAw-d`PBU9`|{i+A5_ztDcXy}P}n{l>0~yN>PZ-c`2ie%n;rnYKWitL@>= zt2@u^yy!XR3GVdlEZ%v2$Hg7Tb`0&{cHD2BYJIcyNUNvS(R#h*TuY$E)#7Nm+I+S- z*u1B?r1?(MdrhaB4mVXb-D|wkc)Bsz=xHo&yzU9OU2cc_s_U#P=xT8lxo*^*uZz~T z)fLrUmm*PPjCDOAHA-jFL;Ld zPJRG?`tXlC(9wI~k-yO1?{NG^fADjMV?kX|2}^apdet3ksq0C^WIz5#RTb5*s8XFO zMgmH>u95dEVMUMb5iug`d*q{K~eCf=PMfyBEr2V;sBm@)zqLf9yA_PPsCaJ0@L=-{v zi{YpkmLhS5#OyepDd(-abkg*wmg^T)aZ-+p(5RWZFGfbQ>D5{t*nkulp}N!G5EV`u zkE>ERrAsec=1ovFFn$r!LW82K50r?}S36sgfM3Yu@sZOt8!yXrUOHkiCG1nhfcOOd zhfN1ZlSLjHctK2loQ=Tz=}eDBn(Fzu6bUMVqK+m)cnwITFZ53qL&8xx6p~aTb##v8 z_@pk!{g_807g0Dr=JJ>%s|r=X(d5}~nRa1>z>sby!RT`RWNb)^=02-5J7I$&uwi11 zSrNR9i2)feki0)AsS(9D5z?4=DO2WTwCL$e#8u@f?R!U$9E*uuuQaNPTt^}x$EV*N z6IbZJ^h#rLh#T~)(rZ$HW~3(LR*UqyTb%)dAjC8XMA_#v>8jST&9EB>Fw-YOas+l` zaOio?D}|L&=$R5pTJ!05O(=g_ht;KkpMV0|#W?$LWcpp0G}0iA2dj45-QvUoE0S4^ z0Tv`3R+x3vb!9x0AA`a)e!zvnkn!6dQ~Jww`VU}PqoosuZ~E&BM^=hsOYHPpvDF3> zomR)8$vJAkBMV5-wAEFN5gTu2@~}mxBaMgJSpxx{ywa!=661=RovBJ4SO<4VQUhWD zGgjpGs)=zChJp)-a5S*+_R_+;%HYlFoNzZfMFA_b4p#8#U}^D6t>@Zcoyg>KE_JU= zXR|ZGy^xSpg`55+cYyo|j9g?iA+0oc+h=v$JWlv+)S^{%PFl+=$<7d8nhJLH` zHSlr>V<cqu`$~3KI3zbsS^tWW*lHls)M&J!yUcbBVJprN!Du9KFns_VOk8 znN8?M>of}yMs0v6!hR={F2kiw(|t4VCA-cWzx7H{RUFf&G3kK{3(gFzW{37zrW>}D zfub2qTEGA?+0K_9ykM2KdOjw>$HU4GLyy-0El`--5kJ1s-T1g>Yv$S)*e8-Nt&le$ zM@DD~TyCg@W4Cqs;R7%@Lz+Vt2h@r4f zn29|$c4ITw{90}(m;eA3^Ds^7*#&HDYrV9_C^4=Vn_>9g_^t<=8K0U`6wB+V+X-(A zu0TwP7{IVuV!%jS=4&1vv?^y89~MKj60#keibW$#D>&pu ziIEWw`))WIi5Rw|a*VcQj84lo!sUz+7;XCwFj(Pa<~_~vK8yl_+S1@?vpVj4#`?>I z`032CE@aI$_6-Lk*f$vDxh>NMdy3ByL0`(Gr;Y{`PsV(o5hufHm(R>M>_T6R8<6A} z^DtA}9C9Hv0bAVzxLTZ;@(2fEqXn;$Kq0Dz9h0W2j^43+u@EwxjQNvJjLy54D zMbSDDwZg(r|L2uP5(vP=mLyqlSY4xC&CW3$v=C>YVI8mm)LeJ zpU-$0jxhpoG10HFGDtJAFEJ*=nl9Ga@mka=SCccG0tK^y*{Eos*oee3={Hm&&31qT zYkM+-_vtrA6WF(q|Hh0-XDlkIVUeasp8AA63qT1z0>uo9q=C})=?^mLf7CqbP)7ko z;a(Y-{%$NLi?8N0F2)MEPYO$MNu7WP#l?dX=M()$xd~AXB%`(tht)OG<#GCTaG3Z4 zzzGCSAaKNl5fDGu$#E;pVY)N=+B0eDA8>z!_GOX3J+ z(vtVQ-Jp}+!3~lNOfiSfamk;+rkL|4Fg9{3ICa1>AK24s9yL5BNe3qcG;o@d_%dmq zVW$m+H+Mb_mG0m=WB!CH2Pnueq=ZFop8}mUj68U=Y$M&ES<-+(%5lJgW&@V4(`n=W zV?8HgI_UUMZPYRDy}9J2r9R-~Ao{3Eu{tO*QX$#~bWBF1CMLw8e~B2<29H5U&YVRy zI#eZuu&9>G&}Tcy!gd2e80?c~%?Zo0kse1jnbB}3f@@MOVhr?E3`wB`A~J>2mQ&BO z$t#MSmJ)@$v;iwbZ$9-nvO$m$K0a*&!+I#yQ3wr)zh=+XWs`xDifAdqh#Y1~8Ek;G z)JsA1G5Nh z!AFKC7ZHW{*lXdjLTzw7Us|-FA`-x&9Dzizl;d0hrGq6z@r0NXp)3dj?LK1|5vao3 zqB1ffFbk>}EqEOBUSGq0TGWG4c@)+$78gbmm<{ym zpBzC@7P~{yAH=#&K^OWVpe9D?2Q5kj0g96dVSo|nUE@@dV0mO^$ zdbcWpt-z#aSbjg{^BI1E#aMN=NX|Ch4;xb8j&S&Uh~*Ty9z{jWwuajeT6wO!Z@|k9 zbsXsF=-q1Upg)tZj9Pg(h7=seUp;e)m>jS;Ngy-Ma_BC4`Z)uG=TH2cLEg66!xwbm zAT94~@S1ev=kDxEYEzfDkK%!kpGvA}87WB?5W2%58Thp9jEttMX?fAvycDtr&nqvQ z_nPj`ks!qkfxm5>=`#2!C~j&5;0BQ{zyS#{$cfx*k`yoklKb|Y$#ZVuM=3KGfoN=4kzNOnd=&NMP*x0BR6n8Sti*&}qB9fBWn(tGm-;T&iEE%SD zi1PLC(t(D%3o{WEnw$xU*4n;r%*1b$?bJYE-r4T}q^;`1RW zsoSzb@NCV6C!t1Fd6JD*A@J*Szz-)>a`u!6DG1WbhFzW)Tw?4fGQR=Z&ET+)|L9}L z4fL7BE>hz|;DrcbiX-E#VJd{Dh8%c;@@Nnf>nQdl5kV41Lz(kx&U6mh93PXNm@uYq zdYr{Fo|+syjViP;(KMkDnK^U7_hH|FjRdx|;%kM@&+WNzD1ixfz(-&B3gIIs4k?c9 zCGuXn0Vo8Axjjqiu}{L0zz8(i7oy_{hCSQ=qjz4WJ<$cL_AFdE>?_dEw5Pzn+P^UymAjv8_jHLPHF^zgzlCAuqiBraGcIdRQ@}x|w+UOkzNT zdJO1!76XC=K*t{+`e}Z2bmd3K-bcoKH2jm_{9p4b|BlH-h-PQMnxJ%DQvM59-hMGJ z`8VgscZZfwO5*#n=wbI#Ubm{_n@sT`;}x2y!^uq+G{gA)aQk&8zc+sUM+`pkWcE;w z$3&DwC6PY8}4w`d=NPk65978Oa9pn5@H^Y!Fh#1ZGK2DKaS{xu1+%{(Rl% zE#p~Bcq+5u!3M{l$~$~T*BdK5Y#`X#^afXL482+A)AZ2_+-ZPyRAr$#BE@2fh(VRIrh#eZm(;j4sX4>=Ebwg<|HU#-Y%ZJo z+d960BsuB03F5`NU-EFu`nY^V{A|uL<|9%BH{-NH2kpIQ>WAqgmwuJo4z0?&rL^<)0 zZB87bV3W+Q$kEsi|K^Hl752C2joIdLe|O)0eM~<-f6KCteu>~#XBpG}&H-;UvEU+(Me6ngsxhXy)Q^7^1%yN7B84;$xfYr*p` z_8c7QOzP*uuN|^H7T+Nrvgy$N?!JCqhj!d5{tUg{3e8OZ*~S>B=S0My0&?fU=+zXN$|=zG7^^~ zinCwE0SO9dru3=WX?^|tGs2n8R_s&!Fcq310zV&L-oeIs#lzgT^k)P+n@_hllo0kw zA#8z?@Y|Pthrxg0m$~7;P4KhX(T;9!pD=K6sHacU(-Fslko${lJiY;2wVmGFWEKK*4IC5<<51HQ|1yWwK;K7U(%as35%++F6r?Ku&QG`6GM{f7f}* z8F%h+-mjgi4b`^P-rqj8eSEuj`@?Ogw{>m1vGw@Y?yW^zqct_CJrLY-ulj5?SAAo1 z*XGjAm#W6AxT>3#@k&qS)r#X4H5Iou9o|&7X^PXCv|nrq*b=ZMU`xQ3fGq)A0=5Kf z3D^>_C16XymVhk*TLQKOYzf#Buq9wiz?Oh50b2sL1Z)Y|60jv;OTdHeC21k`2M6eKIcYQJW; zHb$v~Pqe0>eOFVr@g^^{q|)Q)H@yRqwyxTDHMRa(Gv)Aa<*w%Jx-%w2&HhUpZM$x! znS7G6vFm1Lh$krL9M$-Bl@dTn02Zl<>0XiIRae({X;N3iQ= z8htIZ%L%2X?7Eqz{Xl2S&90ki)WNgsX0kr7^V^@(uA8aXrMK&5lJ8*5J-cqE=0`d5 zuHR_a&9u~S@?W8D=70W2tJs=I z*Kq&;^6s|X586+)x3u5db#_CU|u5Ayup5GeXTC??j&FPxqnulAiY&o{2Ys>xW zsp@$3p6Umi-`^bF+_w3C)l}7ys+y`>mG4w`RhCv>syI>Ms(85Ry-mkA6>Yl4wX7~$ zePLC6RoSZBE6=VBuH;s}x1wvs<&r?j{pDWwYE&V(=sM{dVs!{E)t#sts^jV&@>lqC ze28!1i}>r#bIxPVE@zqZcI~Cw6Sc#jw5awPqjk^rlI^#*UEFqJTmQDwZMU{w+HJipQp6Vv)OmP+pbqu@N8@R=R@eQf*L&szho@C5%Yk|t3(EiG3*G5BQn`4vXhaGo zqQs2<>I1EN2fdt!Z=u$h^mK-}e)Qu*qxztnPp8!o#^P%2T1$D;V?SB4N)g}P8nfs z#b^MZkD#V&JeC?TtK;R-X+XWlQ?LB`03kBQ>k%{;b`HzP!f__h$thhfnB$P9wP%C2fZo0 zs}BeE=7rb1R`d+K&HPI;x`hV_ZQo!DSIu`m-H{hAbKh?Ut|q=;i3FS|I)`4CWJd`d z#_XP3+>;kB^EmJfT#fv`j)8t>x9mqnL#pK*5C)_G+F2oPH{t9_#Ntk$B#fv=nRwEj zTN@^J=S7EwarN*+=tdZl&@qw8nAn~Wx)dd?F88g6XWH|^+mdx{W%|^>6DFofdqvep zP4AO+_@dR{+m#nSb6<0YyzBV`N+>WAlB4KPsgLXMs{h`W7aoj(Nr|i(c-;Kp1j=}! zw}R|v+KSH{IsPGY$1Tr!^SX93@VNL+=YS}Ol6@_J=QFR5_YprIShX$Y_1g?QfSXdD&d@e!e^sfk)AYJCEU?o_SjyvJsbMfpUP zIB5i0?TsjEI1vJNzbdho00qfm!Xn;C!XJ`ERTu-8aY6CX=!hX-BJ3PVghEbKPCm-I zjE<6>VZMM*MHy}sMMnp)AWRK?kHW;%JXncH0%_8G>Tp_0Y(hz(Z5Q?GK%L^SR&u-` zS(*DpX>(WCnKax!(Kiu8w;Y;JkVHU;g%S{-I-0g8&s$e=_V>!5qgDV-ezXS3WXAA=|U}s1V1{q7pkXLWpY#%QHdR$S7RX&rECL`0e;3@K^G_3 zU)rmTphz|TgOw*2&{$p4%eEJ!!#R6e=wpRei?RSM5h8MkIjP*fNF88lTk%=eSD6~hJ5e28dPU?zLh+gE(&*(CkVPS>O;vjWQV0{f` ztwBm5xO4U;GjL;>3!zxAI;l6A_EVG2m=tpc1CKK&td4=P?xPK-?1#}Fp-r8TK!<6S z8FjxnVYGNHNDr;vQ<}B>L;OCNEkAWC645J^xd4TXgJ@9~XW@qvMDmEC4ZJMHgx6Fu z?GakkG}9WF#28F{kZnB+q3e~x=n_>0!UzaHTI8@3g@+}#3l|5Ac9?o#NopV_%PvxRU$cA`H&nU9E*0$Mr1c|ZUo zs%UD!`i&u-AdP62vyd^cYOm0w%hQa-9G!u&jQi1r8jZo2>QQ6HIIHYFUw3SC_Nms_ z7UXKE8#VR~)XbQo1L%Gd#oCUeiKDP2kX}Hd#ZS~a)2GEZjJ;+dcLR-!B!dZ&qh(a$ z5Wo*izr~>&*rcRVxSzJF4u@4Ar3E|t1p2lREbK6-|B?nuGj)!%eZ4{VW9{pE#K`o! z7*h@%N28(&OOv8`mqk5o=F>GpgF@uamrfk8P8aox!NNv50Wl&*giU575ukqHnm|qT zzzF8_%w3!-CDT@`v{U--i|5gb7YoW?3e-zG$Q(G#}vYLOu>#RnBGORV+xPlN?AE8V8;|P z_N;bHfo+MhpO5)%jwv9-m-`%yZdVW!@hg#_#2PclVj1UP<|F1o^jVGdH}W`1r3grn zig<}gepNeQMG>=OnemwQ`ffMvJQdDQ_4v6SDH_D7J0+XV*rB`CRz&9Q7;^a2uE4^ zTg$c|&(x!>nR+z8cYbr$%h2bmhi7L>aKsR2Is|DPNe>+7LYzC!(^qj4nW>Becwk1z zT!J5!!njxjnu85=@3@iZNAAn79~;jIXIrlk3nG?Kj6Y($oOrKDgEWTEDm5JpzS!Pe<*b+PaR*dqT zj0vk}$=prOQ3D=XK(cw->MF8BLvLpCu*GalW)1{+@=BKONLT8>I=DlU8o-GyoUY^c zs)=#Bp1=h}I2y7@J?rDrDuXwxbHd$-L>o>a>0kw%@MK^q@fs$u5dy0X)`?6$=Ti5K zi)ft*?u7&n<#5yAcqu?LX^*HIHt*+x34DEcwkxbbalCP%=2lVvvRFB%r(+y2F z7tHS=W!invEJPT!0iLAzJDGGDF73?uJM+{%Sj;|=jo*4DfO@RWu{t5y3G&TpEo}e?6(z4y*o*yPnosg_HwFjWjsM-hzmw`~S2F zBhQnb)eBB8ru+XVch{let=C#Ew8UHXw3M{mY`)NZqPf4BLuG)erc+J9CQnld>I1yfINsRR zSlW2kbIEhcbJ$bvxzli|;Y7nw1K04N{{8xM^`Uxi{p$Lg?hEeY?rt~dzU!KDopK#^ zRk`lhP1U_wcciYi?g4+5Kf?!j7yrQdzVl7z5oeY29=oG|xVEbH-uBDePi`M#^#m^A zhJF`r=wI7M46mqN@u0-DNC~BYEN}hHQnR)Y%bb-t?FD= zsH&~1xavmb@ydSO;=fyQsbZ?+RLM{YS8{v##pUD6z02t?|Jh~1Wi`w0FTK3<p<$Y@PQ@2Xr zDIG8MmO4tWu06eWcx}zv`%hke^4OE!Cs#i?wc*r;BO7WqJb32)XHGve{EX|FhwHDd zKeIl#-m|`F{k5`lWudaRvWHJ!UVL)#)u+!q9eCRH^!;^H>)xz5QsJp^R9xQ_e2m%w znwHsLZ3);CuqB{Lz~xwQJ${7U*^RY-V6C2rxnF18rER8r`Yt!SY&{sC2uVWMMA*0= z^X1?C}nnGo&4uTjHkrT-1y!jeD%3`aZZuH3kOL2qocfUB7wz-=$1TE!tTbaaAloiJw^IQK?8 zg9PgSf!sJ3l26)T0cR8c5^mO#HV(<*)SZ!E?5`UjT%rYBU!gZz8M{WlFQEz};uzvD zIKdr6bq>ZHc$*sNdx5}MwkIA7ym?S$1Q8Ko@HH7%?U?G**!{iO*Pj=z?6o1-JaaYh z9iL0!>M%~$Bb?POM-tlQY2drEaG2F0u*{nky{zZ=CPsz5D7pa~scol-w+lZQ>CKBb zD{^%6F9i{v>yd<)aI-z53|cy!_~qc#GTMM z;`#!D&Dul+E~DPm)c)MKzD9iQ$T}}HT+MtxZn{dim#kGYc@bHKG#xVPPgx$<>}!LD zvxz@|43~xl@kgWnl!1dT0npQ@6$sOQ$fy34c|5{cpEMd8c~-~DU>kL;1ig-xHnwRs zslKc0+9T*%qZ4Rald6QqJiE=%=<)FMd8}bV(5Pu;*m|Qrl_4KPAhTa77(-7EUqHjx zz`I>|+=AQ1{tz069Azmv9J0dlX&UfZM2F zWf^z&Ix`xdZl2WWP~Tx~SjjHtjmOHIb@N@gzaA9@qDQ5Iu755EE+aikg>jl#tvpR%=-O2dyQJZD=|!}Jeo2Yyg<~Mk z4}Q4*2ifEpjpBpjeg2q=f-w{!u|Ee&Ei+Dl9 z{tU+90O@n^$?~@t-rtYq=COhBf>x8e^)vA{k^h5>(_LcRuq#7XE-*Zn$1S^U*Z6DX zdr;yd=@(o}Xfm{nquBy49)6z^#vR4D=nG86E0OUjuleA=Aev z*z<$@aAdbrn%tBED{VbVX#vNP|qI#UnezhUztP+b&wRq%%;KQ8ts zNq6E>1K`+Mn)HDwlx33sLLf=m}7rI!l=uRFNg{&i6~oS zsNi3cFC!lE_f~6*Wv?U2;vr;5n~mCtu)lx)%Oe|XuF>T98*_HK8K8*P0oa1Oo>6H=FoO>K8y)t5%bB`l69!4y4?s25X!-!v6 z#*y8&r}QeVezg&|oO2v$^{b6I<(%U%>Q`e98u7_F$6?f`1`Z=8Ip;VUQfsXdi=1;D zY3sQWf1Gn1Y3sQWcbsz^hOaf^SP*i5k?sG!@$nzASHrjJ2qBuqeJT-PaQE?*6de{z9fsi&^l)KAFvqr$!@=s^0fO8IPCrd zR&^!K?i+F4xt`yiG`l}vHpHy|z+djoodfx2GG5tb_5XeUfuD8cmg7B=WA^g}OpbQ{ zff1G=d{qAdhXq-)^8wlOMV9*y_${1$c#Fn1doGsY%hrFuujF3i{u|+epOGa_&G2OF zKXBK=9{W3lCwsh=;W6t!VBF*R_$Rr0gngRg?&f&HA{rP8P4ajh^43VKs*2Ai>6vmS z0|U?IU*yKqOL(@L$}J5~LXE2OB#RP3#s>U1KFAF}O7P9k7^L8b6Ka66BN3{jjpN&C z{;q+m%tBwep8{2GTw)B>U6CWiy%JoeF+#YcI|i=Xf0vuDCB&DxzNPpg@Ir(z#c`rs z3l^v0`QLw&8_yRAk9m$Mg@@Ik49Q2Sps^r{qejn#G+aHmbL09yB)?obhx=tdCOa`P znwCp2WH)>#H=gH-r4=MVXA*fA6awS%!au;8$dUuPT$1tQid6 z2iotv{#Pt#ZH0EGulS6~+NIHsV#l}&;-srs63#q2$5Oo@e!lMWmhr5mF{sRj2RHwX z3z4AbE24+RKCJMtfnaaS0vp%&So9Ham-(#2od#G(RW`U%ES899w>Sy*U*EJmrZ)+; zxt-ADj`MY_Fg{(JN4FAV{d@OYKeDX%EPrl3hcz51jEeXW?tsN`=vY@E@X>tcpDgq7 zW8%X+PpabxIniY$q~K-|u5x3V`6X!5q_&{rv%t4e{1?kSvAJySGwApNlH^1`j3`c+ z(rg3#hf~(a4dRJJd#cnr+NSq!0>Sz*a=j zs0I}ub^7^l|A6IQ*I2N19}+RyY|+cO2)a*>AXA;RMZ^0lhv{Qh=2|)NkZn#J!pT1L zcVNIFpW)wJ5v{`h7QHdsJnrxA+po*y*$vV?(A46+PKO7I&Dn*I|sady&XLV zHIa}`e)s$Rmg)Xef^U9)M1$X}#N)DXFe2=w>x@Zz@nzk{ty=cS%+?VYvxnBOoHhReturn: set-session-argument(failsafe) finish-field()\n\ Return: set-session-argument() finish-field() -xlogin*greeting: CLIENTHOST +xlogin*greeting: Wellcome Bob Slacker! xlogin*namePrompt: \040\040\040\040\040\040\040Login: xlogin*fail: Not that one\! diff --git a/etc/X11/xorg.conf.d/20-intel.conf b/etc/X11/xorg.conf.d/20-intel.conf index a893bb5..14e7bcb 100644 --- a/etc/X11/xorg.conf.d/20-intel.conf +++ b/etc/X11/xorg.conf.d/20-intel.conf @@ -1,5 +1,6 @@ Section "Device" - Identifier "Intel Graphics" - Driver "intel" - Option "TearFree" "true" -EndSection \ No newline at end of file + Identifier "Card0" + Driver "modesetting" + BusID "PCI:0:2:0" + Option "AccelMethod" "glamor" +EndSection diff --git a/etc/groups b/etc/groups new file mode 100644 index 0000000..ed5519c --- /dev/null +++ b/etc/groups @@ -0,0 +1 @@ +puffy wheel operator wsrc games staff network diff --git a/etc/rc.local b/etc/rc.local index 8c8df91..94c71af 100644 --- a/etc/rc.local +++ b/etc/rc.local @@ -5,7 +5,7 @@ sleep 1 done fsck 6815ce0cfce7fa20.i mount -o rw,softdep,nodev,nosuid,noatime 6815ce0cfce7fa20.i /home/puffy -chown -R puffy:puffy /home/puffy +chown puffy:puffy /home/puffy sleep 1 echo "Open backup disk:" for attept in 1 2 3 4; do diff --git a/etc/sysctl.conf b/etc/sysctl.conf index 73593cc..c864ca9 100644 --- a/etc/sysctl.conf +++ b/etc/sysctl.conf @@ -16,3 +16,6 @@ kern.maxfiles=65535 kern.bufcachepercent=90 kern.maxvnodes=262144 kern.somaxconn=2048 + +# Xenocara stuff +machdep.allowaperture=1 diff --git a/pkg_list.txt b/pkg_list.txt index 7758a52..524847b 100644 --- a/pkg_list.txt +++ b/pkg_list.txt @@ -1,23 +1,38 @@ ImageMagick +adwaita-icon-theme astrolog -automake--%1.16 +automake%1.16 boost cmake colortree consolekit2 coreutils +djvulibre doxygen dunst -emacs--gtk3%emacs +emacsgtk3%emacs exa feh ffmpeg file-roller firefox -gimp--%stable +gcr +gimp%stable git +gitwrapper gmake +gnome-icon-theme +gnome-icon-theme-symbolic graphviz +gstreamer1 +gstreamer1-plugins-bad +gstreamer1-plugins-base +gstreamer1-plugins-good +gstreamer1mm +gtk+2 +gtk+3 +gtk4-update-icon-cache +gtksourceview4 hexchat homebank i2pd @@ -25,8 +40,12 @@ jpeg jq keepassxc lemonbar-xft +lf lfm +libglade2 +libhandy libiconv +libportal-gtk3 libreoffice lsw lxappearance @@ -34,6 +53,8 @@ lxterminal lynis meld micro +mlt7 +mlt7-gpl2 moc most mpv @@ -44,9 +65,28 @@ picom pkglocatedb portslist pstree +pulseaudio +py-gtk2 qt5ct +qt6-qt5compat +qt6-qtbase +qt6-qtdeclarative +qt6-qtimageformats +qt6-qtlanguageserver +qt6-qtshadertools +qt6-qtsvg +qtbase +qtdeclarative +qtgraphicaleffects +qtmultimedia +qtquickcontrols +qtquickcontrols2 +qtsvg +qtwebsockets +qtx11extras quirks -rxvt-unicode--everything +rofi +rxvt-unicodeeverything scrot shotcut speedtest-cli @@ -56,7 +96,9 @@ tdesktop tor-browser typespeed unzip -w3m--image +vte3 +w3mimage +webkitgtk41 wget wtf xclip @@ -65,5 +107,6 @@ xdotool xfe xpdf xz +yelp youtube-dl zeromq