From 2db42127d05bd1016c9852f261e1e7a93974f19b Mon Sep 17 00:00:00 2001 From: Linux User Date: Sat, 13 Aug 2022 18:10:53 +0000 Subject: [PATCH] update --- .bashrc | 4 +++- .config/picom/picom.conf | 16 +++++++--------- .local/bin/dwmbar | 23 +++++++++++++++++++++++ .local/scripts/9994_ram | 5 +++++ .local/scripts/9995_cpu | 5 +++++ .local/scripts/9996_wifi | 6 ++++++ .local/scripts/9997_disk | 6 ++++++ .local/scripts/9998_lang | 5 +++++ .local/scripts/9999_date | 6 ++++++ .xinitrc | 2 +- .xprofile | 5 ++++- 11 files changed, 71 insertions(+), 12 deletions(-) create mode 100755 .local/bin/dwmbar create mode 100755 .local/scripts/9994_ram create mode 100644 .local/scripts/9995_cpu create mode 100644 .local/scripts/9996_wifi create mode 100644 .local/scripts/9997_disk create mode 100644 .local/scripts/9998_lang create mode 100644 .local/scripts/9999_date mode change 100644 => 100755 .xinitrc mode change 100644 => 100755 .xprofile diff --git a/.bashrc b/.bashrc index d44a79d..7f7d94c 100644 --- a/.bashrc +++ b/.bashrc @@ -168,7 +168,7 @@ alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' alias p3='python3' - +alias apk='sudo apk' # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' @@ -194,3 +194,5 @@ if ! shopt -oq posix; then fi source ~/.git-prompt.sh + +PATH="$PATH:~/.local/bin" diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index 7337b1b..63196e5 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -34,21 +34,20 @@ rounded-corners-exclude = [ "window_type = 'desktop'" ]; - ################################# # Background-Blurring # ################################# -blur-method = "dual_kawase"; -blur-size = 12; -blur-strength = 8; +blur-method = "dual_kawase" +blur-size = 12 +blur-strength = 8 blur-kern = "3x3box"; blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'", - "class_g = 'firefoxdeveloperedition' && window_type = 'popup_menu'", - "class_g = 'firefoxdeveloperedition' && window_type = 'utility'", + "class_g = 'firefoxdeveloperedition' && window_type = 'popup_menu'", + "class_g = 'firefoxdeveloperedition' && window_type = 'utility'", "_GTK_FRAME_EXTENTS@:c" ]; @@ -59,16 +58,15 @@ blur-background-exclude = [ backend = "glx"; vsync = true; - mark-wmwin-focused = true; mark-ovredir-focused = false -#mark-ovredir-focused = true; detect-rounded-corners = true; detect-client-opacity = true; detect-transient = true; use-damage = true; + log-level = "warn"; - + wintypes: { tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; }; diff --git a/.local/bin/dwmbar b/.local/bin/dwmbar new file mode 100755 index 0000000..711d283 --- /dev/null +++ b/.local/bin/dwmbar @@ -0,0 +1,23 @@ +#!/bin/bash + +DELIM=" | " + +status() { + for FILE in $(ls ~/.local/scripts) + do + echo $DELIM + sh ~/.local/scripts/$FILE + done +} + +time=$(date +"%s") + +while true +do + if [ $(($time - $(date +"%s"))) -lt 0 ] + then + [ $(($time - $(date +"%s"))) -ge 0 ] && echo $(($time - $(date +"%s"))) + xprop -root -set WM_NAME "$(status | tr '\n' ' ')" + time=$(date +"%s") + fi +done diff --git a/.local/scripts/9994_ram b/.local/scripts/9994_ram new file mode 100755 index 0000000..a75f508 --- /dev/null +++ b/.local/scripts/9994_ram @@ -0,0 +1,5 @@ +#!/bin/bash + +mem="$(free -h | awk '/Mem:/ {print $3 "/" $2}')" + +echo " $mem" diff --git a/.local/scripts/9995_cpu b/.local/scripts/9995_cpu new file mode 100644 index 0000000..fd13a30 --- /dev/null +++ b/.local/scripts/9995_cpu @@ -0,0 +1,5 @@ +#!/bin/bash + +usage=$(cat <(grep 'cpu ' /proc/stat) <(sleep 0.3 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' | cut -d'.' -f1)"%" + +echo " $usage" diff --git a/.local/scripts/9996_wifi b/.local/scripts/9996_wifi new file mode 100644 index 0000000..aa6e49c --- /dev/null +++ b/.local/scripts/9996_wifi @@ -0,0 +1,6 @@ +#!/bin/bash + +power=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f8) +name=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f14) + +echo " $name $power" diff --git a/.local/scripts/9997_disk b/.local/scripts/9997_disk new file mode 100644 index 0000000..28b4393 --- /dev/null +++ b/.local/scripts/9997_disk @@ -0,0 +1,6 @@ +#!/bin/bash + +used=$(df -h / | sed -n '1!p' | cut -d' ' -f22) +total=$(df -h / | sed -n '1!p' | cut -d' ' -f16) + +echo " $used/$total" diff --git a/.local/scripts/9998_lang b/.local/scripts/9998_lang new file mode 100644 index 0000000..0ecc745 --- /dev/null +++ b/.local/scripts/9998_lang @@ -0,0 +1,5 @@ +#!/bin/bash + +lang=$(xkblayout-state print %s) + +echo " $lang" diff --git a/.local/scripts/9999_date b/.local/scripts/9999_date new file mode 100644 index 0000000..110e78c --- /dev/null +++ b/.local/scripts/9999_date @@ -0,0 +1,6 @@ +#!/bin/bash + +date=$(date +"%d.%m.%y") +time=$(date +"%H:%M:%S") + +echo " $date  $time" diff --git a/.xinitrc b/.xinitrc old mode 100644 new mode 100755 index a8addad..28ce063 --- a/.xinitrc +++ b/.xinitrc @@ -1,3 +1,3 @@ #!/bin/bash -[ -f ~/.xprofile ] && . ~/.xprofile +[ -f ~/.xprofile ] && sh ~/.xprofile diff --git a/.xprofile b/.xprofile old mode 100644 new mode 100755 index b87c43d..07769fc --- a/.xprofile +++ b/.xprofile @@ -1,8 +1,11 @@ +#!/bin/bash + export _JAVA_AWT_WM_NONREPARENTING=1 xscreensaver & -dwmbar & setxkbmap "us,ru" "" "grp:win_space_toggle" & +sh ~/wallpapers/cyber1.sh & + picom --experimental-backend & exec dwm