Bläddra i källkod

Many changes:

Colorscheme and wallpaper: added catpuccin colorscheme somewhere (IDK)
Neovim config in lua
Added doom emacs screenshots, since I use it pretty frequently
Added X11 configs
Modified and deleted some scripts
master
RinRi 1 år sedan
förälder
incheckning
2d512fad44
49 ändrade filer med 676 tillägg och 2573 borttagningar
  1. +18
    -24
      .Xresources
  2. +2
    -2
      .config/dunst/dunstrc
  3. +0
    -414
      .config/dunst/dunstrc.b
  4. +0
    -21
      .config/nvim/coc-settings.json
  5. +5
    -0
      .config/nvim/init.lua
  6. +0
    -363
      .config/nvim/init.vim
  7. +0
    -32
      .config/nvim/lua/dap-conf.lua
  8. +34
    -0
      .config/nvim/lua/rin/keymaps.lua
  9. +120
    -0
      .config/nvim/lua/rin/lsp/init.lua
  10. +31
    -0
      .config/nvim/lua/rin/plugins.lua
  11. +81
    -0
      .config/nvim/lua/rin/settings.lua
  12. +184
    -0
      .config/nvim/plugin/packer_compiled.lua
  13. +8
    -6
      .config/picom/picom.conf
  14. +0
    -1646
      .p10k.zsh
  15. +0
    -1
      .xinitrc
  16. +7
    -18
      .zshrc
  17. +7
    -14
      README.md
  18. +9
    -0
      X11/10-monitor.conf
  19. +6
    -0
      X11/10-tablet.conf
  20. +5
    -0
      X11/20-amdgpu.conf
  21. +8
    -0
      X11/30-touchpad.conf
  22. Binär
      clear.jpg
  23. Binär
      cmus.jpg
  24. Binär
      dunst.jpg
  25. Binär
      emacs.jpg
  26. Binär
      firefox.jpg
  27. Binär
      neofetch.jpg
  28. Binär
      newwall.jpg
  29. +3
    -0
      scripts/.gitignore
  30. +1
    -1
      scripts/daily.sh
  31. +0
    -1
      scripts/dublicatescreen.sh
  32. +1
    -1
      scripts/foreach.sh
  33. +0
    -3
      scripts/funnymic.sh
  34. +0
    -3
      scripts/kz.sh
  35. +13
    -0
      scripts/mute.sh
  36. +0
    -3
      scripts/normalmic.sh
  37. +19
    -0
      scripts/playmus.sh
  38. +63
    -0
      scripts/pomodoro.sh
  39. +2
    -2
      scripts/poweroff.sh
  40. +12
    -0
      scripts/root-notify.sh
  41. +0
    -3
      scripts/rus.sh
  42. +2
    -1
      scripts/screenkey.sh
  43. +3
    -5
      scripts/screenshot.sh
  44. +9
    -0
      scripts/setvolume.sh
  45. +3
    -0
      scripts/showcal.sh
  46. +13
    -0
      scripts/update.sh
  47. +7
    -9
      scripts/xinit.sh
  48. Binär
      vim.jpg
  49. Binär
      wall.kra

+ 18
- 24
.Xresources Visa fil

@@ -1,40 +1,34 @@
Xcursor.size: 20

! special
*.foreground: #effbff
*.background: #282c34
*.cursorColor: #effbff
*background: #1E1E2E
*foreground: #CDD6F4

! black
*.color0: #000000
*.color8: #222222
*color0: #45475A
*color8: #585B70

! red
*.color1: #ffa3a3
*.color9: #ff6360
*color1: #F38BA8
*color9: #F38BA8

! green
*.color2: #89e19e
*.color10: #77ff60
*color2: #A6E3A1
*color10: #A6E3A1

! yellow
*.color3: #fbdf90
*.color11: #f1de7f
*color3: #F9E2AF
*color11: #F9E2AF

! blue
*.color4: #7733ee
*.color12: #7733ee
*color4: #89B4FA
*color12: #89B4FA

! magenta
*.color5: #9054ff
*.color13: #9054ff
*color5: #F5C2E7
*color13: #F5C2E7

! cyan
*.color6: #6b90ff
*.color14: #6b90ff
*color6: #94E2D5
*color14: #94E2D5

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

*.color17: #6600cc
*color7: #BAC2DE
*color15: #A6ADC8

+ 2
- 2
.config/dunst/dunstrc Visa fil

