1
1
mirror of https://github.com/rywng/dotfiles.git synced 2024-11-24 11:51:50 +08:00

Cleaned History

This commit is contained in:
juan 2021-08-16 22:21:31 +08:00
commit db588a6c56
25 changed files with 3237 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Vertical Candidate List
Vertical Candidate List=False
# Use Per Screen DPI
PerScreenDPI=True
# Use mouse wheel to go to prev or next page
WheelForPaging=True
# Font
Font="Sans 12"
# Menu Font
MenuFont="Sans 12"
# Use input method langauge to display text
UseInputMethodLangaugeToDisplayText=True
# Theme
Theme=Nord-Dark

View File

@ -0,0 +1,3 @@
# Hidden Notifications
HiddenNotifications=

View File

@ -0,0 +1,5 @@
# Show preedit within application
PreeditInApplication=True
# Commit current text when deactivating
Commit when deactivate=True

View File

@ -0,0 +1,5 @@
[ProviderOrder]
0=Presage
1=Custom
2=Enchant

62
.config/fcitx5/config Normal file
View File

@ -0,0 +1,62 @@
[Hotkey]
# Enumerate when press trigger key repeatedly
EnumerateWithTriggerKeys=True
# Temporally switch between first and current Input Method
AltTriggerKeys=
# Enumerate Input Method Forward
EnumerateForwardKeys=
# Enumerate Input Method Backward
EnumerateBackwardKeys=
# Skip first input method while enumerating
EnumerateSkipFirst=False
# Enumerate Input Method Group Forward
EnumerateGroupForwardKeys=
# Enumerate Input Method Group Backward
EnumerateGroupBackwardKeys=
# Activate Input Method
ActivateKeys=
# Deactivate Input Method
DeactivateKeys=
[Hotkey/TriggerKeys]
#0=Control+space
[Hotkey/PrevPage]
0=Up
[Hotkey/NextPage]
0=Down
[Hotkey/PrevCandidate]
0=Shift+Tab
[Hotkey/NextCandidate]
0=Tab
[Hotkey/TogglePreedit]
0=Control+Alt+P
[Behavior]
# Active By Default
ActiveByDefault=False
# Share Input State
ShareInputState=All
# Show preedit in application
PreeditEnabledByDefault=True
# Show Input Method Information when switch input method
ShowInputMethodInformation=True
# Show Input Method Information when changing focus
showInputMethodInformationWhenFocusIn=True
# Show compact input method information
CompactInputMethodInformation=True
# Show first input method information
ShowFirstInputMethodInformation=True
# Default page size
DefaultPageSize=5
# Force Enabled Addons
EnabledAddons=
# Force Disabled Addons
DisabledAddons=
# Preload input method to be used by default
PreloadInputMethod=True

View File

@ -0,0 +1,39 @@
background #161821
foreground #c6c8d1
selection_background #1e2132
selection_foreground #c6c8d1
cursor #d2d4de
# black
color0 #161821
color8 #6b7089
# red
color1 #e27878
color9 #e98989
# green
color2 #b4be82
color10 #c0ca8e
# yellow/orange
color3 #e2a478
color11 #e9b189
# blue
color4 #84a0c6
color12 #91acd1
# magenta/purple
color5 #a093c7
color13 #ada0d3
# cyan
color6 #89b8c2
color14 #95c4ce
# white
color7 #c6c8d1
color15 #d2d4de

1313
.config/kitty/kitty.conf Normal file

File diff suppressed because it is too large Load Diff

43
.config/kitty/nord.conf Normal file
View File

@ -0,0 +1,43 @@
# Nord Colorscheme for Kitty
# Based on:
# - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192
# - https://github.com/arcticicestudio/nord-hyper
foreground #D8DEE9
background #2E3440
selection_foreground #000000
selection_background #FFFACD
url_color #0087BD
cursor #81A1C1
# black
color0 #3B4252
color8 #4C566A
# red
color1 #BF616A
color9 #BF616A
# green
color2 #A3BE8C
color10 #A3BE8C
# yellow
color3 #EBCB8B
color11 #EBCB8B
# blue
color4 #81A1C1
color12 #81A1C1
# magenta
color5 #B48EAD
color13 #B48EAD
# cyan
color6 #88C0D0
color14 #8FBCBB
# white
color7 #E5E9F0
color15 #ECEFF4

59
.config/lf/lfrc Normal file
View File

@ -0,0 +1,59 @@
set shell sh
set ifs "\n"
set hidden true
set drawbox true
set icons true
set ignorecase true
set info size
map D push %rm<space>-rf<space>$fs
map a push %mkdir<space>
map x $$f
# bulk-rename
cmd bulk-rename ${{
old="$(mktemp)"
new="$(mktemp)"
[ -n "$fs" ] && fs="$(ls)"
printf '%s\n' "$fs" >"$old"
printf '%s\n' "$fs" >"$new"
$EDITOR "$new"
[ "$(wc -l "$new")" -ne "$(wc -l "$old")" ] && exit
paste "$old" "$new" | while IFS= read -r names; do
src="$(printf '%s' "$names" | cut -f1)"
dst="$(printf '%s' "$names" | cut -f2)"
if [ "$src" = "$dst" ] || [ -e "$dst" ]; then
continue
fi
mv -- "$src" "$dst"
done
rm -- "$old" "$new"
lf -remote "send $id unselect"
}}
# new folder
cmd newfold ${{
set -f
read newd
mkdir -- "$newd"
mv -- $fx "$newd"
}}
#save file name selected
cmd savesel ${{
echo $fs > args-selected-`pwgen -1`.txt
}}
cmd extract ${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}
#vim:set noet sts=0 sw=2 ts=8:

