Ver código fonte

2021-09-08

master
RinRi 2 anos atrás
pai
commit
76b8fce3d7
36 arquivos alterados com 1804 adições e 28 exclusões
  1. +1
    -0
      .config/nvim/init.vim
  2. +1646
    -0
      .p10k.zsh
  3. +2
    -1
      .xinitrc
  4. +1
    -0
      .zprofile
  5. +2
    -0
      .zsh_profile
  6. +11
    -4
      .zshrc
  7. +8
    -8
      README.md
  8. BIN
      clear.jpg
  9. BIN
      clear.png
  10. BIN
      cmus.jpg
  11. BIN
      cmus.png
  12. BIN
      dunst.jpg
  13. BIN
      dunst.png
  14. BIN
      firefox.jpg
  15. BIN
      firefox.png
  16. BIN
      neofetch.jpg
  17. BIN
      neofetch.png
  18. BIN
      newwall.jpg
  19. +0
    -3
      scripts/.gitignore
  20. +0
    -2
      scripts/automount.sh
  21. +3
    -0
      scripts/daily.sh
  22. +3
    -3
      scripts/foreach.sh
  23. +3
    -0
      scripts/funnymic.sh
  24. +3
    -0
      scripts/normalmic.sh
  25. +1
    -0
      scripts/screenkey.sh
  26. +3
    -3
      scripts/screenshot.sh
  27. +2
    -0
      scripts/slock.sh
  28. +32
    -0
      scripts/status/battery.sh
  29. +3
    -0
      scripts/status/brightness.sh
  30. +29
    -0
      scripts/status/clock.sh
  31. +20
    -0
      scripts/status/internet.sh
  32. +29
    -0
      scripts/status/volume.sh
  33. +2
    -4
      scripts/xinit.sh
  34. BIN
      vim.jpg
  35. BIN
      vim.png
  36. BIN
      wall.png

+ 1
- 0
.config/nvim/init.vim Ver arquivo

@@ -147,3 +147,4 @@ imap <c-x><c-k> <plug>(fzf-complete-word)
imap <c-x><c-f> <plug>(fzf-complete-path)
imap <c-x><c-l> <plug>(fzf-complete-line)
vnoremap <C-c> "+y


+ 1646
- 0
.p10k.zsh
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 2
- 1
.xinitrc Ver arquivo

@@ -1,4 +1,5 @@
export PATH=$PATH:/home/rinri/scripts
export PATH=$PATH:/home/rinri/scripts:/home/rinri/scripts/Discord
~/scripts/automount.sh &
while true; do
# Log stderror to a file
dwm 2> ~/.dwm.log


+ 1
- 0
.zprofile Ver arquivo

@@ -0,0 +1 @@
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx

+ 2
- 0
.zsh_profile Ver arquivo

@@ -0,0 +1,2 @@
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx


+ 11
- 4
.zshrc Ver arquivo

@@ -5,11 +5,22 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

export QT_QPA_PLATFORMTHEME=qt5ct
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="firefox"
export LC_CTYPE=ru_RU.UTF-8

# less + man
export LESS_TERMCAP_mb=$'\e[1;32m'
export LESS_TERMCAP_md=$'\e[1;32m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[01;33m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;4;31m'
export PAGER="less"

fzfcd () {
cd "$(fd --type d --follow --exclude .git --exclude node_modules | fzf)"
}
@@ -18,12 +29,8 @@ alias ls="ls --color"
alias ll="ls -l --color"
alias la="ls -a --color"
alias lal="ls -al --color"
alias huion="xsetwacom set 'HUION Huion Tablet Pen stylus' Area 4384 3990 24384 15240"
alias dxyz="ssh root@rinri-d.xyz"
alias mrcon="mcrcon -H rinri-d.xyz -p -t"
alias vim="nvim"
alias minemus="mpv --no-video https://youtu.be/Dg0IjOzopYU"
alias weebcabin="~/scripts/anime.sh"
alias cal="cal -m"

# Lines configured by zsh-newuser-install


+ 8
- 8
README.md Ver arquivo

@@ -1,6 +1,6 @@
# My configuration

