Browse Source

2021-07-25

master
RinRi 2 years ago
parent
commit
1af2ad0a73
31 changed files with 71 additions and 144 deletions
  1. +5
    -5
      .config/nvim/.netrwhist
  2. +17
    -1
      .config/nvim/init.vim
  3. +2
    -2
      .config/picom/picom.conf
  4. +2
    -0
      scripts/automount.sh
  5. +2
    -0
      scripts/autostart.sh
  6. +2
    -0
      scripts/calc
  7. +0
    -7
      scripts/color.sh
  8. +2
    -0
      scripts/cpsrc.sh
  9. +0
    -1
      scripts/daily.sh
  10. +0
    -1
      scripts/discord
  11. +1
    -0
      scripts/dublicatescreen.sh
  12. +0
    -4
      scripts/edu.sh
  13. +5
    -6
      scripts/foreach.sh
  14. +0
    -1
      scripts/funnymic.sh
  15. +2
    -0
      scripts/huion.sh
  16. +2
    -0
      scripts/kz.sh
  17. +2
    -0
      scripts/mixer.sh
  18. +0
    -1
      scripts/naruto.sh
  19. +3
    -0
      scripts/network.sh
  20. +0
    -1
      scripts/normalmic.sh
  21. +4
    -2
      scripts/poweroff.sh
  22. +12
    -0
      scripts/rename.sh
  23. +2
    -0
      scripts/rus.sh
  24. +2
    -0
      scripts/screenshot.sh
  25. +0
    -32
      scripts/status/battery.sh
  26. +0
    -1
      scripts/status/brightness.sh
  27. +0
    -29
      scripts/status/clock.sh
  28. +0
    -20
      scripts/status/internet.sh
  29. +0
    -29
      scripts/status/volume.sh
  30. BIN
      scripts/testlol
  31. +4
    -1
      scripts/xinit.sh

+ 5
- 5
.config/nvim/.netrwhist View File

@@ -1,12 +1,12 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =4
let g:netrw_dirhistcnt =8
let g:netrw_dirhist_8='/home/rinri/artix/home/rinri/.local/share/nvim/site/autoload'
let g:netrw_dirhist_7='/home/rinri/artix/home/rinri/.local/share/nvim/site'
let g:netrw_dirhist_6='/home/rinri/artix'
let g:netrw_dirhist_5='/home/rinri/.config/cmus'
let g:netrw_dirhist_4='/home/rinri/.config'
let g:netrw_dirhist_3='/home/rinri'
let g:netrw_dirhist_2='/home/rinri/.vim'
let g:netrw_dirhist_1='/home/rinri/.vim/swaps'
let g:netrw_dirhist_0='/home/rinri/.vim'
let g:netrw_dirhist_9='/home/rinri/.vim/plugged'
let g:netrw_dirhist_8='/home/rinri/.vim'
let g:netrw_dirhist_7='/etc/runit/runsvdir/default/lightdm/supervise'
let g:netrw_dirhist_6='/etc/runit/runsvdir/default/lightdm'
let g:netrw_dirhist_5='/etc/runit/runsvdir/default/alsa'

+ 17
- 1
.config/nvim/init.vim View File

@@ -14,6 +14,23 @@ call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf.vim'
call plug#end()

" for transparent background
function! AdaptColorscheme()
highlight clear CursorLine
highlight Normal ctermbg=none
highlight LineNr ctermbg=none
highlight Folded ctermbg=none
highlight NonText ctermbg=none
highlight SpecialKey ctermbg=none
highlight VertSplit ctermbg=none
highlight SignColumn ctermbg=none
endfunction

autocmd ColorScheme * call AdaptColorscheme()


set cursorline

" colorscheme
syntax on

@@ -42,7 +59,6 @@ set splitright
" Indent
set smartindent
set autoindent
set cursorline
" Use the OS clipboard by default (on versions compiled with `+clipboard`)
set clipboard+=unnamedplus
" Enhance command-line completion


+ 2
- 2
.config/picom/picom.conf View File

@@ -7,10 +7,10 @@ glx-no-rebind-pixmap = true;

opacity-rule = [
"90:class_g = 'URxvt'",
"50:class_g = 'Alacritty'",
"90:class_g = 'Alacritty'",
"70:class_g = 'st-256color'",
"90:class_g = 'tabbed'",
"80:class_g = 'Emacs'"
"95:class_g = 'Emacs'"
];

# Blur


+ 2
- 0
scripts/automount.sh View File

@@ -0,0 +1,2 @@
sudo mount /dev/disk/by-uuid/EA9A8F6E9A8F365B /mnt/win
sudo mount /dev/disk/by-uuid/7A54DAE754DAA563 /mnt/rec

