Browse Source

major changes in neovim and overall look

master
RinRi 3 years ago
parent
commit
e824548ad2
27 changed files with 252 additions and 65 deletions
  1. +19
    -19
      .Xresources
  2. +8
    -8
      .config/nvim/.netrwhist
  3. +33
    -14
      .config/nvim/init.vim
  4. +39
    -0
      .config/picom/picom.conf
  5. +18
    -15
      .zshrc
  6. +4
    -5
      README.md
  7. BIN
      clear.png
  8. BIN
      cmus.png
  9. BIN
      dunst.png
  10. BIN
      firefox.png
  11. BIN
      neofetch.png
  12. BIN
      newwall.jpg
  13. +0
    -0
      scripts/.gitignore
  14. +1
    -0
      scripts/autostart.sh
  15. +3
    -0
      scripts/cpsrc.sh
  16. +1
    -0
      scripts/discord
  17. +7
    -0
      scripts/foreach.sh
  18. +1
    -0
      scripts/mixer.sh
  19. +1
    -1
      scripts/naruto.sh
  20. +1
    -1
      scripts/normalmic.sh
  21. +32
    -0
      scripts/status/battery.sh
  22. +29
    -0
      scripts/status/clock.sh
  23. +20
    -0
      scripts/status/internet.sh
  24. +29
    -0
      scripts/status/volume.sh
  25. BIN
      scripts/testlol
  26. +6
    -2
      scripts/xinit.sh
  27. BIN
      vim.png

+ 19
- 19
.Xresources View File

@@ -1,38 +1,38 @@
Xcursor.size: 20

! special
*.foreground: #ffffff
*.background: #1f1f2b
*.cursorColor: #ffffff
*.foreground: #effbff
*.background: #20273a
*.cursorColor: #effbff

! black
*.color0: #2e3436
*.color8: #555753
*.color0: #000000
*.color8: #4d4d4d

! red
*.color1: #f54934
*.color9: #ff0001
*.color1: #ff6360
*.color9: #ff6360

! green
*.color2: #7de676
*.color10: #47d467
*.color2: #77ff60
*.color10: #77ff60

! yellow
*.color3: #ecc556
*.color11: #deab11
*.color3: #f1de7f
*.color11: #f1de7f

! blue
*.color4: #5700bc
*.color12: #601ab0
*.color4: #630fe8
*.color12: #630fe8

! magenta
*.color5: #af69b2
*.color13: #aa49ad
*.color5: #9054ff
*.color13: #9054ff

! cyan
*.color6: #1c98d5
*.color14: #41afe5
*.color6: #6b90ff
*.color14: #6b90ff

! white
*.color7: #e3e7de
*.color15: #eeeeec
*.color7: #effbff
*.color15: #effbff

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

@@ -1,12 +1,12 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =7
let g:netrw_dirhistcnt =4
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'
let g:netrw_dirhist_4='/etc/alsa/conf.d'
let g:netrw_dirhist_3='/home/rinri/.local/share/osu'
let g:netrw_dirhist_2='/home/rinri/.local/share/osu/files'
let g:netrw_dirhist_1='/home/rinri/.local/share/osu/files/8'
let g:netrw_dirhist_0='/home/rinri/.local/share/osu/files'
let g:netrw_dirhist_9='/home/rinri/.local/share/osu'
let g:netrw_dirhist_8='/home/rinri/.local/share/osu/screenshots'

+ 33
- 14
.config/nvim/init.vim View File

@@ -1,27 +1,17 @@
call plug#begin('~/.vim/plugged')

"{{ The Basics }}
Plug 'gmarik/Vundle.vim' " Vundle
Plug 'joshdick/onedark.vim' " Colors
Plug 'itchyny/lightline.vim' " Lightline statusbar
Plug 'suan/vim-instant-markdown', {'rtp': 'after'} " Markdown Preview
Plug 'frazrepo/vim-rainbow'
"{{ File management }}
Plug 'vifm/vifm.vim' " Vifm
Plug 'scrooloose/nerdtree' " Nerdtree
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree
Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree
"{{ Tim Pope Plugins }}
Plug 'tpope/vim-surround' " Change surrounding marks
"{{ Syntax Highlighting and Colors }}
Plug 'ap/vim-css-color' " Color previews for CSS
"{{ Junegunn Choi Plugins }}
Plug 'junegunn/goyo.vim' " Distraction-free viewing
Plug 'junegunn/limelight.vim' " Hyperfocus on a range
Plug 'junegunn/vim-emoji' " Vim needs emojis!
"{{ Language specific }}
Plug 'mattn/emmet-vim' " Emmet for web-gay developing

Plug 'junegunn/fzf.vim'
call plug#end()

" colorscheme
@@ -36,11 +26,23 @@ inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O

" markdown
let g:instant_markdown_browser = "st surf"
filetype plugin on
let g:instant_markdown_browser = "firefox --new-window"

" Make Vim more useful
set nocompatible
" Long lines as one line
set nowrap
" Ruler
set ruler
" Horizontal splits will automatically be below
set splitbelow
" Vertical splits will automatically be to the right
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
@@ -109,6 +111,23 @@ endif
" Start scrolling three lines before the horizontal window border
set scrolloff=3

map <Leader>c :w! \| !pdflatex <c-r>%<CR><CR>

" Better tabbing
vnoremap < <gv
vnoremap > >gv

" Better window navigation
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l

map <Leader>c :w! \| !make <CR>
map <Leader>r <c-w>v <c-w>l :terminal ./run.sh <c-r>% <CR>a
map <Leader>t :!st&<CR><CR>
map <Leader>o :FZF<CR>
" Insert mode completion
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

