diff --git a/.Xresources b/.Xresources index ea0cc9c..622f320 100755 --- a/.Xresources +++ b/.Xresources @@ -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 diff --git a/.config/nvim/.netrwhist b/.config/nvim/.netrwhist index 4ab4be0..beb1cd6 100755 --- a/.config/nvim/.netrwhist +++ b/.config/nvim/.netrwhist @@ -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' diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f3acd60..1377dca 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -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 { {} inoremap { {}O inoremap {; {};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 c :w! \| !pdflatex % + +" Better tabbing +vnoremap < >gv + +" Better window navigation +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +map c :w! \| !make +map r v l :terminal ./run.sh % a map t :!st& +map o :FZF +" Insert mode completion +imap (fzf-complete-word) +imap (fzf-complete-path) +imap (fzf-complete-line) vnoremap "+y diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf new file mode 100644 index 0000000..c8720d1 --- /dev/null +++ b/.config/picom/picom.conf @@ -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 = [ ]; + diff --git a/.zshrc b/.zshrc index 2367cf0..5034e5f 100755 --- a/.zshrc +++ b/.zshrc @@ -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 diff --git a/README.md b/README.md index bf55ca9..5b59887 100755 --- a/README.md +++ b/README.md @@ -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) diff --git a/clear.png b/clear.png old mode 100755 new mode 100644 index 211fca4..9ae6629 Binary files a/clear.png and b/clear.png differ diff --git a/cmus.png b/cmus.png old mode 100755 new mode 100644 index 3467e0f..fbff291 Binary files a/cmus.png and b/cmus.png differ diff --git a/dunst.png b/dunst.png old mode 100755 new mode 100644 index 5460d66..76408b8 Binary files a/dunst.png and b/dunst.png differ diff --git a/firefox.png b/firefox.png old mode 100755 new mode 100644 index 2b41855..6188448 Binary files a/firefox.png and b/firefox.png differ diff --git a/neofetch.png b/neofetch.png old mode 100755 new mode 100644 index f7bd883..54d6919 Binary files a/neofetch.png and b/neofetch.png differ diff --git a/newwall.jpg b/newwall.jpg new file mode 100644 index 0000000..65e7a1b Binary files /dev/null and b/newwall.jpg differ diff --git a/scripts/.gitignore b/scripts/.gitignore old mode 100755 new mode 100644 diff --git a/scripts/autostart.sh b/scripts/autostart.sh new file mode 100755 index 0000000..d51eab4 --- /dev/null +++ b/scripts/autostart.sh @@ -0,0 +1 @@ +st -c cmus cmus diff --git a/scripts/cpsrc.sh b/scripts/cpsrc.sh new file mode 100755 index 0000000..6f1803a --- /dev/null +++ b/scripts/cpsrc.sh @@ -0,0 +1,3 @@ +cd ~/cpsrc +st -c "cpsrc" & +st -c "cpsrc" \ No newline at end of file diff --git a/scripts/discord b/scripts/discord new file mode 120000 index 0000000..d87b0e6 --- /dev/null +++ b/scripts/discord @@ -0,0 +1 @@ +/home/rinri/src/Discord/Discord \ No newline at end of file diff --git a/scripts/foreach.sh b/scripts/foreach.sh new file mode 100644 index 0000000..fbde075 --- /dev/null +++ b/scripts/foreach.sh @@ -0,0 +1,7 @@ +#!/bin/bash +File=$1 +Lines=$(cat $File) +for Line in $Lines +do + $2 "$Line" +done \ No newline at end of file diff --git a/scripts/mixer.sh b/scripts/mixer.sh new file mode 100755 index 0000000..029ed25 --- /dev/null +++ b/scripts/mixer.sh @@ -0,0 +1 @@ +st alsamixer diff --git a/scripts/naruto.sh b/scripts/naruto.sh index 7f33ebf..2967ae2 100755 --- a/scripts/naruto.sh +++ b/scripts/naruto.sh @@ -1 +1 @@ -st mpv /mnt/rec/Media/Naruto\ Music\ Collection\ \(FLAC\)/Naruto/NARUTO\ Original\ Soundtrack/07\ -\ Renewed\ Will\ to\ Fight.flac \ No newline at end of file +st mpv --audio-device=jack /mnt/rec/Media/Naruto\ Music\ Collection\ \(FLAC\)/Naruto/NARUTO\ Original\ Soundtrack/07\ -\ Renewed\ Will\ to\ Fight.flac \ No newline at end of file diff --git a/scripts/normalmic.sh b/scripts/normalmic.sh index c45b833..18d751e 100755 --- a/scripts/normalmic.sh +++ b/scripts/normalmic.sh @@ -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% diff --git a/scripts/status/battery.sh b/scripts/status/battery.sh new file mode 100755 index 0000000..9d9a2ea --- /dev/null +++ b/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/ *$//' diff --git a/scripts/status/clock.sh b/scripts/status/clock.sh new file mode 100755 index 0000000..420f3b8 --- /dev/null +++ b/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//;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" diff --git a/scripts/status/internet.sh b/scripts/status/internet.sh new file mode 100755 index 0000000..842ad2a --- /dev/null +++ b/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)" diff --git a/scripts/status/volume.sh b/scripts/status/volume.sh new file mode 100755 index 0000000..59304aa --- /dev/null +++ b/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%" + diff --git a/scripts/testlol b/scripts/testlol new file mode 100755 index 0000000..f3ce60c Binary files /dev/null and b/scripts/testlol differ diff --git a/scripts/xinit.sh b/scripts/xinit.sh index 9a1b7df..e162abf 100755 --- a/scripts/xinit.sh +++ b/scripts/xinit.sh @@ -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 & diff --git a/vim.png b/vim.png old mode 100755 new mode 100644 index 44e37a1..332d97f Binary files a/vim.png and b/vim.png differ