87
.config/mpd/mpd.conf Normal file
View File

@ -0,0 +1,87 @@
# general settings #
####
music_directory "~/Music"
playlist_directory "~/.config/mpd/playlists"
db_file "~/.config/mpd/database"
log_file "~/.config/mpd/log"
pid_file "~/.config/mpd/pid"
state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
###############################################################################
user "juan"
#group "audio"
# For network
bind_to_address "127.0.0.1"
#
# And for Unix Socket
#bind_to_address "~/.config/mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
port "6600"
#log_level "notice"
restore_paused "yes"
auto_update "yes"
#auto_update_depth "3"
# Zeroconf / Avahi Service Discovery ##########################################
#
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#
#zeroconf_enabled "yes"
#
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network. %h will be replaced with the hostname.
#
#zeroconf_name "Music Player @ %h"
#
###############################################################################
# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# setting can be specified multiple times for different password profiles.
#
#password "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in.
#
#default_permissions "read,add,control,admin"
#
###############################################################################
#
input {
plugin "curl"
}
audio_output {
type "alsa"
name "alsa"
mixer_type "software"
}
# Visualization
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
###############################################################################
replaygain "auto"
replaygain_limit "yes"
volume_normalization "yes"
###############################################################################
# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#
filesystem_charset "UTF-8"
#
###############################################################################

524
.config/ncmpcpp/config Normal file
View File