@@ -24,7 +24,7 @@
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = (0, 800)
width = (0, 500)

# The maximum height of a single notification, excluding the frame.
height = 800
@@ -195,7 +195,7 @@
max_icon_size = 64

# Paths to default icons.
icon_path = /usr/share/icons/breeze-dark/status/16/:/usr/share/icons/breeze/devices/16/
icon_path = /usr/share/icons/breeze-dark/status/16/:/usr/share/icons/breeze-dark/devices/16/:/usr/share/icons/breeze-dark/actions/16/

### History ###



+ 0
- 414
.config/dunst/dunstrc.b Visa fil

@@ -1,414 +0,0 @@
[global]
### Display ###

# Which monitor should the notifications be displayed on.
monitor = 0

# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse

# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "700x30-30+40"

# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes

# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no

# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 15

# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 0

# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 2

# Padding between text and separator.
padding = 8

# Horizontal padding.
horizontal_padding = 8

# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 1

# Defines color of the frame around the notification window.
frame_color = "#41008c"

# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame

# Sort messages by urgency.
sort = yes

# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
idle_threshold = 120

### Text ###

font = monospace 13

# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0

# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full

# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"

# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left

# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60

# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes

# When word_wrap is set to no, specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle

# Ignore newlines '\n' in notifications.
ignore_newline = no

# Stack together notifications with the same content
stack_duplicates = true

# Hide the count of stacked notifications with the same content
hide_duplicate_count = false

# Display indicators for URLs (U) and actions (A).
show_indicators = yes

### Icons ###

# Align icons left/right/off
icon_position = left

# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 32

# Paths to default icons.
icon_path = /usr/share/icons/Arc/status/32:/usr/share/icons/Arc/devices/32

### History ###

# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes

# Maximum amount of notifications kept in history
history_length = 20

### Misc/Advanced ###

# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:

# Browser for opening urls in context menu.
browser = /usr/bin/firefox -new-tab

# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true

# Define the title of the windows spawned by dunst
title = Dunst

# Define the class of the windows spawned by dunst
class = Dunst

# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false

# Manage dunst's desire for talking
# Can be one of the following values:
# crit: Critical features. Dunst aborts
# warn: Only non-fatal warnings
# mesg: Important Messages
# info: all unimportant stuff
# debug: all less than unimportant stuff
verbosity = mesg

# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0

### Legacy

# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false

### mouse

# Defines action of mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: If the notification has exactly one action, or one is marked as default,
# invoke it. If there are multiple and no default, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
mouse_left_click = close_current
mouse_middle_click = do_action
mouse_right_click = close_all

# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false

[shortcuts]

# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.

# Close notification.
close = ctrl+space

# Close all notifications.
close_all = ctrl+shift+space

# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1". Make sure this key actually exists on your keyboard layout,
# e.g. check output of 'xmodmap -pke'
history = ctrl+grave

# Context menu.
context = ctrl+shift+period

[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#222222"
foreground = "#888888"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon

[urgency_normal]
background = "#41008c"
foreground = "#ffffff"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon

[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#icon = /path/to/icon

# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# timeout
# urgency
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.

# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes

# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show

#[espeak]
# summary = "*"
# script = dunst_espeak.sh

#[script-test]
# summary = "*script*"
# script = dunst_test.sh

#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""

#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes

#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes

#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

+ 0
- 21
.config/nvim/coc-settings.json Visa fil

@@ -1,21 +0,0 @@
{
"languageserver": {
"ccls": {
"command": "ccls",
"args": ["--log-file=/tmp/ccls.log", "-v=1"],
"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
},
"index": {
"onChange": true
},
"highlight": {
"lsRanges": true
}
}
}
}
}

+ 5
- 0
.config/nvim/init.lua Visa fil

@@ -0,0 +1,5 @@
require('rin.settings')
require('rin.plugins')
require('rin.keymaps')
require('rin.lsp')
-- TODO: treesitter, telescope, NERDtree alt

+ 0
- 363
.config/nvim/init.vim Visa fil

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

Plug 'joshdick/onedark.vim' " Colors
Plug 'itchyny/lightline.vim' " Lightline statusbar
Plug 'scrooloose/nerdtree' " Nerdtree
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree
Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree
Plug 'ap/vim-css-color' " Color previews for CSS
Plug 'junegunn/limelight.vim'
Plug 'junegunn/fzf.vim'
Plug 'xolox/vim-misc'
Plug 'xolox/vim-session'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'mfussenegger/nvim-dap'
Plug 'rcarriga/nvim-dap-ui'
Plug 'jackguo380/vim-lsp-cxx-highlight'
Plug 'vim-syntastic/syntastic'
Plug 'rhysd/vim-clang-format'
Plug 'lambdalisue/suda.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