+ 2
- 0
scripts/autostart.sh View File

@@ -1 +1,3 @@
#!/bin/sh

st -c cmus cmus

+ 2
- 0
scripts/calc View File

@@ -1 +1,3 @@
#!/bin/sh

qalculate-gtk

+ 0
- 7
scripts/color.sh View File

@@ -1,7 +0,0 @@
echo -en "\033[31m" ## red
eval $* | while read line; do
echo -en "\033[36m" ## blue
echo $line
echo -en "\033[31m" ## red
done
echo -en "\033[0m" ## reset color

+ 2
- 0
scripts/cpsrc.sh View File

@@ -1,3 +1,5 @@
#!/bin/sh

cd ~/cpsrc
st -c "cpsrc" &
st -c "cpsrc"

+ 0
- 1
scripts/daily.sh View File

@@ -1 +0,0 @@
notify-send "Daily Fortune" "$(fortune|cowsay)"

+ 0
- 1
scripts/discord View File

@@ -1 +0,0 @@
/home/rinri/src/Discord/Discord

+ 1
- 0
scripts/dublicatescreen.sh View File

@@ -0,0 +1 @@
xrandr --output HDMI-1 --same-as eDP-1

+ 0
- 4
scripts/edu.sh View File

@@ -1,4 +0,0 @@
firefox "https://us02web.zoom.us/j/3320211101" &
telegram-desktop &
zoom &
ripcord &

+ 5
- 6
scripts/foreach.sh View File

@@ -1,7 +1,6 @@
#!/bin/bash
File=$1
Lines=$(cat $File)
for Line in $Lines
do
$2 "$Line"
done

while read -u 10 p; do
echo "Copying $p..."
cp "$p" send
done 10<$1

+ 0
- 1
scripts/funnymic.sh View File

@@ -1 +0,0 @@
pactl set-source-volume alsa_input.pci-0000_04_00.6.analog-stereo 400%

+ 2
- 0
scripts/huion.sh View File

@@ -1 +1,3 @@
#!/bin/sh

xsetwacom set 'HUION Huion Tablet Pen stylus' Area 4384 3990 24384 15240

+ 2
- 0
scripts/kz.sh View File

@@ -1 +1,3 @@
#!/bin/sh

setxkbmap -layout us,ru,kz -option grp:alt_shift_toggle

+ 2
- 0
scripts/mixer.sh View File

@@ -1 +1,3 @@
#!/bin/sh

st alsamixer

+ 0
- 1
scripts/naruto.sh View File

@@ -1 +0,0 @@
st mpv --audio-device=jack /mnt/rec/Media/Naruto\ Music\ Collection\ \(FLAC\)/Naruto/NARUTO\ Original\ Soundtrack/07\ -\ Renewed\ Will\ to\ Fight.flac

+ 3
- 0
scripts/network.sh View File

@@ -0,0 +1,3 @@
#!/bin/sh

st -c netw nmtui

+ 0
- 1
scripts/normalmic.sh View File

@@ -1 +0,0 @@
pactl set-source-volume alsa_input.pci-0000_04_00.6.analog-stereo 25%

+ 4
- 2
scripts/poweroff.sh View File

@@ -1,8 +1,10 @@
chosen=$(echo -e "Shutdown\nReboot\nSuspend\nHibernate" | dmenu -i -p "Power Management")
#!/bin/sh

chosen=$(echo "Shutdown\nReboot\nSuspend\nHibernate" | dmenu -i -p "Power Management")

case "$chosen" in
Shutdown) sudo poweroff;;
Reboot) sudo reboot;;
Suspend) sudo suspend;;
Suspend) slock & systemctl suspend;;
Hibernate) systemctl hibernate;;
esac

+ 12
- 0
scripts/rename.sh View File

@@ -0,0 +1,12 @@
i=1
mkdir vid
for filename in *.mkv
do
if [ $i -lt 10 ]
then
mv "$filename" vid/0$i.mkv
else
mv "$filename" vid/$i.mkv
fi
i=$(( i+1 ))
done

+ 2
- 0
scripts/rus.sh View File

@@ -1 +1,3 @@
#!/bin/sh

setxkbmap -layout us,ru -option grp:alt_shift_toggle

+ 2
- 0
scripts/screenshot.sh View File

@@ -1,3 +1,5 @@
#!/bin/sh