@ -0,0 +1,524 @@
# vi:syntax=config
ncmpcpp_directory = ~/.config/ncmpcpp
lyrics_directory = ~/.lyrics
mpd_host = 127.0.0.1
mpd_port = 6600
mpd_connection_timeout = 5
mpd_music_dir = ~/Music
mpd_crossfade_time = 1
visualizer_data_source = /tmp/mpd.fifo
visualizer_output_name = Visualizer feed
visualizer_in_stereo = yes
#
##
## Note: set below to >=10 only if you have synchronization issues with
## visualization and audio.
##
#
#visualizer_sync_interval = 0
#
##
## Note: To enable spectrum frequency visualization you need to compile ncmpcpp
## with fftw3 support.
##
#
## Available values: spectrum, wave, wave_filled, ellipse.
##
visualizer_type = spectrum
#
visualizer_fps = 60
#
visualizer_autoscale = no
#
visualizer_look = ●▮
#
visualizer_color = blue
#
## Alternative subset of 256 colors for terminals that support it.
##
#visualizer_color = 47, 83, 119, 155, 191, 227, 221, 215, 209, 203, 197, 161
#
##
## Note: The next few visualization options apply to the spectrum visualizer.
##
#
## Use unicode block characters for a smoother, more continuous look.
## This will override the visualizer_look option. With transparent terminals
## and visualizer_in_stereo set, artifacts may be visible on the bottom half of
## the visualization.
#
visualizer_spectrum_smooth_look = yes
#
## A value between 1 and 5 inclusive. Specifying a larger value makes the
## visualizer look at a larger slice of time, which results in less jumpy
## visualizer output.
#
visualizer_spectrum_dft_size = 2
#
visualizer_spectrum_gain = 7
#
## Left-most frequency of visualizer in Hz, must be less than HZ MAX
#
visualizer_spectrum_hz_min = 20
#
## Right-most frequency of visualizer in Hz, must be greater than HZ MIN
#
visualizer_spectrum_hz_max = 20000
#
##### system encoding #####
##
## ncmpcpp should detect your charset encoding but if it failed to do so, you
## can specify charset encoding you are using here.
##
## Note: You can see whether your ncmpcpp build supports charset detection by
## checking output of `ncmpcpp --version`.
##
## Note: Since MPD uses UTF-8 by default, setting this option makes sense only
## if your encoding is different.
##
#
#system_encoding = ""
#
##### delays #####
#
## Time of inactivity (in seconds) after playlist highlighting will be disabled
## (0 = always on).
##
#playlist_disable_highlight_delay = 5
#
## Defines how long messages are supposed to be visible.
##
#message_delay_time = 5
#
##### song format #####
##
## For a song format you can use:
##
## %l - length
## %f - filename
## %D - directory
## %a - artist
## %A - album artist
## %t - title
## %b - album
## %y - date
## %n - track number (01/12 -> 01)
## %N - full track info (01/12 -> 01/12)
## %g - genre
## %c - composer
## %p - performer
## %d - disc
## %C - comment
## %P - priority
## $R - begin right alignment
##
## If you want to make sure that a part of the format is displayed only when
## certain tags are present, you can archieve it by grouping them with brackets,
## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are
## present or '' otherwise. It is also possible to define a list of
## alternatives by providing several groups and separating them with '|',
## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is
## not present.
##
## Note: If you want to set limit on maximal length of a tag, just put the
## appropriate number between % and character that defines tag type, e.g. to
## make album take max. 20 terminal cells, use '%20b'.
##
## In addition, formats support markers used for text attributes. They are
## followed by character '$'. After that you can put:
##
## - 0 - default window color (discards all other colors)
## - 1 - black
## - 2 - red
## - 3 - green
## - 4 - yellow
## - 5 - blue
## - 6 - magenta
## - 7 - cyan
## - 8 - white
## - 9 - end of current color
## - b - bold text
## - u - underline text
## - r - reverse colors
## - a - use alternative character set
##
## If you don't want to use a non-color attribute anymore, just put it again,
## but this time insert character '/' between '$' and attribute character,
## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with
## reversed colors.
##
## If you want to use 256 colors and/or background colors in formats (the naming
## scheme is described below in section about color definitions), it can be done
## with the syntax $(COLOR), e.g. to set the artist tag to one of the
## non-standard colors and make it have yellow background, you need to write
## $(197_yellow)%a$(end). Note that for standard colors this is interchangable
## with attributes listed above.
##
## Note: colors can be nested.
##
#
#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3%l$9}
#
#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
#
#song_library_format = {%n - }{%t}|{%f}
#
#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
#
alternative_header_second_line_format = {{$7$b%a$/b$9}{ - $7%b$9}}|{%D}
#
current_item_prefix = $6$r
#
current_item_suffix = $/r$(end)
#
#current_item_inactive_column_prefix = $(white)$r
#
#current_item_inactive_column_suffix = $/r$(end)
#
now_playing_prefix = $u$b
#
now_playing_suffix = $/u$/b
#
#browser_playlist_prefix = "$2playlist$9 "
#
#selected_item_prefix = $6
#
#selected_item_suffix = $9
#
#modified_item_prefix = $3> $9
#
##
## Note: attributes are not supported for the following variables.
##
#song_window_title_format = {%a - }{%t}|{%f}
##
## Note: Below variables are used for sorting songs in browser. The sort mode
## determines how songs are sorted, and can be used in combination with a sort
## format to specify a custom sorting format. Available values for
## browser_sort_mode are "type", "name", "mtime", "format" and "none".
##
#
#browser_sort_mode = type
#
#browser_sort_format = {%a - }{%t}|{%f} {%l}
#
##### columns settings #####
##
## syntax of song columns list format is "column column etc."
##
## - syntax for each column is:
##
## (width of the column)[color of the column]{displayed tag}
##
## Note: Width is by default in %, if you want a column to have fixed size, add
## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of
## screen (so the real width will depend on actual screen size), whereas
## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen
## is.
##
## - color is optional (if you want the default one, leave the field empty).
##
## Note: You can give a column additional attributes by putting appropriate
## character after displayed tag character. Available attributes are:
##
## - r - column will be right aligned
## - E - if tag is empty, empty tag marker won't be displayed
##
## You can also:
##
## - give a column custom name by putting it after attributes, separated with
## character ':', e.g. {lr:Length} gives you right aligned column of lengths
## named "Length".
##
## - define sequence of tags, that have to be displayed in case predecessor is
## empty in a way similar to the one in classic song format, i.e. using '|'
## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to
## display artist tag and then composer and performer if previous ones are not
## available.
##
#
song_columns_list_format = (20)[]{a} (6f)[cyan]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[blue]{l}
#
##### various settings #####
#
##
## Note: Custom command that will be executed each time song changes. Useful for
## notifications etc.
##
execute_on_song_change = notify-send "$(mpc --format '%title% - %artist%' current)" -t 5000
#
##
## Note: Custom command that will be executed each time player state
## changes. The environment variable MPD_PLAYER_STATE is set to the current
## state (either unknown, play, pause, or stop) for its duration.
##
#
#execute_on_player_state_change = ""
#
#playlist_show_mpd_host = no
#
playlist_show_remaining_time = yes
#
playlist_shorten_total_times = yes
#
#playlist_separate_albums = no
#
##
## Note: Possible display modes: classic, columns.
##
#playlist_display_mode = columns
#
browser_display_mode = classic
#
#search_engine_display_mode = classic
#
#playlist_editor_display_mode = classic
#
#discard_colors_if_item_is_selected = yes
#
#show_duplicate_tags = yes
#
#incremental_seeking = yes
#
#seek_time = 1
#
#volume_change_step = 2
#
autocenter_mode = yes
#
centered_cursor = yes
#
##
## Note: You can specify third character which will be used to build 'empty'
## part of progressbar.
##
progressbar_look = =>-
#
## Available values: database, playlist.
##
#default_place_to_search_in = database
#
## Available values: classic, alternative.
##
user_interface = alternative
#
data_fetching_delay = yes
#
## Available values: artist, album_artist, date, genre, composer, performer.
##
#media_library_primary_tag = artist
#
#media_library_albums_split_by_date = yes
#
#media_library_hide_album_dates = no
#
## Available values: wrapped, normal.
##
#default_find_mode = wrapped
#
#default_tag_editor_pattern = %n - %t
#
#header_visibility = yes
#
#statusbar_visibility = yes
#
## Show the "Connected to ..." message on startup
#connected_message_on_startup = yes
#
#titles_visibility = yes
#
#header_text_scrolling = yes
#
#cyclic_scrolling = no
#
lyrics_fetchers = genius, musixmatch, sing365, metrolyrics, azlyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet
#
follow_now_playing_lyrics = yes
#
fetch_lyrics_for_current_song_in_background = no
#
store_lyrics_in_song_dir = yes
#
#generate_win32_compatible_filenames = yes
#
allow_for_physical_item_deletion = yes
#
##
## Note: If you set this variable, ncmpcpp will try to get info from last.fm in
## language you set and if it fails, it will fall back to english. Otherwise it
## will use english the first time.
##
## Note: Language has to be expressed as an ISO 639 alpha-2 code.
##
#lastfm_preferred_language = en
#
space_add_mode = add_remove
#
#show_hidden_files_in_local_browser = no
#
##
## How shall screen switcher work?
##
## - "previous" - switch between the current and previous screen.
## - "screen1,...,screenN" - switch between given sequence of screens.
##
## Screens available for use: help, playlist, browser, search_engine,
## media_library, playlist_editor, tag_editor, outputs, visualizer, clock,
## lyrics, last_fm.
##
screen_switcher_mode = playlist, media_library, playlist_editor, visualizer, help
#
##
## Note: You can define startup screen by choosing screen from the list above.
##
#startup_screen = playlist
#
##
## Note: You can define startup slave screen by choosing screen from the list
## above or an empty value for no slave screen.
##
startup_slave_screen = ""
#
#startup_slave_screen_focus = no
#
##
## Default width of locked screen (in %). Acceptable values are from 20 to 80.
##
#
#locked_screen_width_part = 50
#
#ask_for_locked_screen_width_part = yes
#
#jump_to_now_playing_song_at_start = yes
#
#ask_before_clearing_playlists = yes
#
#clock_display_seconds = no
#
display_volume_level = yes
#
display_bitrate = yes
#
#display_remaining_time = no
#
## Available values: none, basic, extended, perl.
##
#regular_expressions = perl
#
##
## Note: if below is enabled, ncmpcpp will ignore leading "The" word while
## sorting items in browser, tags in media library, etc.
##
#ignore_leading_the = no
#
##
## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and
## filtering lists. This takes an effect only if boost was compiled with ICU
## support.
##
#ignore_diacritics = no
#
#block_search_constraints_change_if_items_found = yes
#
#mouse_support = yes
#
#mouse_list_scroll_whole_page = no
#
#lines_scrolled = 5
#
#empty_tag_marker = <empty>
#
#tags_separator = " | "
#
#tag_editor_extended_numeration = no
#
#media_library_sort_by_mtime = no
#
#enable_window_title = yes
#
##
## Note: You can choose default search mode for search engine. Available modes
## are:
##
## - 1 - use mpd built-in searching (no regexes, pattern matching)
##
## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but
## if your mpd is on a remote machine, downloading big database to process
## it can take a while
##
## - 3 - match only exact values (this mode uses mpd function for searching in
## database and local one for searching in current playlist)
##
#
#search_engine_default_search_mode = 1
#
external_editor = nvim
#
## Note: set to yes if external editor is a console application.
##
use_console_editor = yes
#
##### colors definitions #####
##
## It is possible to set a background color by setting a color value
## "<foreground>_<background>", e.g. red_black will set foregound color to red
## and background color to black.
##
## In addition, for terminals that support 256 colors it is possible to set one
## of them by using a number in range [1, 256] instead of color name,
## e.g. numerical value corresponding to red_black is 2_1. To find out if the
## terminal supports 256 colors, run ncmpcpp and check out the bottom of the
## help screen for list of available colors and their numerical values.
##
## What is more, there are two special values for the background color:
## "transparent" and "current". The first one explicitly sets the background to
## be transparent, while the second one allows you to preserve current
## background color and change only the foreground one. It's used implicitly
## when background color is not specified.
##
## Moreover, it is possible to attach format information to selected color
## variables by appending to their end a colon followed by one or more format
## flags, e.g. black:b or red:ur. The following variables support this syntax:
## visualizer_color, color1, color2, empty_tag_color, volume_color,
## state_line_color, state_flags_color, progressbar_color,
## progressbar_elapsed_color, player_state_color, statusbar_time_color,
## alternative_ui_separator_color.
##
## Note: due to technical limitations of older ncurses version, if 256 colors
## are used there is a possibility that you'll be able to use only colors with
## transparent background.
#
colors_enabled = yes
#
empty_tag_color = cyan
#
header_window_color = cyan
#
volume_color = green
#
state_line_color = magenta
#
state_flags_color = magenta:b
#
main_window_color = blue
#
color1 = white
#
color2 = blue
#
progressbar_color = black:b
#
progressbar_elapsed_color = cyan:b
#
statusbar_color = magenta
#
statusbar_time_color = cyan:b
#
player_state_color = yellow:b
#
alternative_ui_separator_color = black:b
#
window_border_color = black
#
active_window_border = red
#