" brackets
inoremap " ""<left>
inoremap ' ''<left>
inoremap ( ()<left>
inoremap [ []<left>
inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O

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

let g:session_autosave = "no"
let g:session_autoload = "no"

" 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
" Use the OS clipboard by default (on versions compiled with `+clipboard`)
set clipboard+=unnamedplus
" Enhance command-line completion
set wildmenu
" Disables automatic commenting on newline:
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" Allow cursor keys in insert mode
" Allow backspace in insert mode
set backspace=indent,eol,start
" Optimize for fast terminal connections
set ttyfast
" Add the g flag to search/replace by default
set gdefault
" Use UTF-8 without BOM
set encoding=utf-8
" Change mapleader
let mapleader=","
" Don’t add empty newlines at the end of files
set binary
set noeol
set smartcase
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile

" 256 colors
set t_Co=256
" Respect modeline in files
set modeline
set modelines=4
" Enable per-directory .vimrc files and disable unsafe commands in them
set exrc
set secure
" Enable line numbers
set number
" Make tabs as wide as two spaces
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
" Highlight searches
set hlsearch
" Ignore case of searches
set ignorecase
" Highlight dynamically as pattern is typed
set incsearch
" Always show status line
set laststatus=2
" Enable mouse in all modes
set mouse=a
" Disable error bells
set noerrorbells
" Don’t reset cursor to start of line when moving around.
set nostartofline
" Show the cursor position
set ruler
" Don’t show the intro message when starting Vim
set shortmess=atI
" Show the current mode
set showmode
" Show the filename in the window titlebar
set title
" Show the (partial) command as it’s being typed
set showcmd
" Use relative line numbers

set hidden
set nobackup
set nowritebackup
set updatetime=300
set shortmess+=c

" Give more space for displaying messages.
set cmdheight=2
set pumheight=5

" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
if has("nvim-0.5.0") || has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif

inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"

function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction

" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-return> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif

" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"

" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)

" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)

" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>

function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction

" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')

" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)

" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)

augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end

" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)

" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)

" Run the Code Lens action on the current line.
nmap <leader>cl <Plug>(coc-codelens-action)

" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif


" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocActionAsync('format')

" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)

" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')

let g:lightline = {
\ 'colorscheme': 'onedark',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'cocstatus': 'coc#status'
\ },
\ }

" Use autocmd to force lightline update.
autocmd User CocStatusChange,CocDiagnosticChange call lightline#update()

" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>

" c++ syntax highlighting
let g:cpp_class_scope_highlight = 1
let g:cpp_member_variable_highlight = 1
let g:cpp_class_decl_highlight = 1

" c++ linting
let g:syntastic_cpp_checkers = ['cpplint']
let g:syntastic_c_checkers = ['cpplint']
let g:syntastic_cpp_cpplint_exec = 'cpplint'
" The following two lines are optional. Configure it to your liking!
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

nnoremap <Leader>f :<C-u>ClangFormat<CR>

" header guards
function! s:insert_gates()
let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g")
execute "normal! i#ifndef " . gatename
execute "normal! o#define " . gatename . " "
execute "normal! Go#endif /* " . gatename . " */"
normal! ko
endfunction
autocmd BufNewFile *.{h,hpp} call <SID>insert_gates()

if exists("&relativenumber")
set relativenumber
au BufReadPost * set relativenumber
endif " Start scrolling three lines before the horizontal window border
set scrolloff=3

" Toggle spellchecking
function! ToggleSpellCheck()
set spell!
if &spell
echo "Spellcheck ON"
else
echo "Spellcheck OFF"
endif
endfunction


" 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>
map <Leader>s :call ToggleSpellCheck()<CR>
map <Leader>n :NERDTreeToggle<CR>
map Q gq
" 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

" Write as root
cnoremap w!! SudaWrite

colorscheme onedark

" Debugging
map <Leader>db :lua require'dap'.toggle_breakpoint() <CR>
map <Leader>dc :lua require'dap'.continue() <CR>
map <Leader>do :lua require'dap'.step_over() <CR>
map <Leader>di :lua require'dap'.step_into() <CR>
map <Leader>dn :lua require("dapui").toggle() <CR>
lua require("dap-conf")
lua require("dapui").setup()

+ 0
- 32
.config/nvim/lua/dap-conf.lua Visa fil

@@ -1,32 +0,0 @@
local dap = require('dap')

dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
command = '/home/rinri/.config/nvim/cpptools/extension/debugAdapters/bin/OpenDebugAD7',
}