if [ $# -eq 0 ]
then
magick import ~/Screenshots/$(date +%e.%m.%y-%T).png


+ 0
- 32
scripts/status/battery.sh View File

@@ -1,32 +0,0 @@
#!/bin/sh

# Prints all batteries, their percentage remaining and an emoji corresponding
# to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.).

case $BUTTON in
3) notify-send "🔋 Battery module" "🔋: discharging
🛑: not charging
♻: stagnant charge
🔌: charging
⚡: charged
❗: battery very low!
- Scroll to change adjust xbacklight." ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac

# acpi alternative
# acpi | sed "s/Battery [0-9]: //;s/[Dd]ischarging, /🔋/;s/[Nn]ot charging, /🛑/;s/[Cc]harging, /🔌/;s/[Uu]nknown, /♻️/;s/[Ff]ull, /⚡/;s/ \(remaining\|until charged\)//"; exit

# Loop through all attached batteries.
for battery in /sys/class/power_supply/BAT?
do
# Get its remaining capacity and charge status.
capacity=$(cat "$battery"/capacity 2>/dev/null) || break
status=$(sed "s/[Dd]ischarging/🔋/;s/[Nn]ot charging/🛑/;s/[Cc]harging/🔌/;s/[Uu]nknown/♻️/;s/[Ff]ull/⚡/" "$battery"/status)

# If it is discharging and 25% or less, we will add a ❗ as a warning.
[ "$capacity" -le 25 ] && [ "$status" = "🔋" ] && warn="❗"

printf "%s%s%s%% " "$status" "$warn" "$capacity"
unset warn
done | sed 's/ *$//'

+ 0
- 1
scripts/status/brightness.sh View File

@@ -1 +0,0 @@
echo "$(brightnessctl g)/$(brightnessctl m)*100" | bc -l | awk '{printf("%d\n",$1 + 0.5)}'

+ 0
- 29
scripts/status/clock.sh View File

@@ -1,29 +0,0 @@
#!/bin/sh

clock=$(date '+%I')

case "$clock" in
"00") icon="🕛" ;;
"01") icon="🕐" ;;
"02") icon="🕑" ;;
"03") icon="🕒" ;;
"04") icon="🕓" ;;
"05") icon="🕔" ;;
"06") icon="🕕" ;;
"07") icon="🕖" ;;
"08") icon="🕗" ;;
"09") icon="🕘" ;;
"10") icon="🕙" ;;
"11") icon="🕚" ;;
"12") icon="🕛" ;;
esac

case $BUTTON in
1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;;
2) setsid -f st -e calcurse ;;
3) notify-send "📅 Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\`
- Middle click opens calcurse if installed" ;;
6) st -e nvim "$0" ;;
esac

date "+%Y %b %d (%a) $icon%I:%M%p"

+ 0
- 20
scripts/status/internet.sh View File

@@ -1,20 +0,0 @@
#!/bin/sh

case $BUTTON in
1) st -e nmtui;;
3) notify-send "Internet module" "\- Click to connect
n: no wifi connection
w: wifi connection with quality
n: no ethernet
e: ethernet working
🔒: vpn is active
" ;;
6) st -e nvim "$0" ;;
esac

case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
down) wifiicon="" ;;
up) wifiicon="$(awk '/^\s*w/ { print "", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;;
esac

printf "%s%s%s\n" "$wifiicon" "$(sed "s/down//;s/up//" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)"

+ 0
- 29
scripts/status/volume.sh View File

@@ -1,29 +0,0 @@
#!/bin/sh

# Prints the current volume or 🔇 if muted.

case $BUTTON in
1) setsid -f st -e pulsemixer ;;
2) pamixer -t ;;
4) pamixer --allow-boost -i 1 ;;
5) pamixer --allow-boost -d 1 ;;
3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
- Middle click to mute.
- Scroll to change." ;;
6) st -e nvim "$0" ;;
esac

[ $(pamixer --get-mute) = true ] && echo 🔇 && exit

vol="$(pamixer --get-volume)"

if [ "$vol" -gt "70" ]; then
icon="🔊"
elif [ "$vol" -lt "30" ]; then
icon="🔈"
else
icon="🔉"
fi

echo "$icon$vol%"


BIN
scripts/testlol View File


+ 4
- 1
scripts/xinit.sh View File

@@ -1,10 +1,13 @@
#!/bin/sh

slstatus &
dunst &
setxkbmap -layout us,ru -option grp:alt_shift_toggle &
xbanish &
xrdb ~/.Xresources &
feh --bg-scale ~/walls/collections/wallhaven-pk3kde.jpg &
feh --bg-scale ~/walls/collections/wallhaven-wyrqg7.png &
picom --experimental-backends &
pulseaudio -D &
xautolock -time 5 -locker slock &
cadence &
brightnessctl set 100%

Loading…
Cancel
Save