116
.config/nvim/conf.d/coc.vim Normal file
View File

@ -0,0 +1,116 @@
"settings suggested by coc.
set hidden " Text Edit suggestion by coc
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
" Don't pass messages to |ins-completion-menu|.
set shortmess+=c
" Map <tab> for trigger completion, completion confirm, snippet expand and jump
inoremap <silent><expr> <TAB>
\ pumvisible() ? coc#_select_confirm() :
\ coc#expandableOrJumpable() ?
\ "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
let g:coc_snippet_next = '<tab>'
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Make <CR> notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
" (I disabled enter to confirm.)
inoremap <silent><expr> <cr> "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
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)
" 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)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" 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
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('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 CocAction('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-stats` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" 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>
" open COc yank
nnoremap <silent> <space>y :<C-u>CocList -A --normal yank<cr>

127
.config/nvim/init.vim Normal file
View File

@ -0,0 +1,127 @@
call plug#begin('~/.config/nvim/plugged')
" looks
Plug 'vim-airline/vim-airline' " airline for vim
Plug 'ryanoasis/vim-devicons' " adds many icons
Plug 'airblade/vim-gitgutter' " git changes on left.
Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } " colors
Plug 'mhinz/vim-startify' " start page
Plug 'tomasiser/vim-code-dark' " colorscheme
Plug 'cocopon/iceberg.vim'
" misc
Plug 'vimwiki/vimwiki' " for my note taking.
Plug 'gentoo/gentoo-syntax' " syntax for gentoo related files
" Coding
Plug 'neoclide/coc.nvim', {'branch': 'release'} " code completion
Plug 'chiel92/vim-autoformat' " used to remove trailing spaces.
Plug 'honza/vim-snippets' " snippet supprt.
Plug 'szw/vim-maximizer' " maximizing panel
Plug 'mfussenegger/nvim-dap' " Inspector for vim
Plug 'rcarriga/nvim-dap-ui' " UI for dap
" functions
Plug 'machakann/vim-sandwich' " surrounding
Plug 'preservim/nerdcommenter' " comment out things
Plug 'nvim-lua/popup.nvim' " dependency of teltscope
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim' " replacement of ctrlp
Plug 'tpope/vim-repeat' " repeat support for stuff
Plug 'tpope/vim-fugitive' " Git support.
Plug 'easymotion/vim-easymotion' " better motion!!
Plug 'godlygeek/tabular' " for OCD people.
Plug 'dhruvasagar/vim-table-mode' " Taking notes in vim
" trees and bars
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'preservim/tagbar' " press <F8> to get a tagbar.
call plug#end()
colorscheme iceberg
set termguicolors
set relativenumber
set number
set shiftwidth=2
set mouse=a
set ignorecase smartcase
set noshowmode
set smartindent
set scrolloff=10
" plugin settings
source ~/.config/nvim/conf.d/*
let g:startify_custom_header = 'startify#pad(startify#fortune#boxed())'
let g:startify_lists = [
\ { 'type': 'dir', 'header': [' MRU @ '. getcwd()] },
\ { 'type': 'sessions', 'header': [' Sessions'] },
\ { 'type': 'bookmarks', 'header': [' Bookmarks'] },
\ { 'type': 'commands', 'header': [' Commands'] },
\ ]
let g:startify_commands = [
\ {'w': ['Open Vim Wiki', ':VimwikiIndex']},
\ ]
let g:startify_custom_indices = [
\ 'a', 'd', 'f', 'l', ';', 'g']
let g:startify_skiplist = [
\ '^/tmp',
\ escape(fnamemodify($HOME, ':p'), '\') .'Documents/Personal/Wiki',
\ escape(fnamemodify($HOME, ':p'), '\') .'Encrypted',
\ escape(fnamemodify($HOME, ':p'), '\') .'.config/yadm/repo.git',
\ ]
let g:Hexokinase_ftDisabled = ['css']
let g:vimwiki_list = [{'path': '~/Documents/Personal/Wiki/',
\ 'syntax': 'markdown', 'ext': '.md'}]
" only enable vimwiki in wiki folder
let g:vimwiki_global_ext = 0
lua require("dapui").setup()
" keybindings (except for coc)
" Telescope
" Find files using Telescope command-line sugar.
nnoremap <leader>tf <cmd>Telescope fd<cr>
nnoremap <leader>tg <cmd>Telescope live_grep<cr>
nnoremap <leader>tb <cmd>Telescope buffers<cr>
nnoremap <leader>th <cmd>Telescope help_tags<cr>
" nerdtree tagbar coc formatter.
nnoremap <F12> <cmd>lua require("dapui").toggle()<cr>
nnoremap <F2> <cmd>Format<CR>
nnoremap <F8> <cmd>TagbarToggle<CR>
nnoremap <C-n> <cmd>NERDTreeToggle<CR>
nnoremap <C-l> <cmd>NERDTreeFind<CR>
" easymotion
nmap <space>f <Plug>(easymotion-f)
nmap <space>F <Plug>(easymotion-F)
nmap <space>l <Plug>(easymotion-lineanywhere)
nmap <space>j <Plug>(easymotion-j)
nmap <space>k <Plug>(easymotion-k)
nmap <space>w <Plug>(easymotion-w)
nmap <space>W <Plug>(easymotion-W)
nmap <space>b <Plug>(easymotion-b)
nmap <space>b <Plug>(easymotion-B)
" fix intending.
vmap < <gv
vmap > >gv
" Shortcutting split navigation
map <A-h> <C-w>h
map <A-j> <C-w>j
map <A-k> <C-w>k
map <A-l> <C-w>l
map <A-H> <C-w>H
map <A-J> <C-w>J
map <A-K> <C-w>K
map <A-L> <C-w>L
map <A->> <C-w>>
map <A-<> <C-w><
" Tab shortcuts
nnoremap <A-p> :tabp<CR>
nnoremap <A-n> :tabn<CR>
" map Alt + q to exit terminal mode.
tnoremap <A-q> <C-\><C-n>

View File

@ -0,0 +1,39 @@
local dap = require('dap')
dap.adapters.lldb = {
type = 'executable',
command = '/usr/bin/lldb', -- adjust as needed
name = "lldb"
}
local dap = require('dap')
dap.configurations.cpp = {
{
name = "Launch",
type = "lldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {},
-- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
--
-- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
--
-- Otherwise you might get the following error:
--
-- Error on launch: Failed to attach to the target process
--
-- But you should be aware of the implications:
-- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
runInTerminal = false,
},
}
-- If you want to use this for rust and c, add something like this:
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp

View File

@ -0,0 +1,152 @@
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term kitty
set $menu wofi | xargs swaymsg exec --
output * bg $(find /home/juan/Pictures/Wallpapers/. -type f | shuf -n1) fill
output DP-3 mode 2560x1440@144Hz
input * xkb_numlock enable
input "5426:92:Razer_Razer_DeathAdder_Elite" {
accel_profile flat
pointer_accel -0.5
}
###CUSTOMIZATION START###
#my keybinds
bindsym $mod+Ctrl+l exec swaylock -c 000000 -f
bindsym $mod+Print exec grim ~/Pictures/Screenshots/$(date +'%s_grim.png'); \
exec notify-send -t 3000 'Screenshot saved.'
exec fcitx
exec wlsunset -l 30.4 -L 104.0 -T 6500 -t 3500
#set gtk theme
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Materia-dark'
gsettings set $gnome-schema icon-theme 'Arc'
#gsettings set $gnome-schema cursor-theme 'cursor theme name'
gsettings set $gnome-schema font-name 'ibm-plex 12'
}
#set colour
#color class border backgr. text indicator child_border
client.focused #b48ead #2e3440 #eceff4 #88c0d0 #b48ead
client.focused_inactive #4c566a #2e3440 #eceff4 #88c0d0 #4c566a
client.unfocused #4c566a #2e3440 #eceff4 #88c0d0 #4c566a
client.urgent #bf616a #2e3440 #eceff4 #88c0d0 #bf616a
client.placeholder #4c566a #2e3440 #eceff4 #88c0d0 #4c566a
client.background #2e3440
#bind fn keys
bindsym XF86AudioMicMute exec amixer set Capture toggle
exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob
bindsym XF86AudioRaiseVolume exec amixer sset Master 3%+ | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $SWAYSOCK.wob
bindsym XF86AudioLowerVolume exec amixer sset Master 3%- | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $SWAYSOCK.wob
bindsym XF86AudioMute exec amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > $SWAYSOCK.wob
#borders stuff
default_border pixel 2
workspace_auto_back_and_forth yes
force_display_urgency_hint 500 ms
gaps inner 40
###END###
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+w kill
# Start your launcher
bindsym $mod+Shift+Return exec $menu
floating_modifier $mod normal
bindsym $mod+Ctrl+r reload
bindsym $mod+Ctrl+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 0
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 0
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+c splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent or child container
bindsym $mod+a focus parent
bindsym $mod+z focus child
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
mode "resize" {
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
bar swaybar_command waybar
include /etc/sway/config.d/*

View File

@ -0,0 +1,151 @@
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term kitty
set $menu wofi | xargs swaymsg exec --
output * bg $(find /home/juan/Pictures/Wallpapers/. -type f | shuf -n1) fill
###CUSTOMIZATION START###
##starting userspace software
exec wlsunset -l 30.4 -L 104.0 -T 6500 -t 3500
exec --no-startup-id pipewire
exec mako
exec light -S 70
#my keybinds
bindsym $mod+Ctrl+l exec ~/.config/sway/scripts/logout.sh
bindsym $mod+Print exec grim ~/Pictures/Screenshots/$(date +'%H:%M_%y%m%d.png'); \
exec notify-send -t 3000 'Screenshot saved.'
#set gtk theme
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Materia-dark'
gsettings set $gnome-schema icon-theme 'Arc'
#gsettings set $gnome-schema cursor-theme 'cursor theme name'
gsettings set $gnome-schema font-name 'ibm-plex 12'
export XDG_CURRENT_DESKTOP=Unity
}
#set colour
#color class border backgr. text indicator child_border
client.focused #a093c7 #161821 #d2d4de #84a0c6 #a093c7
client.focused_inactive #6b7089 #161821 #d2d4de #84a0c6 #6b7089
client.unfocused #6b7089 #161821 #d2d4de #84a0c6 #6b7089
client.urgent #e27878 #161821 #d2d4de #84a0c6 #bf616a
client.placeholder #6b7089 #161821 #d2d4de #84a0c6 #6b7089
client.background #6b7089
#2e3440
#bind fn keys
bindsym XF86AudioMicMute exec amixer set Capture toggle
exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob
bindsym XF86AudioRaiseVolume exec amixer sset Master 2048+ | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $SWAYSOCK.wob
bindsym XF86AudioLowerVolume exec amixer sset Master 2048- | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $SWAYSOCK.wob
bindsym XF86AudioMute exec amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > $SWAYSOCK.wob
bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob
bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob
#borders stuff
default_border pixel 2
workspace_auto_back_and_forth yes
force_display_urgency_hint 500 ms
smart_borders no_gaps
#floating thingys
bindsym $mod+Ctrl+s floating toggle ; sticky toggle ; resize set 800 600 ; move position 55ppt 5ppt
# swap caps and ctrl on PS-2 keyboard
input 1:1:AT_Translated_Set_2_keyboard {
xkb_options "ctrl:swapcaps"
}
###END###
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+w kill
# Start your launcher
bindsym $mod+Shift+Return exec $menu
floating_modifier $mod normal
bindsym $mod+Ctrl+r reload
bindsym $mod+Ctrl+q exit
# Change fcitx IME
bindsym $mod+Ctrl+space exec fcitx5-remote -t
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# resize windows
bindsym $mod+less resize shrink width 20px
bindsym $mod+greater resize grow width 20px
bindsym $mod+minus resize shrink height 20px
bindsym $mod+plus resize grow height 20px
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+c splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent or child container
bindsym $mod+a focus parent
bindsym $mod+z focus child
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+0 move scratchpad
bindsym $mod+0 scratchpad show
bar swaybar_command waybar
include /etc/sway/config.d/*

20
.config/sway/scripts/logout.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
choice=`echo "shutdown\npoweroff\nreboot\nlock" | wofi -d -Oalphabetical`
if test "$choice" = lock ; then
tmp=/tmp/lockscreen.bmp
grim - | magick - -blur 0x6 $tmp
bright=`light`
swayidle -w \
timeout 5 "light -S 1" resume "light -S $bright" \
timeout 10 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
&
idlepid=$!
swaylock -e -i $tmp -c 000000 --inside-color 00000003
kill $idlepid
rm $tmp
swaymsg "output * dpms on"
light -S $bright
return 0
fi
loginctl $choice

41
.config/tmux/tmux.conf Normal file
View File

@ -0,0 +1,41 @@
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin "arcticicestudio/nord-tmux"
#set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# FILE: iceberg_minimal.tmux.conf
# REPO: https://github.com/gkeep/iceberg-dark
# MAINTAINER: gkeep <gkeep77@protonmail.com>
set -g status-position bottom
set -g status-justify centre
set -g status-style "bg=#1e2132"
set -g window-style ""
set -g window-active-style ""
# modules
module_left_1="#h"
module_left_2="#{client_width}x#{client_height}"
module_right_1="%a %d %b"
module_right_2="%R %Z"
set -g status-left " #[fg=#c6c8d1]$module_left_1 #[fg=#6b7089]$module_left_2"
set -g status-left-style ""
set -g status-left-length 50
set -g status-right "$module_right_1 #[fg=#c6c8d1]$module_right_2 "
set -g status-right-style "fg=#6b7089"
set -g status-right-length 25
set -g window-status-current-style "bold"
set -g window-status-style "fg=#6b7089"
set -g window-status-format " #[fg=#c6c8d1]#{?#{==:#W,fish},#{b:pane_current_path},#W}#F "
set -g window-status-current-format " #[fg=#c6c8d1]#{?#{==:#W,fish},#{b:pane_current_path},#W}#F "
set -g window-status-separator ""
set -g pane-active-border-style "fg=#6b7089"
set -g pane-border-style "fg=#6b7089"
run '~/.tmux/plugins/tpm/tpm'

73
.config/waybar/config Normal file
View File

@ -0,0 +1,73 @@
{
"layer": "top", // Waybar at top layer
"height": 24, // Waybar height (to be removed for auto height)
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "custom/media","sway/window"],
"modules-center": [],
"modules-right": ["tray","mpd","custom/weather","network","battery","clock"],
"mpd": {
"format": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} {stateIcon}",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"format-disconnected": "Disconnected ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
"on": " "
},
"random-icons": {
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
"spacing": 10
},
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"battery": {
"states": {
"good": 80,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"custom/weather": {
"exec": "sleep 10 && curl 'wttr.in/?format=%t+(%f)+%c' || echo 'No weather data '",
"interval": 1800
}
}

85
.config/waybar/style.css Normal file
View File

@ -0,0 +1,85 @@
* {
border: none;
border-radius: 0;
font-size: 14px;
min-height: 0;
color: #c6c8d1;
}
window#waybar {
background: rgba(30, 33, 50, 0.9);
}
#workspaces {
margin: 5px;
margin-left: 10px;
margin-right: 10px;
border-radius: 2px;
}
#workspaces button {
padding: 0 4px;
}
#workspaces button.focused {
background: rgba(160, 147, 199, 0.5);
border-radius: 2px;
}
#workspaces button:hover {
background-color: rgba(173, 160, 211, 0.2);
border-radius: 2px;
}
#workspaces button.urgent {
background-color: #e27878;
border-radius: 2px;
}
#clock,
#battery,
#network,
#mpd,
#custom-weather {
background-color: #161821;
padding: 0px 10px;
margin: 5px 0px;
}
#clock {
border-radius: 0px 2px 2px 0px;
margin-right: 10px;
}
@keyframes blink {
to {
background-color: #d2d4de;
color: #161821;
}
}
#battery.charging {
color: #b4be82;
}
#battery.critical:not(.charging) {
background-color: #e98989;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#mpd {
border-radius: 2px 0px 0px 2px;
margin-left: 10px;
}
#mode {
background-color: #89b8c2;
padding: 0px 5px 0px 5px;
margin: 5px;
margin-left: 0px;
margin-right: 10px;
border-radius: 2px;
}

12
.config/wofi/config Normal file
View File

@ -0,0 +1,12 @@
style=/home/juan/.config/wofi/style.css
xoffset=660
yoffset=275
show=drun
width=600
height=500
always_parse_args=true
show_all=true
print_command=true
layer=overlay
insensitive=true
prompt=

55
.config/wofi/style.css Normal file
View File

@ -0,0 +1,55 @@
window {
margin: 0px;
border: 2px solid #6b7089;
border-radius: 2px;
background-color: #161821;
font-family: monospace;
font-size: 14px;
}
#input {
margin: 5px;
border: 1px solid #1e2132;
color: #d2d4de;
background-color: #161821;
}
#input image {
color: #d2d4de;
}
#inner-box {
margin: 5px;
border: none;
background-color: #161821;
}
#outer-box {
margin: 5px;
border: none;
background-color: #161821;
}
#scroll {
margin: 0px;
border: none;
}
#text {
margin: 5px;
border: none;
color: #d2d4de;
}
#entry:selected {
background-color: #1e2132;
border-radius: 3px;
font-weight: normal;
}
#text:selected {
background-color: #1e2132;
border-radius: 3px;
font-weight: normal;
}

38
.config/zathura/zathurarc Normal file
View File

@ -0,0 +1,38 @@
set window-title-basename "true"
set selection-clipboard "clipboard"
set recolor "true"
# Base16 Nord
# Author: arcticicestudio
set default-bg "#161821"
set default-fg "#1e2132"
set statusbar-fg "#6b7089"
set statusbar-bg "#161821"
set inputbar-bg "#161821"
set inputbar-fg "#84a0c6"
set notification-bg "#161821"
set notification-fg "#91acd1"
set notification-error-bg "#161821"
set notification-error-fg "#e27878"
set notification-warning-bg "#161821"
set notification-warning-fg "#e27878"
set highlight-color "#e2a478"
set highlight-active-color "#91acd1"
set completion-bg "#161821"
set completion-fg "#84a0c6"
set completion-highlight-fg "#95c4ce"
set completion-highlight-bg "#a093c7"
set recolor-lightcolor "#161821"
set recolor-darkcolor "#c6c8d1"

149
.zshrc Normal file
View File

@ -0,0 +1,149 @@
echo '\033[0;36m ___ ___ ___ ___ '
echo '\033[0;36m /\ \ /\__\ /\ \ /\__\ '
echo '\033[0;36m _\:\ \ /:/ _/_ /::\ \ /:| _|_ '
echo '\033[0;36m /\/::\__\/:/_/\__\/::\:\__\/::|/\__\ '
echo '\033[0;36m \::/\/__/\:\/:/ /\/\::/ /\/|::/ / '
echo '\033[0;36m \/__/ \::/ / /:/ / |:/ / '
echo '\033[0;36m \/__/ \/__/ \/__/ '
echo '\033[0;36m '
echo '\033[0;35m /w '$(awk -F "=" '/^NAME/ {print $2}' < /etc/os-release )
echo '\033[0;34m @ '$HOST
#Install zinit if no zinit is present
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh'
zinit light sindresorhus/pure
zinit light zsh-users/zsh-autosuggestions
zinit ice lucid wait
zinit light zdharma/fast-syntax-highlighting
zinit light zsh-users/zsh-history-substring-search
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
zstyle ':completion:*' auto-description 'specify: %F{magenta}%d%f'
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' file-sort name
zstyle ':completion:*' format 'Completing %F{magenta}%d%f'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]} m:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
zstyle ':completion:*' menu select=1
zstyle ':completion:*' original true
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %F{blue}%p%s%f %l
zstyle ':completion:*' verbose true
zstyle :compinstall filename '/home/juan/.zshrc'
autoload -Uz compinit
compinit
HISTFILE=~/.cache/.zhistory
HISTSIZE=8192
SAVEHIST=8192
setopt autocd extendedglob nomatch notify auto_pushd
unsetopt beep
zmodload zsh/complist
#vi mone
bindkey -v
export KEYTIMEOUT=1
#edit in vim
autoload edit-command-line
zle -N edit-command-line
bindkey '' edit-command-line
#use lf to change dirs. credit: luke
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
}
# get cheat sheet
cb () {
curl -s cht.sh/$* | bat --decorations never
}
#start mpv detached
dmpv () {
mpv $* &> /dev/null &
disown
}
#config location
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CACHE_HOME=$HOME/.cache
export CARGO_HOME=$HOME/.cache/cargo
export GOPATH=$HOME/.cache/go
export LESSHISTFILE=/dev/null
export LYNX_CFG=$HOME/.config/lynx/lynxrc
#colored output
export LESS_TERMCAP_md=$'\e[01;35m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_so=$'\e[01;100;37m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_us=$'\e[01;36m'
export LESS_TERMCAP_ue=$'\e[0m'
export MANWIDTH=${MANWIDTH:-78}
export MANLESS="Manual\ \$MAN_PN\ ?ltline\ %lt?L/%L.:byte\ %bB?s/%s..?\:?pB\ %pB\\%.."
export LESS="-RSM~"
#local path
export PATH="${PATH}:${HOME}/.local/bin/"
export PATH="${PATH}:${HOME}/.scripts/"
#ccache support
export USE_CCACHE=1
export PATH="/usr/lib/ccache/bin${PATH:+:}$PATH"
#source fasd_cache for 40 ms quicker start.
fasd_cache="$HOME/.cache/fasd_cache"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install posix-alias posix-hook >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
alias b='bat'
alias btctl='bluetoothctl'
alias cp='cp -iv'
alias df='df -h'
alias diff='diff --color=auto'
alias e='emerge'
alias free='free -h'
alias g='git'
alias grep='grep --color=auto'
alias ip='ip -color=auto'
alias la='ls -a --color=auto'
alias ll='ls -lh --color=auto'
alias ls='ls --color=auto'
alias se='doas emerge'
alias sp='doas pacman'
alias ssh='TERM="xterm-256color" ssh'
alias sv='doasedit.sh'
alias v='nvim'
alias vw='nvim -c VimwikiIndex'
alias yt-dl='yt-dlp --sub-lang en,zh-Hant --audio-format best'
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

24
README.md Normal file
View File

@ -0,0 +1,24 @@
# dotfiles
my dotfiles for an Arch Linux desktop and a Gentoo laptop
## Softwares
- Sway - WM
- Firefox - I built from source with wayland support
- kitty - terminal emulator
- beets - music library management
- mpd - music server
- ncmpcpp - music player
- neovim with VimPlug - text editor and a lightweight plugin manager
- wofi - wayland native app launcher
- zsh with zinit - a shell and a fast plugin framework
- wob - bar in wayland
## Screenshots
### Sway
![windows](https://user-images.githubusercontent.com/72336775/122357027-def01800-cf42-11eb-82f9-3d08ea86317a.png)
![background](https://user-images.githubusercontent.com/72336775/122357052-e3b4cc00-cf42-11eb-902e-0337852f885e.png)