+ 39
- 0
.config/picom/picom.conf View File

@@ -0,0 +1,39 @@
# GLX backend
backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;
use-damage = true;
glx-no-rebind-pixmap = true;

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

# Blur
#blur-background = true;
#blur-method = "dual_kawase";
#blur-strength = 2;

# Fading
fading = false;
fade-in-step = 0.05;
fade-out-step = 0.05;
fade-exclude = [ ];

# Other
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
dbe = false;
unredir-if-possible = true;
focus-exclude = [ "class_g = 'Cairo-clock'" ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];


+ 18
- 15
.zshrc View File

@@ -5,10 +5,14 @@ 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 EDITOR="nvim"
export TERMINAL="st"
export BROWSER="firefox"
export LC_CTYPE=ru_RU.UTF-8
export EDITOR=nvim

fzfcd () {
cd "$(fd --type d --follow --exclude .git --exclude node_modules | fzf)"
}
alias ..="cd .."
alias ls="ls --color"
alias ll="ls -l --color"
@@ -24,8 +28,8 @@ alias cal="cal -m"

# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
HISTSIZE=100000
SAVEHIST=100000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
@@ -37,20 +41,19 @@ zmodload zsh/complist
compinit
_comp_options+=(globdots)

lfcd () {
tmp="$(mktemp)"
lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
bindkey -s '^o' 'lfcd\n'
bindkey -s '^o' 'fzfcd\n'

# End of lines added by compinstall
source ~/src/powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/fzf/completion.zsh
source /usr/share/fzf/key-bindings.zsh

# fzf things
export FZF_DEFAULT_COMMAND="fd --color=never --type f --type l --follow --exclude .git --exclude node_modules"
export FZF_DEFAULT_OPTS="--height 50% -1 --reverse --multi --inline-info --preview='[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {} || cat {}) 2> /dev/null | head -300' --preview-window='right:hidden:wrap' --bind='f3:execute(bat --style=numbers {} || less -f {}),f2:toggle-preview,ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-a:select-all+accept,ctrl-y:execute-silent(echo {+} | pbcopy)'"


# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
if [ -e /home/rinri/.nix-profile/etc/profile.d/nix.sh ]; then . /home/rinri/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer

+ 4
- 5
README.md View File

@@ -1,4 +1,4 @@
# This is my dotfiles repository
# My configuration

- OS: [Artix Linux](https://www.artixlinux.org/)
- WM: [dwm](https://dwm.suckless.org/)
@@ -10,7 +10,7 @@
- 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: [pixiv](https://www.pixiv.net/en/artworks/23346358)
- Wallpaper: [wallhaven](https://wallhaven.cc/w/pk3kde)

## Screenshots

@@ -32,6 +32,5 @@
### Browser(firefox):
![firefox](firefox.png)

### Wallpaper(IA vocaloid):
![wall](wall.png)
You can find .kra file for krita and edit the wallpaper.
### Wallpaper:
![wall](newwall.jpg)

BIN
clear.png View File

Before After
Width: 1920  |  Height: 1080  |  Size: 852 KiB Width: 1920  |  Height: 1080  |  Size: 2.6 MiB

BIN
cmus.png View File

Before After
Width: 1920  |  Height: 1080  |  Size: 570 KiB Width: 1920  |  Height: 1080  |  Size: 1.1 MiB

BIN
dunst.png View File

Before After
Width: 1920  |  Height: 1080  |  Size: 388 KiB Width: 1920  |  Height: 1080  |  Size: 1.2 MiB

BIN
firefox.png View File

Before After
Width: 1920  |  Height: 1080  |  Size: 164 KiB Width: 1920  |  Height: 1080  |  Size: 258 KiB

BIN
neofetch.png View File

Before After
Width: 1920  |  Height: 1080  |  Size: 835 KiB Width: 1920  |  Height: 1080  |  Size: 1.2 MiB

BIN
newwall.jpg View File

Before After
Width: 3840  |  Height: 2160  |  Size: 1.7 MiB

+ 0
- 0
scripts/.gitignore View File


+ 1
- 0
scripts/autostart.sh View File

@@ -0,0 +1 @@
st -c cmus cmus

+ 3
- 0
scripts/cpsrc.sh View File

@@ -0,0 +1,3 @@
cd ~/cpsrc
st -c "cpsrc" &
st -c "cpsrc"

+ 1
- 0
scripts/discord View File

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

+ 7
- 0
scripts/foreach.sh View File

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

+ 1
- 0
scripts/mixer.sh View File

@@ -0,0 +1 @@
st alsamixer

+ 1
- 1
scripts/naruto.sh View File

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

+ 1
- 1
scripts/normalmic.sh View File

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

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

@@ -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/ *$//'

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

@@ -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 View File

@@ -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 View File

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


BIN
scripts/testlol View File


+ 6
- 2
scripts/xinit.sh View File

@@ -1,6 +1,10 @@
slstatus &
dunst &
setxkbmap -layout us,ru -option grp:alt_shift_toggle &
xbanish &
xrdb ~/.Xresources &
feh --bg-scale ~/Documents/Pictures/wall.png &
picom &
feh --bg-scale ~/walls/collections/wallhaven-pk3kde.jpg &
picom --experimental-backends &
pulseaudio -D &
xautolock -time 5 -locker slock &
cadence &

BIN
vim.png View File

Before After
Width: 1920  |  Height: 1080  |  Size: 507 KiB Width: 1920  |  Height: 1080  |  Size: 1.3 MiB

Loading…
Cancel
Save