dap.configurations.cpp = {
{
name = "Launch file",
type = "cppdbg",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = true,
},
{
name = 'Attach to gdbserver :1234',
type = 'cppdbg',
request = 'launch',
MIMode = 'gdb',
miDebuggerServerAddress = 'localhost:1234',
miDebuggerPath = '/usr/bin/gdb',
cwd = '${workspaceFolder}',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
},
}

+ 34
- 0
.config/nvim/lua/rin/keymaps.lua Visa fil

@@ -0,0 +1,34 @@
local function map(kind, lhs, rhs, opts)
vim.api.nvim_set_keymap(kind, lhs, rhs, opts)
end

local sn = {noremap = true, silent = true}

-- Brackets
map('i', '\"', '\"\"<left>', sn)
map('i', '\'', '\'\'<left>', sn)
map('i', '(', '()<left>', sn)
map('i', '[', '[]<left>', sn)
map('i', '{', '{}<left>', sn)
map('i', '{<CR>', '{<CR>}<ESC>O', sn)
map('i', '{;<CR>', '{<CR>};<ESC>O', sn)

-- Spell check toggle
map('n', '<F11>', ':set spell!<CR>', sn)
map('i', '<F11>', '<C-O>:set spell!<CR>', sn)

-- Identation
map('v', '<', '<gv', sn)
map('v', '>', '>gv', sn)

-- Split navigation
map('n', '<C-h>', '<C-w>h', sn)
map('n', '<C-j>', '<C-w>j', sn)
map('n', '<C-k>', '<C-w>k', sn)
map('n', '<C-l>', '<C-w>l', sn)

-- Run Make
map('n', '<Leader>c', ':w! | !make <CR>', sn)
map('n', '<Leader>n', ':NERDTreeToggle<CR>', sn)

map('n', '<Leader>l', ':Limelight!! 0.5 <CR>', sn)

+ 120
- 0
.config/nvim/lua/rin/lsp/init.lua Visa fil

@@ -0,0 +1,120 @@
-- TODO: show function signature help on hover
-- web, vimtex

-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)

-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')

-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, bufopts)
end

local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}

local servers = { 'tsserver', 'rust_analyzer', 'clangd', 'sumneko_lua' }
local lspconfig = require('lspconfig')

lspconfig['sumneko_lua'].setup {
on_attach = on_attach,
flags = lsp_flags,
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { 'vim' },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
}

local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
end

local luasnip = require 'luasnip'
local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
},
}

+ 31
- 0
.config/nvim/lua/rin/plugins.lua Visa fil

@@ -0,0 +1,31 @@
-- Automatically run :PackerCompile whenever plugins.lua is updated with an autocommand:
vim.api.nvim_create_autocmd('BufWritePost', {
group = vim.api.nvim_create_augroup('PACKER', { clear = true }),
pattern = 'plugins.lua',
command = 'source <afile> | PackerCompile',
})

require('mason').setup()

return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'glepnir/dashboard-nvim'
use 'joshdick/onedark.vim'
use 'itchyny/lightline.vim'
use 'scrooloose/nerdtree'
use 'tiagofumo/vim-nerdtree-syntax-highlight'
use 'ryanoasis/vim-devicons'
use 'ap/vim-css-color'
use 'vim-syntastic/syntastic'
use 'rhysd/vim-clang-format'
use 'lambdalisue/suda.vim'
use 'neovim/nvim-lspconfig'
use 'jackguo380/vim-lsp-cxx-highlight'
use 'williamboman/mason.nvim'
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp
use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp
use 'L3MON4D3/LuaSnip' -- Snippets plugin
-- TODO: add telescope and other useful plugins
end)


+ 81
- 0
.config/nvim/lua/rin/settings.lua Visa fil

@@ -0,0 +1,81 @@
local g = vim.g
local o = vim.o
local api = vim.api
local opt = vim.opt
local cmd = vim.cmd
local home = os.getenv('HOME')