- OS: [Artix Linux](https://www.artixlinux.org/)
- OS: [Arch Linux](https://archlinux.org)
- WM: [dwm](https://dwm.suckless.org/)
- Terminal: [st](https://st.suckless.org/)
- Editor: [neovim](https://neovim.io/)
@@ -10,27 +10,27 @@
- Notifications: [Dunst](https://github.com/dunst-project/dunst)
- Status bar: [slstatus](https://tools.suckless.org/slstatus/)
- Email client: [neomutt](https://neomutt.org/) + [thunderbird](https://www.thunderbird.net)
- Wallpaper: [wallhaven](https://wallhaven.cc/w/pk3kde)
- Wallpaper: [wallhaven](https://wallhaven.cc/w/p8q1x3) (konachan is better)

## Screenshots

### Clear:
![clear](clear.png)
![clear](clear.jpg)

### Neofetch:
![neofetch](neofetch.png)
![neofetch](neofetch.jpg)

### Music player and mixer(cmus + pulsemixer):
![cmus](cmus.png)
![cmus](cmus.jpg)

### Text editor(neovim):
![neovim](vim.png)
![neovim](vim.jpg)

### Notifications(dunst):
![dunst](dunst.png)
![dunst](dunst.jpg)

### Browser(firefox):
![firefox](firefox.png)
![firefox](firefox.jpg)

### Wallpaper:
![wall](newwall.jpg)

BIN
clear.jpg Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 276 KiB

BIN
clear.png Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 2.6 MiB

BIN
cmus.jpg Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 303 KiB

BIN
cmus.png Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 1.1 MiB

BIN
dunst.jpg Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 98 KiB

BIN
dunst.png Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 1.2 MiB

BIN
firefox.jpg Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 162 KiB

BIN
firefox.png Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 258 KiB

BIN
neofetch.jpg Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 151 KiB

BIN
neofetch.png Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 1.2 MiB

BIN
newwall.jpg Ver arquivo

Antes Depois
Largura: 3840  |  Altura: 2160  |  Tamanho: 1.7 MiB Largura: 1920  |  Altura: 1080  |  Tamanho: 1.4 MiB

+ 0
- 3
scripts/.gitignore Ver arquivo

@@ -1,3 +0,0 @@
anime.sh
upload.sh
download.sh

+ 0
- 2
scripts/automount.sh Ver arquivo

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

+ 3
- 0
scripts/daily.sh Ver arquivo

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

notify-send "Daily Fortune" "$(fortune|cowsay)"

+ 3
- 3
scripts/foreach.sh Ver arquivo

@@ -1,6 +1,6 @@
#!/bin/bash

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

+ 3
- 0
scripts/funnymic.sh Ver arquivo

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

pactl set-source-volume alsa_input.pci-0000_04_00.6.analog-stereo 400%

+ 3
- 0
scripts/normalmic.sh Ver arquivo

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

pactl set-source-volume alsa_input.pci-0000_04_00.6.analog-stereo 25%

+ 1
- 0
scripts/screenkey.sh Ver arquivo

@@ -0,0 +1 @@
screenkey --opacity 0.3 -p fixed -g 350x70-10-100

+ 3
- 3
scripts/screenshot.sh Ver arquivo

@@ -2,9 +2,9 @@

if [ $# -eq 0 ]
then
magick import ~/Screenshots/$(date +%e.%m.%y-%T).png
magick import -window root ~/Screenshots/"$(date +%Y.%m.%d-%T)".jpg
else
magick import temp.png
xclip -selection clipboard -t image/png temp.png
magick import temp.jpg
xclip -selection clipboard -t image/png temp.jpg
rm temp.png
fi

+ 2
- 0
scripts/slock.sh Ver arquivo

@@ -0,0 +1,2 @@
killall screenkey &
slock

+ 32
- 0
scripts/status/battery.sh Ver arquivo

@@ -0,0 +1,32 @@
#!/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/ *$//'

+ 3
- 0
scripts/status/brightness.sh Ver arquivo

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

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

+ 29
- 0
scripts/status/clock.sh Ver arquivo

@@ -0,0 +1,29 @@
#!/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"

+ 20
- 0
scripts/status/internet.sh Ver arquivo

@@ -0,0 +1,20 @@
#!/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)"

+ 29
- 0
scripts/status/volume.sh Ver arquivo

@@ -0,0 +1,29 @@
#!/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%"


+ 2
- 4
scripts/xinit.sh Ver arquivo

@@ -7,7 +7,5 @@ xbanish &
xrdb ~/.Xresources &
feh --bg-scale ~/walls/collections/wallhaven-wyrqg7.png &
picom --experimental-backends &
pulseaudio -D &
xautolock -time 5 -locker slock &
cadence &
brightnessctl set 100%
xautolock -time 5 -locker slock.sh &
brightnessctl set 100% &

BIN
vim.jpg Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 180 KiB

BIN
vim.png Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 1.3 MiB

BIN
wall.png Ver arquivo

Antes Depois
Largura: 1920  |  Altura: 1080  |  Tamanho: 957 KiB

Carregando…
Cancelar
Salvar