ソースを参照

2021-09-08

master
RinRi 2年前
コミット
76b8fce3d7
36個のファイルの変更1804行の追加28行の削除
  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. バイナリ
      clear.jpg
  9. バイナリ
      clear.png
  10. バイナリ
      cmus.jpg
  11. バイナリ
      cmus.png
  12. バイナリ
      dunst.jpg
  13. バイナリ
      dunst.png
  14. バイナリ
      firefox.jpg
  15. バイナリ
      firefox.png
  16. バイナリ
      neofetch.jpg
  17. バイナリ
      neofetch.png
  18. バイナリ
      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. バイナリ
      vim.jpg
  35. バイナリ
      vim.png
  36. バイナリ
      wall.png

+ 1
- 0
.config/nvim/init.vim ファイルの表示

@@ -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
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 2
- 1
.xinitrc ファイルの表示

@@ -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 ファイルの表示

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

+ 2
- 0
.zsh_profile ファイルの表示

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


+ 11
- 4
.zshrc ファイルの表示

@@ -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 ファイルの表示

@@ -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)

バイナリ
clear.jpg ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 276 KiB

バイナリ
clear.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 2.6 MiB

バイナリ
cmus.jpg ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 303 KiB

バイナリ
cmus.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 1.1 MiB

バイナリ
dunst.jpg ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 98 KiB

バイナリ
dunst.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 1.2 MiB

バイナリ
firefox.jpg ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 162 KiB

バイナリ
firefox.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 258 KiB

バイナリ
neofetch.jpg ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 151 KiB

バイナリ
neofetch.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 1.2 MiB

バイナリ
newwall.jpg ファイルの表示

変更前 変更後
幅: 3840  |  高さ: 2160  |  サイズ: 1.7 MiB 幅: 1920  |  高さ: 1080  |  サイズ: 1.4 MiB

+ 0
- 3
scripts/.gitignore ファイルの表示

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

+ 0
- 2
scripts/automount.sh ファイルの表示

@@ -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 ファイルの表示

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

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

+ 3
- 3
scripts/foreach.sh ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

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

+ 3
- 3
scripts/screenshot.sh ファイルの表示

@@ -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 ファイルの表示

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

+ 32
- 0
scripts/status/battery.sh ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

@@ -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% &

バイナリ
vim.jpg ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 180 KiB

バイナリ
vim.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 1.3 MiB

バイナリ
wall.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 957 KiB

読み込み中…
キャンセル
保存