-- Decrease update time
o.timeoutlen = 500
o.updatetime = 200

-- Number of screen lines to keep above and below the cursor
o.scrolloff = 8

o.number = true
o.relativenumber = true
o.signcolumn = 'yes:1'

o.expandtab = true
-- o.smarttab = true
o.cindent = true
-- o.autoindent = true

o.wrap = false
o.textwidth = 300
o.tabstop = 4
o.shiftwidth = 0
o.softtabstop = -1 -- If negative, shiftwidth value is used
o.list = true
o.listchars = 'trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂'

-- OS clipboard
o.clipboard = 'unnamedplus'

-- Mouse in all modes
opt.mouse = 'a'

-- Case insensitive searching UNLESS /C or capital in search
o.ignorecase = true
o.smartcase = true

o.backup = false
o.writebackup = false
o.undofile = true
o.undodir = home .. '/.vim/undodir'
o.swapfile = false

o.splitright = true
o.splitbelow = true

g.lightline = {colorscheme = 'onedark'}

g.mapleader = ' '
g.maplocalleader = ' '

o.termguicolors = true

api.nvim_create_autocmd('ColorScheme', {
command = [[
highlight clear CursorLine
highlight Normal ctermbg=none
highlight Normal guibg=none
highlight LineNr ctermbg=none
highlight LineNr guibg=none
highlight Folded ctermbg=none
highlight Folded guibg=none
highlight NonText ctermbg=none
highlight NonText guibg=none
highlight SpecialKey ctermbg=none
highlight SpecialKey guibg=none
highlight VertSplit ctermbg=none
highlight VertSplit guibg=none
highlight SignColumn ctermbg=none
highlight SignColumn guibg=none
]]
})
cmd('colorscheme onedark')

-- BUG: this won't update the search count after pressing `n` or `N`
-- When running macros and regexes on a large file, lazy redraw tells neovim/vim not to draw the screen
-- o.lazyredraw = true

+ 184
- 0
.config/nvim/plugin/packer_compiled.lua Visa fil

@@ -0,0 +1,184 @@
-- Automatically generated packer.nvim plugin loader code

if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end

vim.api.nvim_command('packadd packer.nvim')

local no_errors, error_msg = pcall(function()

_G._packer = _G._packer or {}
_G._packer.inside_compile = true

local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end

local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end

_G._packer.profile_output = results
end

time([[Luarocks path setup]], true)
local package_path_str = "/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/rinri/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end

if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end

time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end

time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
LuaSnip = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
cmp_luasnip = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
["dashboard-nvim"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/dashboard-nvim",
url = "https://github.com/glepnir/dashboard-nvim"
},
["lightline.vim"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/lightline.vim",
url = "https://github.com/itchyny/lightline.vim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
nerdtree = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nerdtree",
url = "https://github.com/scrooloose/nerdtree"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["onedark.vim"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/onedark.vim",
url = "https://github.com/joshdick/onedark.vim"
},
["packer.nvim"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["suda.vim"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/suda.vim",
url = "https://github.com/lambdalisue/suda.vim"
},
syntastic = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/syntastic",
url = "https://github.com/vim-syntastic/syntastic"
},
["vim-clang-format"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-clang-format",
url = "https://github.com/rhysd/vim-clang-format"
},
["vim-css-color"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-css-color",
url = "https://github.com/ap/vim-css-color"
},
["vim-devicons"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-devicons",
url = "https://github.com/ryanoasis/vim-devicons"
},
["vim-lsp-cxx-highlight"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-lsp-cxx-highlight",
url = "https://github.com/jackguo380/vim-lsp-cxx-highlight"
},
["vim-nerdtree-syntax-highlight"] = {
loaded = true,
path = "/home/rinri/.local/share/nvim/site/pack/packer/start/vim-nerdtree-syntax-highlight",
url = "https://github.com/tiagofumo/vim-nerdtree-syntax-highlight"
}
}

time([[Defining packer_plugins]], false)

_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false

if should_profile then save_profiles() end

end)

if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end

+ 8
- 6
.config/picom/picom.conf Visa fil

@@ -9,24 +9,26 @@ opacity-rule = [
"90:class_g = 'URxvt'",
"90:class_g = 'Alacritty'",
"95:class_g = 'St' && focused",
"80:class_g = 'St' && !focused",
"87:class_g = 'St' && !focused",
"95:class_g = 'cmus' && focused",
"87:class_g = 'cmus' && !focused",
"95:class_g = 'cpsrc' && focused",
"87:class_g = 'cpsrc' && !focused",
"90:class_g = 'tabbed'",
"95:class_g = 'Emacs'",
];

# Blur
blur-background = true;
blur-method = "dual_kawase";
blur-strength = 3;
#blur-method = "dual_kawase";
blur-strength = 2;
blur-background-exclude = [
"class_g = 'Dunst'"
];

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

# Rounded corners
corner-radius=20


+ 0
- 1646
.p10k.zsh
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 0
- 1
.xinitrc Visa fil

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


+ 7
- 18
.zshrc Visa fil

@@ -1,16 +1,7 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export QT_QPA_PLATFORMTHEME=gtk2
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="firefox"
export LC_CTYPE=ru_RU.UTF-8
export WECHALLUSER="rinri"
export WECHALLTOKEN="5F489-F2870-9F223-96264-58717-4AAB4"
#export FIFTPATH="/home/rinri/smartcontract/fiftlib"

# less + man
export LESS_TERMCAP_mb=$'\e[1;32m'
@@ -32,12 +23,8 @@ alias ls="ls --color"
alias ll="ls --color -l"
alias la="ls --color -A"
alias lal="ls --color -Al"
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"
alias sudo="doas"

@@ -51,7 +38,6 @@ bindkey -v
zstyle :compinstall filename '/home/rinri/.zshrc'

autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
_comp_options+=(globdots)
@@ -60,12 +46,15 @@ bindkey -s '^o' 'fzfcd\n'
bindkey -M viins '\e.' insert-last-word

# End of lines added by compinstall
source ~/src/powerlevel10k/powerlevel10k.zsh-theme
source ~/src/antigen.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
antigen bundle jeffreytse/zsh-vi-mode
antigen apply

ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=8"
ZSH_AUTOSUGGEST_STRATEGY=(history completion)

# The plugin will auto execute this zvm_after_init function
function zvm_after_init() {
source /usr/share/fzf/completion.zsh
@@ -77,6 +66,6 @@ export FZF_DEFAULT_COMMAND="fd --color=never --type f --type l --follow --exclud
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

eval "$(starship init zsh)"

+ 7
- 14
README.md Visa fil

@@ -1,36 +1,29 @@
# My configuration

- OS: [Arch Linux](https://archlinux.org)
- OS: [arch linux](https://archlinux.org)
- WM: [dwm](https://dwm.suckless.org/)
- Terminal: [st](https://st.suckless.org/)
- Editor: [neovim](https://neovim.io/)
- Editor: [doom emacs](https://github.com/doomemacs/doomemacs)
- Font: DejaVuMono Nerd Patched
- X11 Compositor: [picom](https://github.com/yshui/picom) (dual_kawase blur + rounded corners)
- X11 Compositor: [picom](https://github.com/yshui/picom)
- Music player: [cmus](https://github.com/cmus/cmus)
- Video player: [mpv](https://mpv.io/)
- Notifications: [Dunst](https://github.com/dunst-project/dunst)
- Notifications: [dunst](https://github.com/dunst-project/dunst)
- Status bar: [slstatus](https://tools.suckless.org/slstatus/)
- Wallpaper: [pixiv](https://wallhaven.cc/w/p8q1x3)
- Wallpaper: [pixiv](https://www.pixiv.net/member_illust.php?mode=medium&illust_id=47154393)

## Screenshots

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

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

### Music player:
![cmus](cmus.jpg)

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

### Notifications (dunst):
![doom emacs](emacs.jpg)

![dunst](dunst.jpg)

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

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

+ 9
- 0
X11/10-monitor.conf Visa fil

@@ -0,0 +1,9 @@
Section "Monitor"
Identifier "eDP"
EndSection

Section "Monitor"
Identifier "HDMI-A-0"
Option "RightOf" "eDP"
Option "Primary" "true"
EndSection

+ 6
- 0
X11/10-tablet.conf Visa fil

@@ -0,0 +1,6 @@
Section "InputClass"
Identifier "Tablet"
Driver "wacom"
MatchDevicePath "/dev/input/event*"
MatchUSBID "256c:006d"
EndSection

+ 5
- 0
X11/20-amdgpu.conf Visa fil

@@ -0,0 +1,5 @@
Section "Device"
Identifier "AMD Graphics"
Driver "amdgpu"
Option "TearFree" "true"
EndSection

+ 8
- 0
X11/30-touchpad.conf Visa fil

@@ -0,0 +1,8 @@
Section "InputClass"
Identifier "devname"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "ClickMethod" "clickfinger"
Option "TappingButtonMap" "lmr"
EndSection

Binär
clear.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 128 KiB Bredd: 1920  |  Höjd: 1080  |  Storlek: 283 KiB

Binär
cmus.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 294 KiB Bredd: 1920  |  Höjd: 1080  |  Storlek: 243 KiB

Binär
dunst.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 77 KiB Bredd: 1920  |  Höjd: 1080  |  Storlek: 107 KiB

Binär
emacs.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 125 KiB

Binär
firefox.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 168 KiB Bredd: 1920  |  Höjd: 1080  |  Storlek: 223 KiB

Binär
neofetch.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 130 KiB Bredd: 1920  |  Höjd: 1080  |  Storlek: 140 KiB

Binär
newwall.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 1.7 MiB

+ 3
- 0
scripts/.gitignore Visa fil

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

+ 1
- 1
scripts/daily.sh Visa fil

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

notify-send "Daily Fortune" "$(fortune|cowsay)"
/home/rinri/scripts/root-notify.sh "Daily Fortune" "$(fortune|cowsay -W 35)"

+ 0
- 1
scripts/dublicatescreen.sh Visa fil

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

+ 1
- 1
scripts/foreach.sh Visa fil

@@ -2,5 +2,5 @@

while read -r p; do
echo "Copying $p..."
cp "$p" fav
#cp "$p" fav
done

+ 0
- 3
scripts/funnymic.sh Visa fil

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

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

+ 0
- 3
scripts/kz.sh Visa fil

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

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

+ 13
- 0
scripts/mute.sh Visa fil

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

card=$(aplay -l | grep Analog | awk '{print $2}' | head -c-2)

if [ "$(amixer -c"$card" get "Capture" | grep -c "\[on\]")" -gt 0 ]; then
[ $# -ge 1 ] && amixer -c"$card" set 'Capture' nocap
[ $# -ge 1 ] && notify-send -t 700 -i "mic-off" "Microphone Muted!"
printf ""
else
[ $# -ge 1 ] && amixer -c"$card" set 'Capture' cap
[ $# -ge 1 ] && notify-send -t 700 -i "mic-on" "Microphone Activated!"
printf ""
fi

+ 0
- 3
scripts/normalmic.sh Visa fil

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

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

+ 19
- 0
scripts/playmus.sh Visa fil

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

artist="$(playerctl metadata artist)"
title="$(playerctl metadata title)"

if [ $# -ge 1 ]; then
if [ "$1" -eq 1 ]; then
playerctl play-pause
else
[ "$1" -eq 2 ] && playerctl next
[ "$1" -eq 3 ] && playerctl previous
artist="$(playerctl metadata artist)"
title="$(playerctl metadata title)"
notify-send -i "media-playback-playing" "Playing now..." "$artist - $title"
fi
else
notify-send -i "media-playback-playing" "Playing now..." "$artist - $title"
fi


+ 63
- 0
scripts/pomodoro.sh Visa fil

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

sl=25 # study session time in minutes
bl=5 # break time in minutes
bll=20 # long break time in minutes
bls=4 # number of study sessions before long break
ringtone="$HOME/Media/warcraft-soundtrack/2004 World of Warcraft/ringtone.flac"

sessions=0 # number of sessions passed
# if you kill and restart pomodoro.sh, you can specify the number of sessions passed
[ $# -gt 0 ] && sessions=$1

printf "\rStudy time! Sessions done: %d\n" "$sessions"
notify-send -i "media-playback-playing" "Study time!"
start="$(date +%s)" # start time stamp
state=0 # 0 - study, 1 - relax, 2 - long break
tl=$sl # current time limit

while :
do
now="$(date +%s)"

left=$((tl * 60 - (now - start)))

printf "\033[K\r%02d:%02d" "$((left / 60))" "$((left % 60))"

if [ $left -le 0 ]; then
printf "\033[1A\033[K"
if [ $state -eq 0 ]; then
sessions=$((sessions + 1))
if [ $((sessions % bls)) -eq 0 ]; then
state=2
printf "\rLong break time! Sessions done: %d\n" "$sessions"
notify-send -i "media-playback-paused" "Long break time!"
mpv --no-vid --no-terminal "$ringtone" &
tl=$bll
else
state=1
printf "\rBreak time! Sessions done: %d\n" "$sessions"
notify-send -i "media-playback-paused" "Break time!"
mpv --no-vid --no-terminal "$ringtone" &
tl=$bl
fi
else
state=0
printf "\rStudy time! Sessions done: %d\n" "$sessions"
notify-send -i "media-playback-playing" "Study time!"
mpv --no-vid --no-terminal "$ringtone" &
tl=$sl
fi

mpvpid=$!

printf "%s " "Press Enter to start the timer"
read ans
printf "\033[1A\033[K"

start="$(date +%s)"
kill $mpvpid 2> /dev/null
fi

sleep 1
done

+ 2
- 2
scripts/poweroff.sh Visa fil

@@ -3,8 +3,8 @@
chosen=$(echo "Shutdown\nReboot\nSuspend\nHibernate" | dmenu -i -p "Power Management")

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

+ 12
- 0
scripts/root-notify.sh Visa fil

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

#Detect the name of the display in use
display=":$(find /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)"

#Detect the user using such display
user="$(who | grep "tty1" | awk '{print $1}' | head -n 1)"

#Detect the id of the user
uid="$(id -u "$user")"

sudo -u "$user" DISPLAY="$display" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$uid"/bus notify-send "$@"

+ 0
- 3
scripts/rus.sh Visa fil

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

setxkbmap -layout us,ru -option grp:alt_shift_toggle

+ 2
- 1
scripts/screenkey.sh Visa fil

@@ -1 +1,2 @@
screenkey --opacity 0.3 -p fixed -g 350x70-10-100
#screenkey --opacity 0.3 -p fixed -g 500x70-10-100
screenkey --opacity 0.3 -p fixed -g 500x70+3320-100

+ 3
- 5
scripts/screenshot.sh Visa fil

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

if [ $# -eq 0 ]
then
magick import -window root ~/Screenshots/"$(date +%Y.%m.%d-%T)".jpg
flameshot screen -n $(($(xrandr | grep -c " connected") - 1)) -c -p ~/Screenshots/"$(date +%Y.%m.%d-%T)".jpg
else
magick import temp.jpg
xclip -selection clipboard -t image/png temp.jpg
rm temp.png
fi
flameshot gui -c
fi

+ 9
- 0
scripts/setvolume.sh Visa fil

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

# Internal speaker

# Microphone
amixer -c 1 sset 'Capture' 100%
amixer -c 1 sset 'Digital' 100%
amixer -c 1 sset 'Internal Mic Boost' 0%
amixer -c 1 sset 'Headset Mic Boost' 0%

+ 3
- 0
scripts/showcal.sh Visa fil

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

notify-send "$(printf "`cal -m`\n`cal -m +1month`")"

+ 13
- 0
scripts/update.sh Visa fil

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

#Detect the name of the display in use
display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)"

#Detect the user using such display
user="$(who | grep "tty1" | awk '{print $1}' | head -n 1)"

#Detect the id of the user
uid="$(id -u $user)"

pacman -Sy
sudo -u $user DISPLAY=$display DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus notify-send -i "view-refresh" "Packages to update: $(pacman -Qqu | wc -l)"

+ 7
- 9
scripts/xinit.sh Visa fil

@@ -2,20 +2,18 @@

lxpolkit &
slstatus &
fcitx5 &
dunst &
setxkbmap -layout us,ru -option grp:alt_shift_toggle &
xbanish &
xrdb ~/.Xresources &
wmname LG3D &
feh --bg-fill ~/walls/current.png &
picom --experimental-backends &
picom &
amixer -c 1 sset 'Master' 0%
amixer -c 1 sset 'Speaker' 0%
xautolock -time 5 -locker slock.sh &
brightnessctl set 100% &
wmname LG3D &
emacs --daemon &
eval $(gnome-keyring-daemon --start) &
flameshot &
eval "$(gnome-keyring-daemon --start)" &
export SSH_AUTH_SOCK &
#killall pulseaudio
~/scripts/start-jack.sh &
cadence &
mount ~/nextcloud &
easyeffects --gapplication-service &

Binär
vim.jpg Visa fil

Före Efter
Bredd: 1920  |  Höjd: 1080  |  Storlek: 96 KiB Bredd: 1920  |  Höjd: 1080  |  Storlek: 162 KiB

Binär
wall.kra Visa fil


Laddar…
Avbryt
Spara