Initial nixos configuration
This commit is contained in:
parent
4e4edec989
commit
74b2ebd884
247 changed files with 206 additions and 36718 deletions
|
@ -1,21 +0,0 @@
|
|||
! Snazzy - Converted from https://github.com/sindresorhus/iterm2-snazzy
|
||||
! using https://github.com/richo/itermcolors2xdefaults
|
||||
URxvt*background: #1e1f28
|
||||
URxvt*foreground: #ebece6
|
||||
URxvt*cursorColor: #e4e4e4
|
||||
URxvt*color0: #000
|
||||
URxvt*color1: #fb4245
|
||||
URxvt*color2: #50fa7b
|
||||
URxvt*color3: #f0fa8b
|
||||
URxvt*color4: #49b9fe
|
||||
URxvt*color5: #fb4cb3
|
||||
URxvt*color6: #8be9fd
|
||||
URxvt*color7: #ededec
|
||||
URxvt*color8: #555555
|
||||
URxvt*color9: #fb4245
|
||||
URxvt*color10: #50fa7b
|
||||
URxvt*color11: #f0fa8b
|
||||
URxvt*color12: #49b9fe
|
||||
URxvt*color13: #fb4cb3
|
||||
URxvt*color14: #8be9fd
|
||||
URxvt*color15: #ededec
|
|
@ -1,89 +0,0 @@
|
|||
# -----------------$HOME/.abcde.conf----------------- #
|
||||
#
|
||||
# A sample configuration file to convert music cds to
|
||||
# FLAC using abcde version 2.7.2
|
||||
#
|
||||
# http://andrews-corner.org/linux/abcde/index.html
|
||||
# -------------------------------------------------- #
|
||||
|
||||
# Encode tracks immediately after reading. Saves disk space, gives
|
||||
# better reading of 'scratchy' disks and better troubleshooting of
|
||||
# encoding process but slows the operation of abcde quite a bit:
|
||||
LOWDISK=y
|
||||
|
||||
# Specify the method to use to retrieve the track information,
|
||||
# the alternative is to specify 'musicbrainz':
|
||||
CDDBMETHOD=cddb
|
||||
|
||||
# Make a local cache of cddb entries and then volunteer to use
|
||||
# these entries when and if they match the cd:
|
||||
CDDBCOPYLOCAL="y"
|
||||
CDDBLOCALDIR="$HOME/.cddb"
|
||||
CDDBLOCALRECURSIVE="y"
|
||||
CDDBUSELOCAL="y"
|
||||
|
||||
# Specify the encoder to use for FLAC. In this case
|
||||
# flac is the only choice.
|
||||
FLACENCODERSYNTAX=flac
|
||||
|
||||
# Specify the path to the selected encoder. In most cases the encoder
|
||||
# should be in your $PATH as I illustrate below, otherwise you will
|
||||
# need to specify the full path. For example: /usr/bin/flac
|
||||
FLAC=flac
|
||||
|
||||
# Specify your required encoding options here. Multiple options can
|
||||
# be selected as '--best --another-option' etc.
|
||||
# Overall bitrate is about 880 kbs/s with level 8.
|
||||
FLACOPTS='-s -e -V -8'
|
||||
|
||||
# Output type for FLAC.
|
||||
OUTPUTTYPE="flac"
|
||||
|
||||
# The cd ripping program to use. There are a few choices here: cdda2wav,
|
||||
# dagrab, cddafs (Mac OS X only) and flac. New to abcde 2.7 is 'libcdio'.
|
||||
CDROMREADERSYNTAX=cdparanoia
|
||||
|
||||
# Give the location of the ripping program and pass any extra options,
|
||||
# if using libcdio set 'CD_PARANOIA=cd-paranoia'.
|
||||
CDPARANOIA=cdparanoia
|
||||
CDPARANOIAOPTS="--never-skip=40"
|
||||
|
||||
# Give the location of the CD identification program:
|
||||
CDDISCID=cd-discid
|
||||
|
||||
# Give the base location here for the encoded music files.
|
||||
OUTPUTDIR="$HOME/Documents/Rip"
|
||||
|
||||
# The default actions that abcde will take.
|
||||
ACTIONS=cddb,playlist,read,encode,tag,move,clean
|
||||
|
||||
# Decide here how you want the tracks labelled for a standard 'single-artist',
|
||||
# multi-track encode and also for a multi-track, 'various-artist' encode:
|
||||
OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
|
||||
VAOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}'
|
||||
|
||||
# Decide here how you want the tracks labelled for a standard 'single-artist',
|
||||
# single-track encode and also for a single-track 'various-artist' encode.
|
||||
# (Create a single-track encode with 'abcde -1' from the commandline.)
|
||||
ONETRACKOUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}'
|
||||
VAONETRACKOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}'
|
||||
|
||||
# Create playlists for single and various-artist encodes. I would suggest
|
||||
# commenting these out for single-track encoding.
|
||||
PLAYLISTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}.m3u'
|
||||
VAPLAYLISTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}.m3u'
|
||||
|
||||
# This function takes out dots preceding the album name, and removes a grab
|
||||
# bag of illegal characters. It allows spaces, if you do not wish spaces add
|
||||
# in -e 's/ /_/g' after the first sed command.
|
||||
mungefilename ()
|
||||
{
|
||||
echo "$@" | sed -e 's/^\.*//' | tr -d ":><|*/\"'?[:cntrl:]"
|
||||
}
|
||||
|
||||
# What extra options?
|
||||
MAXPROCS=2 # Run a few encoders simultaneously
|
||||
PADTRACKS=y # Makes tracks 01 02 not 1 2
|
||||
EXTRAVERBOSE=2 # Useful for debugging
|
||||
COMMENT='abcde version 2.7.2' # Place a comment...
|
||||
EJECTCD=y # Please eject cd when finished :-)
|
File diff suppressed because it is too large
Load diff
|
@ -1,192 +0,0 @@
|
|||
window:
|
||||
opacity: 1.0
|
||||
dimensions:
|
||||
columns: 0
|
||||
lines: 0
|
||||
padding:
|
||||
x: 30
|
||||
y: 20
|
||||
dynamic_padding: false
|
||||
dynamic_title: true
|
||||
decorations: full
|
||||
|
||||
scrolling:
|
||||
history: 10000
|
||||
multiplier: 3
|
||||
|
||||
font:
|
||||
normal:
|
||||
family: Hack Nerd Font Mono
|
||||
size: 12.0
|
||||
offset:
|
||||
x: 0
|
||||
y: 0
|
||||
glyph_offset:
|
||||
x: 0
|
||||
y: 0
|
||||
use_thin_strokes: true
|
||||
|
||||
# Colors (One Dark)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x282c34'
|
||||
foreground: '0xabb2bf'
|
||||
|
||||
# Cursor colors
|
||||
cursor:
|
||||
text: '0x282c34'
|
||||
cursor: '0xabb2bf'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x282c34'
|
||||
red: '0xe06c75'
|
||||
green: '0x98c379'
|
||||
yellow: '0xe5c07b'
|
||||
blue: '0x61afef'
|
||||
magenta: '0xc678dd'
|
||||
cyan: '0x56b6c2'
|
||||
white: '0xabb2bf'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x3e4452'
|
||||
red: '0xbe5046'
|
||||
green: '0x98c379'
|
||||
yellow: '0xd19a66'
|
||||
blue: '0x61afef'
|
||||
magenta: '0xc678dd'
|
||||
cyan: '0x56b6c2'
|
||||
white: '0x5c6370'
|
||||
|
||||
bell:
|
||||
animation: EaseOutExpo
|
||||
duration: 0
|
||||
color: '#ffffff'
|
||||
|
||||
mouse_bindings:
|
||||
- { mouse: Middle, action: PasteSelection }
|
||||
|
||||
mouse:
|
||||
double_click: { threshold: 300 }
|
||||
triple_click: { threshold: 300 }
|
||||
hide_when_typing: false
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ',│`|:"'' ()[]{}<>'
|
||||
save_to_clipboard: false
|
||||
|
||||
cursor:
|
||||
style: Block
|
||||
unfocused_hollow: true
|
||||
|
||||
live_config_reload: true
|
||||
|
||||
enable_experimental_conpty_backend: true
|
||||
|
||||
alt_send_esc: true
|
||||
|
||||
key_bindings:
|
||||
- { key: Paste, action: Paste }
|
||||
- { key: Copy, action: Copy }
|
||||
- { key: L, mods: Control, action: ClearLogNotice }
|
||||
- { key: L, mods: Control, chars: "\x0c" }
|
||||
- { key: Home, chars: "\x1bOH", mode: AppCursor }
|
||||
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
|
||||
- { key: End, chars: "\x1bOF", mode: AppCursor }
|
||||
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
|
||||
- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
|
||||
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt }
|
||||
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
|
||||
- { key: PageUp, chars: "\x1b[5~" }
|
||||
- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
|
||||
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt }
|
||||
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
|
||||
- { key: PageDown, chars: "\x1b[6~" }
|
||||
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
|
||||
- { key: Back, chars: "\x7f" }
|
||||
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
|
||||
- { key: Insert, chars: "\x1b[2~" }
|
||||
- { key: Delete, chars: "\x1b[3~" }
|
||||
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
|
||||
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
|
||||
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
|
||||
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
|
||||
- { key: Left, chars: "\x1bOD", mode: AppCursor }
|
||||
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
|
||||
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
|
||||
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
|
||||
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
|
||||
- { key: Right, chars: "\x1bOC", mode: AppCursor }
|
||||
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
|
||||
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
|
||||
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
|
||||
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
|
||||
- { key: Up, chars: "\x1bOA", mode: AppCursor }
|
||||
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
|
||||
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
|
||||
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
|
||||
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
|
||||
- { key: Down, chars: "\x1bOB", mode: AppCursor }
|
||||
- { key: F1, chars: "\x1bOP" }
|
||||
- { key: F2, chars: "\x1bOQ" }
|
||||
- { key: F3, chars: "\x1bOR" }
|
||||
- { key: F4, chars: "\x1bOS" }
|
||||
- { key: F5, chars: "\x1b[15~" }
|
||||
- { key: F6, chars: "\x1b[17~" }
|
||||
- { key: F7, chars: "\x1b[18~" }
|
||||
- { key: F8, chars: "\x1b[19~" }
|
||||
- { key: F9, chars: "\x1b[20~" }
|
||||
- { key: F10, chars: "\x1b[21~" }
|
||||
- { key: F11, chars: "\x1b[23~" }
|
||||
- { key: F12, chars: "\x1b[24~" }
|
||||
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
|
||||
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
|
||||
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
|
||||
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
|
||||
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
|
||||
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
|
||||
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
|
||||
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
|
||||
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
|
||||
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
|
||||
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
|
||||
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
|
||||
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
|
||||
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
|
||||
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
|
||||
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
|
||||
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
|
||||
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
|
||||
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
|
||||
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
|
||||
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
|
||||
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
|
||||
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
|
||||
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
|
||||
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
|
||||
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
|
||||
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
|
||||
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
|
||||
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
|
||||
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
|
||||
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
|
||||
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
|
||||
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
|
||||
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
|
||||
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
|
||||
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
|
||||
- { key: F1, mods: Super, chars: "\x1b[1;3P" }
|
||||
- { key: F2, mods: Super, chars: "\x1b[1;3Q" }
|
||||
- { key: F3, mods: Super, chars: "\x1b[1;3R" }
|
||||
- { key: F4, mods: Super, chars: "\x1b[1;3S" }
|
||||
- { key: F5, mods: Super, chars: "\x1b[15;3~" }
|
||||
- { key: F6, mods: Super, chars: "\x1b[17;3~" }
|
||||
- { key: F7, mods: Super, chars: "\x1b[18;3~" }
|
||||
- { key: F8, mods: Super, chars: "\x1b[19;3~" }
|
||||
- { key: F9, mods: Super, chars: "\x1b[20;3~" }
|
||||
- { key: F10, mods: Super, chars: "\x1b[21;3~" }
|
||||
- { key: F11, mods: Super, chars: "\x1b[23;3~" }
|
||||
- { key: F12, mods: Super, chars: "\x1b[24;3~" }
|
||||
- { key: NumpadEnter, chars: "\n" }
|
|
@ -1,9 +0,0 @@
|
|||
continue
|
||||
file-allocation=falloc
|
||||
log-level=warn
|
||||
max-connection-per-server=4
|
||||
max-concurrent-downloads=3
|
||||
max-overall-download-limit=0
|
||||
min-split-size=5M
|
||||
enable-http-pipelining=true
|
||||
rpc-secret="{{@@ env['PASS_ARIA2'] @@}}"
|
|
@ -1,39 +0,0 @@
|
|||
directory: ~/Music
|
||||
library: ~/Music/beets.db
|
||||
plugins:
|
||||
- edit
|
||||
- fetchart
|
||||
- fuzzy
|
||||
- info
|
||||
- lastgenre
|
||||
- lyrics
|
||||
# - mbcollection
|
||||
- mpdupdate
|
||||
- play
|
||||
- replaygain
|
||||
- thumbnails
|
||||
- web
|
||||
import:
|
||||
write: yes
|
||||
copy: yes
|
||||
lastgenre:
|
||||
whitelist: ~/.config/beets/whitelist
|
||||
lyrics:
|
||||
fallback: ''
|
||||
play:
|
||||
command: mpv --no-vid --no-resume-playback
|
||||
mpd:
|
||||
host: localhost
|
||||
port: 6600
|
||||
password: "{{@@ env['PASS_MPD_ADMIN'] @@}}"
|
||||
follow:
|
||||
email: reekymarko@reekynet.com
|
||||
password: "{{@@ env['PASS_MUSPY'] @@}}"
|
||||
userid: w8njp08ude90mfzsgumjhqinnirj4g
|
||||
auto: yes
|
||||
replaygain:
|
||||
backend: gstreamer
|
||||
auto: yes
|
||||
#mbcollection:
|
||||
# auto: 'yes'
|
||||
# collection: 'a4955b5c-db7f-4e27-9887-f77f820bad34'
|
|
@ -1,37 +0,0 @@
|
|||
avantgarde
|
||||
experimental music
|
||||
lofi
|
||||
blues
|
||||
classical
|
||||
comedy
|
||||
comedy music
|
||||
comedy rock
|
||||
humor
|
||||
parody music
|
||||
standup
|
||||
country
|
||||
country rap
|
||||
country rock
|
||||
rockabilly
|
||||
easy listening
|
||||
electronic
|
||||
drum and bass
|
||||
hardcore
|
||||
house
|
||||
techno
|
||||
uk garage
|
||||
dubstep
|
||||
rap
|
||||
folk
|
||||
hip hop
|
||||
countryrap
|
||||
rap rock
|
||||
jazz
|
||||
pop
|
||||
rhythm and blues
|
||||
rock
|
||||
hard rock
|
||||
alternative rock
|
||||
heavy metal
|
||||
punk rock
|
||||
reggae
|
|
@ -1,75 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# set screen timeout
|
||||
xset s 300 120
|
||||
xset dpms 422
|
||||
|
||||
# screen locker
|
||||
xss-lock -n ~/Scripts/dim-screen.sh -- evenbetterlockscreen -l &
|
||||
|
||||
# lock screen
|
||||
evenbetterlockscreen -l &
|
||||
|
||||
# set wallpaper
|
||||
wal -R
|
||||
|
||||
# Start hotkey daemon
|
||||
sxhkd &
|
||||
|
||||
bspc monitor -d web term chat mail music 6 7
|
||||
|
||||
bspc config border_width 0
|
||||
bspc config window_gap 37
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
|
||||
bspc rule -a TelegramDesktop desktop=^3
|
||||
bspc rule -a Franz desktop=^3
|
||||
bspc rule -a Thunderbird desktop=^4
|
||||
|
||||
bspc rule -a Zathura state=tiled
|
||||
bspc rule -a Nightly:Navigator state=tiled
|
||||
bspc rule -a kdeconnect-indicator state=tiled
|
||||
bspc rule -a libreoffice state=tiled
|
||||
bspc rule -a Screenkey manage=off
|
||||
|
||||
bspc config super mod4
|
||||
bspc config pointer_action1 move
|
||||
bspc config pointer_action2 none
|
||||
bspc config pointer_action3 resize_corner
|
||||
bspc config click_to_focus true
|
||||
|
||||
# set pywal colors
|
||||
. "${HOME}/.cache/wal/colors.sh"
|
||||
bspc config normal_border_color "$color1"
|
||||
bspc config active_border_color "$color2"
|
||||
bspc config focused_border_color "$color15"
|
||||
bspc config presel_feedback_color "$color1"
|
||||
|
||||
|
||||
# set cursor style
|
||||
xsetroot -cursor_name left_ptr
|
||||
|
||||
# startup applications
|
||||
joplin-desktop &
|
||||
compton -f --config ~/.config/compton/config &
|
||||
redshift &
|
||||
/usr/lib/xfce4/notifyd/xfce4-notifyd &
|
||||
telegram-desktop &
|
||||
setxkbmap eu &
|
||||
/usr/lib/kdeconnectd &
|
||||
kdeconnect-indicator &
|
||||
udiskie --tray &
|
||||
xfce4-clipman &
|
||||
/usr/bin/gnome-keyring-daemon --start --components=secrets &
|
||||
~/Scripts/polybar.sh &
|
||||
/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
|
||||
blueberry-tray &
|
||||
nm-applet &
|
||||
thunderbird &
|
||||
mpDris2 &
|
||||
|
||||
# hide mouse cursor
|
||||
unclutter -idle 1 &
|
|
@ -1,53 +0,0 @@
|
|||
backend = "glx";
|
||||
glx-no-stencil = true;
|
||||
glx-copy-from-front = false;
|
||||
glx-swap-method = 1;
|
||||
inactive-opacity-override = true;
|
||||
|
||||
# Fix tearing
|
||||
vsync = "opengl-swc";
|
||||
unredir-if-possible = false;
|
||||
paint-on-overlay = true;
|
||||
|
||||
# Shadow
|
||||
shadow = true; # Enabled client-side shadows on windows.
|
||||
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
|
||||
no-dnd-shadow = true; # Don't draw shadows on DND windows.
|
||||
shadow-radius = 10; # The blur radius for shadows. (default 12)
|
||||
shadow-offset-x = -15; # The left offset for shadows. (default -15)
|
||||
shadow-offset-y = -15; # The top offset for shadows. (default -15)
|
||||
shadow-opacity = 0.5;
|
||||
menu-opacity = 1;
|
||||
shadow-exclude = [
|
||||
"class_g = 'slop'",
|
||||
"n:e:Notification",
|
||||
"class_g ?= 'Xfce4-notifyd'",
|
||||
#"class_g ?= 'Xfce4-power-manager'"
|
||||
];
|
||||
|
||||
opacity-rule = [
|
||||
"50:class_g = 'Bspwm' && class_i = 'presel_feedback'",
|
||||
"99:class_g = 'slop'"
|
||||
];
|
||||
|
||||
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
|
||||
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
|
||||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
|
||||
|
||||
# Fading
|
||||
fading = true; # Fade windows during opacity changes.
|
||||
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
|
||||
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
|
||||
no-fading-openclose = false; # Fade windows in/out when opening/closing
|
||||
|
||||
detect-client-opacity = true; # This prevents opacity being ignored for some apps. For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
|
||||
|
||||
#Window type settings
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = false; };
|
||||
menu = { shadow = false; };
|
||||
dropdown_menu = { shadow = false; };
|
||||
popup_menu = { shadow = false; };
|
||||
};
|
|
@ -1,88 +0,0 @@
|
|||
[io/github/celluloid-player/celluloid]
|
||||
dark-theme-enable=false
|
||||
mpv-config-enable=true
|
||||
mpv-config-file='file:///home/{{@@ env['USER'] @@}}/.config/mpv/mpv.conf'
|
||||
mpv-input-config-enable=true
|
||||
mpv-input-config-file='file:///home/{{@@ env['USER'] @@}}/.config/mpv/input.conf'
|
||||
settings-migrated=true
|
||||
|
||||
[org/gnome/Connections]
|
||||
first-run=false
|
||||
|
||||
[org/gnome/shell/weather]
|
||||
automatic-location=false
|
||||
locations=[<(uint32 2, <('Lappeenranta', 'EFLP', false, [(1.0654507804726074, 0.49128594181309354)], @a(dd) [])>)>]
|
||||
|
||||
[org/gnome/Weather]
|
||||
locations=[<(uint32 2, <('Lappeenranta', 'EFLP', false, [(1.0654507804726074, 0.49128594181309354)], @a(dd) [])>)>]
|
||||
|
||||
[org/gnome/shell/world-clocks]
|
||||
locations=[<(uint32 2, <('Bangkok', 'VTBD', true, [(0.24289166005364171, 1.7558012275062955)], [(0.23998277214922031, 1.754346792280731)])>)>]
|
||||
|
||||
[org/gnome/clocks]
|
||||
world-clocks=[{'location': <(uint32 2, <('Bangkok', 'VTBD', true, [(0.24289166005364171, 1.7558012275062955)], [(0.23998277214922031, 1.754346792280731)])>)>}]
|
||||
|
||||
[org/gnome/desktop/a11y/mouse]
|
||||
dwell-click-enabled=false
|
||||
dwell-threshold=10
|
||||
dwell-time=1.2
|
||||
secondary-click-enabled=true
|
||||
secondary-click-time=1.2
|
||||
|
||||
[org/gnome/desktop/calendar]
|
||||
show-weekdate=true
|
||||
|
||||
[org/gnome/desktop/input-sources]
|
||||
show-all-sources=true
|
||||
sources=[('xkb', 'eu'), ('xkb', 'fi')]
|
||||
xkb-options=['lv3:ralt_switch']
|
||||
|
||||
[org/gnome/desktop/peripherals/touchpad]
|
||||
tap-to-click=true
|
||||
two-finger-scrolling-enabled=true
|
||||
|
||||
[org/gnome/desktop/privacy]
|
||||
disable-microphone=false
|
||||
old-files-age=uint32 14
|
||||
recent-files-max-age=-1
|
||||
remove-old-temp-files=true
|
||||
remove-old-trash-files=true
|
||||
|
||||
[org/gnome/desktop/wm/keybindings]
|
||||
close=['<Super>w']
|
||||
move-to-workspace-down=['<Shift><Super>j']
|
||||
move-to-workspace-left=['<Shift><Super>h']
|
||||
move-to-workspace-right=['<Shift><Super>l']
|
||||
move-to-workspace-up=['<Shift><Super>k']
|
||||
switch-to-workspace-down=['<Super>j']
|
||||
switch-to-workspace-left=['<Super>h']
|
||||
switch-to-workspace-right=['<Super>l']
|
||||
switch-to-workspace-up=['<Super>k']
|
||||
toggle-fullscreen=@as []
|
||||
toggle-maximized=['<Super>f']
|
||||
|
||||
[org/gnome/settings-daemon/plugins/media-keys]
|
||||
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
|
||||
screensaver=['<Super>BackSpace']
|
||||
www=['<Super>b']
|
||||
volume-step=1
|
||||
|
||||
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
|
||||
binding='<Super>Return'
|
||||
command='kgx'
|
||||
name='Open terminal'
|
||||
|
||||
[org/gnome/file-roller/dialogs/new]
|
||||
default-extension='.tar.zst'
|
||||
|
||||
[org/gnome/software]
|
||||
check-timestamp=int64 1667730233
|
||||
download-updates=true
|
||||
download-updates-notify=true
|
||||
first-run=false
|
||||
|
||||
[org/gnome/system/location]
|
||||
enabled=true
|
||||
|
||||
[org/gnome/tweaks]
|
||||
show-extensions-notice=false
|
|
@ -1,6 +0,0 @@
|
|||
languages:
|
||||
markdown:
|
||||
lint-command: 'yarn --cwd ~/.bin/node run markdownlint -s'
|
||||
lint-stdin: true
|
||||
lint-formats:
|
||||
- '%f: %l: %m'
|
|
@ -1,2 +0,0 @@
|
|||
--enable-features=UseOzonePlatform
|
||||
--ozone-platform=wayland
|
|
@ -1,2 +0,0 @@
|
|||
--enable-features=UseOzonePlatform
|
||||
--ozone-platform=wayland
|
|
@ -1,3 +0,0 @@
|
|||
MOZ_ENABLE_WAYLAND=1
|
||||
MOZ_USE_XINPUT2=1
|
||||
MOZ_WEBRENDER=1
|
|
@ -1,14 +0,0 @@
|
|||
# Fix java on wayland
|
||||
_JAVA_AWT_WM_NONREPARENTING=1
|
||||
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
|
||||
|
||||
# Enable qt5 theming and wayland support
|
||||
QT_QPA_PLATFORMTHEME=qt5ct
|
||||
QT_QPA_PLATFORM=wayland-egl
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
|
||||
# Fix redshift on wlroots
|
||||
WLR_DRM_NO_ATOMIC=1
|
||||
|
||||
# Use wayland in SDL2
|
||||
SDL_VIDEODRIVER=wayland
|
|
@ -1,8 +0,0 @@
|
|||
flash-opacity: 0.8
|
||||
default-opacity: 1
|
||||
time: 300
|
||||
simple: false
|
||||
ntimepoints: 10
|
||||
flash-on-focus: true
|
||||
flash-fullscreen: true
|
||||
flash-lone-windows: 'always'
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Overpass</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Overpass</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Hack Nerd Font Mono</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
|
@ -1,45 +0,0 @@
|
|||
pad=10x0
|
||||
dpi-aware=yes
|
||||
|
||||
[scrollback]
|
||||
lines=1000
|
||||
|
||||
[cursor]
|
||||
blink=yes
|
||||
|
||||
[mouse]
|
||||
hide-when-typing=yes
|
||||
|
||||
[colors]
|
||||
foreground = 545464
|
||||
background = f2ecbc
|
||||
|
||||
selection-foreground = 43436c
|
||||
selection-background = c9cbd1
|
||||
|
||||
regular0 = 1F1F28
|
||||
regular1 = c84053
|
||||
regular2 = 6f894e
|
||||
regular3 = 77713f
|
||||
regular4 = 4d699b
|
||||
regular5 = b35b79
|
||||
regular6 = 597b75
|
||||
regular7 = 545464
|
||||
|
||||
bright0 = 8a8980
|
||||
bright1 = d7474b
|
||||
bright2 = 6e915f
|
||||
bright3 = 836f4a
|
||||
bright4 = 6693bf
|
||||
bright5 = 624c83
|
||||
bright6 = 5e857a
|
||||
bright7 = 43436c
|
||||
|
||||
|
||||
16 = cc6d00
|
||||
17 = e82424
|
||||
|
||||
[csd]
|
||||
color = fff2ecbc
|
||||
button-color = ff545464
|
||||
hide-when-maximized = yes
|
|
@ -1,44 +0,0 @@
|
|||
pad=10x0
|
||||
dpi-aware=yes
|
||||
|
||||
[scrollback]
|
||||
lines=1000
|
||||
|
||||
[cursor]
|
||||
blink=yes
|
||||
|
||||
[mouse]
|
||||
hide-when-typing=yes
|
||||
|
||||
[colors]
|
||||
foreground = dcd7ba
|
||||
background = 1f1f28
|
||||
|
||||
selection-foreground = c8c093
|
||||
selection-background = 2d4f67
|
||||
|
||||
regular0 = 090618
|
||||
regular1 = c34043
|
||||
regular2 = 76946a
|
||||
regular3 = c0a36e
|
||||
regular4 = 7e9cd8
|
||||
regular5 = 957fb8
|
||||
regular6 = 6a9589
|
||||
regular7 = c8c093
|
||||
|
||||
bright0 = 727169
|
||||
bright1 = e82424
|
||||
bright2 = 98bb6c
|
||||
bright3 = e6c384
|
||||
bright4 = 7fb4ca
|
||||
bright5 = 938aa9
|
||||
bright6 = 7aa89f
|
||||
bright7 = dcd7ba
|
||||
|
||||
16 = ffa066
|
||||
17 = ff5d62
|
||||
|
||||
[csd]
|
||||
color = ff1f1f28
|
||||
button-color = ffdcd7ba
|
||||
hide-when-maximized = yes
|
|
@ -1,59 +0,0 @@
|
|||
[user]
|
||||
email = marko.korhonen@rossum.fi
|
||||
name = Marko Korhonen
|
||||
signingkey = F2B9F713E7ED627336DD85E444FA3F28CD931BB0
|
||||
|
||||
[commit]
|
||||
signoff = true
|
||||
gpgsign = true
|
||||
|
||||
[tag]
|
||||
gpgSign = true
|
||||
signoff = true
|
||||
|
||||
[format]
|
||||
signoff = true
|
||||
|
||||
[merge]
|
||||
prompt = false
|
||||
conflictstyle = diff3
|
||||
tool = nvim
|
||||
|
||||
[mergetool]
|
||||
keepBackup = false
|
||||
prompt = false
|
||||
|
||||
[mergetool "nvim"]
|
||||
cmd = nvim +DiffviewOpen
|
||||
|
||||
[pull]
|
||||
rebase = merges
|
||||
|
||||
[alias]
|
||||
mergetest = !git switch test && git pull && git merge --no-ff -m \"Merge $1 features to test\" $1
|
||||
upstream = !git push -u origin HEAD
|
||||
sync = !git pull && git push
|
||||
recommit = !git commit -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG
|
||||
pull-merge = pull --no-rebase --no-ff --no-edit
|
||||
log-merge = log -i --grep=merge --pretty=oneline
|
||||
log-fp = log --first-parent --pretty=oneline
|
||||
ll = log --pretty=oneline
|
||||
|
||||
[color]
|
||||
pager = no
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[credential]
|
||||
helper = cache --timeout=600
|
||||
helper = !pass-git-helper $@
|
||||
|
||||
[rerere]
|
||||
enabled = true
|
||||
|
||||
[submodule]
|
||||
recurse = true
|
||||
|
||||
[push]
|
||||
recurseSubmodules = check
|
|
@ -1,4 +0,0 @@
|
|||
VteTerminal,
|
||||
vte-terminal {
|
||||
padding: 40px;
|
||||
}
|
|
@ -1,266 +0,0 @@
|
|||
# ~/.config/i3/config
|
||||
|
||||
client.focused #3F8AC2 #096BAA #00BAA7 #00DA8E
|
||||
client.focused_inactive #333333 #5F676A #ffffff #484e50
|
||||
client.unfocused #333333 #424242 #888888 #292d2e
|
||||
client.urgent #C10004 #900000 #ffffff #900000
|
||||
|
||||
# GAPS
|
||||
gaps inner 20
|
||||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
bindsym $mod+Shift+g mode "$mode_gaps"
|
||||
|
||||
# Modes for controlling gaps
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym plus gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
|
||||
bindsym Shift+plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym plus gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
|
||||
bindsym Shift+plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
set $mod mod4
|
||||
set $term termite
|
||||
|
||||
bindsym $mod+d exec --no-startup-id rofi -show-icons -show drun -config /home/reekymarko/.config/rofi/config
|
||||
bindsym $mod+p exec --no-startup-id rofi-pass --last-used
|
||||
bindsym $mod+Shift+p exec --no-startup-id rofi-pass --bmarks --last-used
|
||||
|
||||
font pango:System San Francisco Display 11
|
||||
|
||||
new_window 1pixel
|
||||
hide_edge_borders vertical
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec --no-startup-id $term
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+y split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+x split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
focus_follows_mouse no
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# open with clipboard contents
|
||||
bindsym $mod+v exec --no-startup-id mpv --ytdl-format="bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]" $(xclip -o)
|
||||
bindym $mod+Shift+b exec --no-startup-id firefox-nightly $(xclip -o)
|
||||
|
||||
#workspace names
|
||||
set $workspace1 "1: Start "
|
||||
set $workspace2 "2"
|
||||
set $workspace3 "3"
|
||||
set $workspace4 "4"
|
||||
set $workspace5 "5"
|
||||
set $workspace6 "6"
|
||||
set $workspace7 "7"
|
||||
set $workspace8 "8: Mail "
|
||||
set $workspace9 "9: Messaging "
|
||||
set $workspace10 "10: Music "
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $workspace1
|
||||
bindsym $mod+2 workspace $workspace2
|
||||
bindsym $mod+3 workspace $workspace3
|
||||
bindsym $mod+4 workspace $workspace4
|
||||
bindsym $mod+5 workspace $workspace5
|
||||
bindsym $mod+6 workspace $workspace6
|
||||
bindsym $mod+7 workspace $workspace7
|
||||
bindsym $mod+8 workspace $workspace8
|
||||
bindsym $mod+9 workspace $workspace9
|
||||
bindsym $mod+0 workspace $workspace10
|
||||
|
||||
# classes
|
||||
for_window [class="TelegramDesktop"] move to workspace $workspace9
|
||||
for_window [class="Thunderbird"] move to workspace $workspace8
|
||||
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $workspace1
|
||||
bindsym $mod+Shift+2 move container to workspace $workspace2
|
||||
bindsym $mod+Shift+3 move container to workspace $workspace3
|
||||
bindsym $mod+Shift+4 move container to workspace $workspace4
|
||||
bindsym $mod+Shift+5 move container to workspace $workspace5
|
||||
bindsym $mod+Shift+6 move container to workspace $workspace6
|
||||
bindsym $mod+Shift+7 move container to workspace $workspace7
|
||||
bindsym $mod+Shift+8 move container to workspace $workspace8
|
||||
bindsym $mod+Shift+9 move container to workspace $workspace9
|
||||
bindsym $mod+Shift+0 move container to workspace $workspace10
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec --no-startup-id i3-msg exit
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
set $bg-color #263238
|
||||
set $inactive-bg-color #263238
|
||||
set $text-color #f3f4f5
|
||||
set $inactive-text-color #676E7D
|
||||
set $urgent-bg-color #E53935
|
||||
|
||||
# window colors
|
||||
# border background text indicator
|
||||
client.focused $bg-color $bg-color $text-color #00ff00
|
||||
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
|
||||
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
|
||||
client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00
|
||||
|
||||
# pulseaudio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ # increase sound volume
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- # decrease sound volume
|
||||
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 1+ toggle # mute sound
|
||||
|
||||
# sreen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 5 # increase screen brightness
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 5 # decrease screen brightness
|
||||
|
||||
# screenshot and screencast
|
||||
bindsym Print exec --no-startup-id "maim -u -s -l -c 0.157,0.333,0.466,0.4 | xclip -selection clipboard -t image/png && canberra-gtk-play -i camera-shutter"
|
||||
bindsym $mod+Print exec --no-startup-id ~/scripts/record-screen.sh
|
||||
|
||||
|
||||
# mpd controls
|
||||
bindsym XF86AudioNext exec --no-startup-id mpc next
|
||||
bindsym XF86AudioPrev exec --no-startup-id mpc prev
|
||||
bindsym XF86AudioPlay exec --no-startup-id mpc toggle
|
||||
bindsym XF86AudioStop exec --no-startup-id mpc clear
|
||||
|
||||
# connect bluetooth headset
|
||||
bindsym $mod+c exec --no-startup-id bluetoothctl connect 17:08:01:0D:09:33
|
||||
|
||||
# connect bluetooth speaker
|
||||
bindsym $mod+Shift+c exec --no-startup-id bluetoothctl connect 27:59:BE:CE:45:42
|
||||
|
||||
# lock screen
|
||||
bindsym Control+Shift+l exec --no-startup-id evenbetterlockscreen -l
|
||||
|
||||
# open browser
|
||||
bindsym $mod+b exec --no-startup-id firefox-nightly
|
||||
|
||||
{%@@ if profile == "ReekyPC" @@%}
|
||||
# desktop only
|
||||
exec_always --no-startup-id ~/scripts/desktop_screenlayout.sh
|
||||
{%@@ endif @@%}
|
||||
|
||||
# autostart applications
|
||||
exec_always --no-startup-id ~/Scripts/polybar.sh
|
||||
exec --no-startup-id redshift
|
||||
exec --no-startup-id unclutter
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id compton -f --config ~/.config/compton/compton.conf
|
||||
exec --no-startup-id LANG=en_DK.UTF-8 telegram-desktop
|
||||
exec --no-startup-id setxkbmap eu
|
||||
exec --no-startup-id blueberry-tray
|
||||
exec --no-startup-id mpDris2
|
||||
exec --no-startup-id /usr/lib/kdeconnectd
|
||||
exec --no-startup-id kdeconnect-indicator
|
||||
exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd
|
||||
exec --no-startup-id udiskie --tray
|
||||
exec --no-startup-id pamac-tray
|
||||
exec --no-startup-id xfce4-clipman
|
||||
exec --no-startup-id thunderbird
|
||||
exec --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=secrets
|
||||
exec --no-startup-id evenbetterlockscreen -w
|
||||
exec --no-startup-id evenbetterlockscreen -l
|
|
@ -1,132 +0,0 @@
|
|||
# ~/.config/i3/config
|
||||
set $mod mod4
|
||||
set $term alacritty
|
||||
|
||||
bindsym $mod+d exec --no-startup-id rofi -show-icons -show drun -config /home/reekymarko/.config/rofi/config
|
||||
|
||||
font pango:System San Francisco Display 11
|
||||
|
||||
new_window 1pixel
|
||||
hide_edge_borders vertical
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec --no-startup-id $term
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+w kill
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+y split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+x split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
focus_follows_mouse no
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# open with clipboard contents
|
||||
bindsym $mod+v exec --no-startup-id mpv --ytdl-format="bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]" $(xclip -o)
|
||||
bindym $mod+Shift+b exec --no-startup-id firefox-nightly $(xclip -o)
|
||||
|
||||
#workspace names
|
||||
set $workspace1 "1: Start "
|
||||
set $workspace2 "2"
|
||||
set $workspace3 "3"
|
||||
set $workspace4 "4"
|
||||
set $workspace5 "5"
|
||||
set $workspace6 "6"
|
||||
set $workspace7 "7"
|
||||
set $workspace8 "8: Mail "
|
||||
set $workspace9 "9: Messaging "
|
||||
set $workspace10 "10: Music "
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $workspace1
|
||||
bindsym $mod+2 workspace $workspace2
|
||||
bindsym $mod+3 workspace $workspace3
|
||||
bindsym $mod+4 workspace $workspace4
|
||||
bindsym $mod+5 workspace $workspace5
|
||||
bindsym $mod+6 workspace $workspace6
|
||||
bindsym $mod+7 workspace $workspace7
|
||||
bindsym $mod+8 workspace $workspace8
|
||||
bindsym $mod+9 workspace $workspace9
|
||||
bindsym $mod+0 workspace $workspace10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $workspace1
|
||||
bindsym $mod+Shift+2 move container to workspace $workspace2
|
||||
bindsym $mod+Shift+3 move container to workspace $workspace3
|
||||
bindsym $mod+Shift+4 move container to workspace $workspace4
|
||||
bindsym $mod+Shift+5 move container to workspace $workspace5
|
||||
bindsym $mod+Shift+6 move container to workspace $workspace6
|
||||
bindsym $mod+Shift+7 move container to workspace $workspace7
|
||||
bindsym $mod+Shift+8 move container to workspace $workspace8
|
||||
bindsym $mod+Shift+9 move container to workspace $workspace9
|
||||
bindsym $mod+Shift+0 move container to workspace $workspace10
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec --no-startup-id i3-msg exit
|
||||
|
||||
|
||||
# pulseaudio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ # increase sound volume
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- # decrease sound volume
|
||||
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 1+ toggle # mute sound
|
||||
|
||||
# open browser
|
||||
bindsym $mod+b exec --no-startup-id firefox-nightly
|
||||
|
||||
# window rules
|
||||
for_window [class="Steam"] move to workspace $workspace2
|
||||
|
||||
# autostart applications
|
||||
exec --no-startup-id setxkbmap eu
|
||||
exec --no-startup-id steam-native
|
||||
exec --no-startup-id kodi
|
|
@ -1,19 +0,0 @@
|
|||
var child_process = require('child_process');
|
||||
|
||||
function getStdout(cmd) {
|
||||
var stdout = child_process.execSync(cmd);
|
||||
return stdout.toString().trim();
|
||||
}
|
||||
|
||||
exports.host = 'imap.migadu.com';
|
||||
exports.port = 993;
|
||||
exports.tls = true;
|
||||
exports.tlsOptions = {
|
||||
rejectUnauthorized: true,
|
||||
};
|
||||
exports.username = 'admin@korhonen.cc';
|
||||
exports.password = "{{@@ env['PASS_EMAIL_ADMIN'] @@}}";
|
||||
exports.onNewMail = 'mbsync admin@korhonen.cc';
|
||||
exports.onNewMailPost =
|
||||
'~/git/dotfiles/scripts/mail/notify-new-mail.sh admin@korhonen.cc';
|
||||
exports.boxes = ['INBOX'];
|
|
@ -1,19 +0,0 @@
|
|||
var child_process = require('child_process');
|
||||
|
||||
function getStdout(cmd) {
|
||||
var stdout = child_process.execSync(cmd);
|
||||
return stdout.toString().trim();
|
||||
}
|
||||
|
||||
exports.host = 'imap.migadu.com';
|
||||
exports.port = 993;
|
||||
exports.tls = true;
|
||||
exports.tlsOptions = {
|
||||
rejectUnauthorized: true,
|
||||
};
|
||||
exports.username = 'functionalhacker@korhonen.cc';
|
||||
exports.password = "{{@@ env['PASS_EMAIL_HACKER'] @@}}";
|
||||
exports.onNewMail = 'mbsync functionalhacker@korhonen.cc';
|
||||
exports.onNewMailPost =
|
||||
'~/git/dotfiles/scripts/mail/notify-new-mail.sh functionalhacker@korhonen.cc';
|
||||
exports.boxes = ['INBOX'];
|
|
@ -1,19 +0,0 @@
|
|||
var child_process = require('child_process');
|
||||
|
||||
function getStdout(cmd) {
|
||||
var stdout = child_process.execSync(cmd);
|
||||
return stdout.toString().trim();
|
||||
}
|
||||
|
||||
exports.host = 'imap.migadu.com';
|
||||
exports.port = 993;
|
||||
exports.tls = true;
|
||||
exports.tlsOptions = {
|
||||
rejectUnauthorized: true,
|
||||
};
|
||||
exports.username = 'marko@korhonen.cc';
|
||||
exports.password = "{{@@ env['PASS_EMAIL_MARKO'] @@}}";
|
||||
exports.onNewMail = 'mbsync marko@korhonen.cc';
|
||||
exports.onNewMailPost =
|
||||
'~/git/dotfiles/scripts/mail/notify-new-mail.sh marko@korhonen.cc';
|
||||
exports.boxes = ['INBOX'];
|
|
@ -1,28 +0,0 @@
|
|||
[calendars]
|
||||
|
||||
[[birthdays]]
|
||||
path = ~/.calendars/contact_birthdays
|
||||
type = calendar
|
||||
color = light green
|
||||
readonly = True
|
||||
|
||||
[[school]]
|
||||
path = ~/.calendars/school
|
||||
type = calendar
|
||||
color = light green
|
||||
|
||||
[[personal]]
|
||||
path = ~/.calendars/personal
|
||||
type = calendar
|
||||
color = light green
|
||||
|
||||
[[card_local]]
|
||||
path = ~/.contacts/*
|
||||
type = discover
|
||||
|
||||
[locale]
|
||||
timeformat = %H:%M
|
||||
dateformat = %Y-%m-%d
|
||||
longdateformat = %Y-%m-%d
|
||||
datetimeformat = %Y-%m-%d %H:%M
|
||||
longdatetimeformat = %Y-%m-%d %H:%M
|
|
@ -1,28 +0,0 @@
|
|||
# example configuration file for khard version >= 0.11.0
|
||||
# place it under $HOME/.config/khard/khard.conf
|
||||
|
||||
[addressbooks]
|
||||
[[contacts]]
|
||||
path = ~/.contacts
|
||||
|
||||
[general]
|
||||
debug = no
|
||||
default_action = list
|
||||
editor = vim
|
||||
merge_editor = vimdiff
|
||||
|
||||
[contact table]
|
||||
# display names by first or last name: first_name / last_name
|
||||
display = first_name
|
||||
# group by address book: yes / no
|
||||
group_by_addressbook = no
|
||||
# reverse table ordering: yes / no
|
||||
reverse = no
|
||||
# append nicknames to name column: yes / no
|
||||
show_nicknames = no
|
||||
# show uid table column: yes / no
|
||||
show_uids = yes
|
||||
# sort by first or last name: first_name / last_name
|
||||
sort = last_name
|
||||
# localize dates: yes / no
|
||||
localize_dates = yes
|
|
@ -1,2 +0,0 @@
|
|||
MPDAddress = "127.0.0.1:6600"
|
||||
ListenbrainzToken = "{{@@ env['PASS_LISTENBRAINZ'] @@}}"
|
|
@ -1,12 +0,0 @@
|
|||
background-color=#1E1D2F
|
||||
text-color=#D9E0EE
|
||||
border-color=#96CDFB
|
||||
progress-color=over #302D41
|
||||
|
||||
icons=1
|
||||
default-timeout=5000
|
||||
max-visible=6
|
||||
layer=overlay
|
||||
|
||||
[urgency=high]
|
||||
border-color=#F8BD96
|
|
@ -1,50 +0,0 @@
|
|||
mpvqueue %U
|
||||
^https?://invidio.us/.*
|
||||
|
||||
mpvqueue %U
|
||||
^https?://(m.)?(www.)?youtube.com/watch\?.*v=
|
||||
|
||||
mpvqueue %U
|
||||
^https?://(www.)?youtube.com/playlist\?.*list=
|
||||
|
||||
mpvqueue %U
|
||||
^https?://(www.)?youtu.be/
|
||||
|
||||
mpvqueue %U
|
||||
^https?://(www.)?(m.)?twitch.tv/
|
||||
|
||||
mpvqueue %U
|
||||
^https?://(?:[a-z0-9\-]+\.)+[a-z]{2,6}(?:/[^/#?]+)+\.(?:mp4|mkv|webm|avi|3gp|gif|gifv)
|
||||
|
||||
mpvqueue %U
|
||||
^https?://www.facebook.com/watch/?v=.*
|
||||
|
||||
mpvqueue %U
|
||||
^https?://www.facebook.com/.*/videos/.*
|
||||
|
||||
mpvqueue %U
|
||||
^https://fb.watch/.*
|
||||
|
||||
mpvqueue %U
|
||||
^https?://gfycat.com/.*
|
||||
|
||||
mpvqueue %U
|
||||
^https?://vimeo.com/.*
|
||||
|
||||
mpvqueue %U
|
||||
^https?://v.redd.it/.*
|
||||
|
||||
mpvqueue %U
|
||||
^https?://areena.yle.fi.*
|
||||
|
||||
imageviewer %U
|
||||
^https?://(?:[a-z0-9\-]+\.)+[a-z]{2,6}(?:/[^/#?]+)+\.(?:jpg|jpeg|png|svg)
|
||||
|
||||
zathura %U
|
||||
^https?://(?:[a-z0-9\-]+\.)+[a-z]{2,6}(?:/[^/#?]+)+\.(?:pdf)
|
||||
|
||||
alacritty -e rtv "%U"
|
||||
^https?://(www.)?reddit.com.*
|
||||
|
||||
alacritty -e rtv "%U"
|
||||
^https?://redd.it.*
|
|
@ -1,7 +0,0 @@
|
|||
[Connection]
|
||||
host = localhost
|
||||
port = 6600
|
||||
password = {{@@ env['PASS_MPD'] @@}}
|
||||
|
||||
[Bling]
|
||||
notify = False
|
|
@ -1,24 +0,0 @@
|
|||
music_directory "~/Music"
|
||||
playlist_directory "~/Music/Playlists"
|
||||
db_file "~/.mpd/database"
|
||||
log_file "~/.mpd/log"
|
||||
state_file "~/.mpd/state"
|
||||
sticker_file "~/.mpd/sticker.sql"
|
||||
|
||||
replaygain "track"
|
||||
|
||||
default_permissions "read,add,control"
|
||||
password "{{@@ env['PASS_MPD'] @@}}@read,add,control"
|
||||
password "{{@@ env['PASS_MPD_ADMIN'] @@}}@read,add,control,admin"
|
||||
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "Visualizer"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "MPD PipeWire"
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
Alt+LEFT add video-pan-x -0.1
|
||||
Alt+h add video-pan-x -0.1
|
||||
|
||||
Alt+DOWN add video-pan-y +0.1
|
||||
Alt+j add video-pan-y +0.1
|
||||
|
||||
Alt+UP add video-pan-y -0.1
|
||||
Alt+k add video-pan-y -0.1
|
||||
|
||||
Alt+RIGHT add video-pan-x +0.1
|
||||
Alt+l add video-pan-x +0.1
|
||||
|
||||
# control pulseaudio volume
|
||||
9 add ao-volume -2
|
||||
0 add ao-volume +2
|
||||
/ add ao-volume -2
|
||||
* add ao-volume +2
|
||||
m cycle ao-mute
|
||||
VOLUME_DOWN add ao-volume -2
|
||||
VOLUME_UP add ao-volume +2
|
||||
MUTE cycle ao-mute
|
||||
|
||||
= add audio-delay 0.100
|
||||
- add audio-delay -0.100
|
||||
|
||||
s playlist-shuffle
|
|
@ -1,109 +0,0 @@
|
|||
#############
|
||||
# Video #
|
||||
#############
|
||||
|
||||
# Hardware decoding
|
||||
vo=gpu
|
||||
hwdec=vaapi
|
||||
hwdec-codecs=all
|
||||
|
||||
{%@@ if wayland @@%}
|
||||
gpu-context=wayland
|
||||
{%@@ endif @@%}
|
||||
|
||||
#############
|
||||
# Audio #
|
||||
#############
|
||||
pulse-buffer=50 # using a large buffer causes seeking issues
|
||||
audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed
|
||||
replaygain=track
|
||||
|
||||
#############
|
||||
# misc #
|
||||
#############
|
||||
|
||||
# Start ipc server
|
||||
input-ipc-server=/tmp/mpvsocket
|
||||
|
||||
# set youtube-dl max res
|
||||
{%@@ if profile == "Moria" @@%}
|
||||
ytdl-format=bestvideo[height<=2160]+bestaudio/best[height<=2160]
|
||||
{%@@ else @@%}
|
||||
ytdl-format=bestvideo[height<=1080]+bestaudio/best[height<=1080]
|
||||
{%@@ endif @@%}
|
||||
|
||||
# continue watching
|
||||
save-position-on-quit
|
||||
|
||||
#############
|
||||
# Languages #
|
||||
#############
|
||||
slang=eng,en,enUS,en-US,fi,fiFI,fi-FI # automatically select these subtitles (decreasing priority)
|
||||
alang=eng,en,enUS,en-US,fi,fiFI,fi-FI # automatically select these audio tracks (decreasing priority)
|
||||
ytdl-raw-options=sub-lang="en,eng,enUS,en-US,fi,fiFI,fi-FI"
|
||||
|
||||
#############
|
||||
# Subtitles #
|
||||
#############
|
||||
no-sub # subtitles off on startup
|
||||
demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking
|
||||
sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload
|
||||
sub-file-paths=ass:srt:sub:subs:subtitles # search for external subs in the listed subdirectories
|
||||
embeddedfonts=yes # use embedded fonts for SSA/ASS subs
|
||||
sub-ass-force-style=Kerning=yes # allows you to override style parameters of ASS scripts
|
||||
|
||||
# the following options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT)
|
||||
sub-font="Overpass"
|
||||
sub-font-size=45
|
||||
sub-color="#FFFFFFFF"
|
||||
sub-border-color="#FF262626"
|
||||
sub-border-size=3.2
|
||||
sub-shadow-offset=1
|
||||
sub-shadow-color="#33000000"
|
||||
sub-spacing=0.5
|
||||
|
||||
# OSD customizations
|
||||
osd-font="Lucida Console"
|
||||
osd-font-size=30
|
||||
osd-color="#ffffffff" # ARGB format
|
||||
osd-border-color="#ff151515" # ARGB format
|
||||
osd-bar-align-y=0 # progress bar y alignment (-1 top, 0 centered, 1 bottom)
|
||||
osd-border-size=2 # size for osd text and progress bar
|
||||
osd-shadow-offset=1 # pixel width for osd text and progress bar
|
||||
osd-bar-w=60 # width of " " "
|
||||
osd-shadow-color="#11000000"
|
||||
osd-fractions
|
||||
|
||||
# Protocol specific configuration
|
||||
[protocol.https]
|
||||
cache=yes
|
||||
user-agent='Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0'
|
||||
|
||||
[protocol.http]
|
||||
cache=yes
|
||||
user-agent='Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0'
|
||||
|
||||
# Some settings for gifs
|
||||
[extension.gif]
|
||||
cache=no
|
||||
no-pause
|
||||
loop-file=yes
|
||||
|
||||
[extension.gifv]
|
||||
cache=no
|
||||
no-pause
|
||||
loop-file=yes
|
||||
|
||||
# Profiles for different qualities
|
||||
[360p]
|
||||
ytdl-format="bestvideo[height<=360]+bestaudio/best[height<=360]"
|
||||
[480p]
|
||||
ytdl-format="bestvideo[height<=480]+bestaudio/best[height<=480]"
|
||||
[720p]
|
||||
ytdl-format="bestvideo[height<=720]+bestaudio/best[height<=720]"
|
||||
[4k]
|
||||
ytdl-format="bestvideo[height<=2160]+bestaudio/best[height<=2160]"
|
||||
[best]
|
||||
ytdl-format="bestvideo+bestaudio"
|
||||
|
||||
script-opts-append=ytdl_hook-ytdl_path=yt-dlp
|
|
@ -1 +0,0 @@
|
|||
hidetimeout=2000
|
|
@ -1,30 +0,0 @@
|
|||
-- default keybinding: b
|
||||
-- add the following to your input.conf to change the default keybinding:
|
||||
-- keyname script_binding auto_load_subs
|
||||
local utils = require 'mp.utils'
|
||||
|
||||
function display_error()
|
||||
mp.msg.warn("Subtitle download failed: ")
|
||||
mp.osd_message("Subtitle download failed")
|
||||
end
|
||||
|
||||
function load_sub_fn()
|
||||
path = mp.get_property("path")
|
||||
srt_path = string.gsub(path, "%.%w+$", ".srt")
|
||||
t = { args = { "subliminal", "download", "-s", "-f", "-l", "en", path } }
|
||||
|
||||
mp.osd_message("Searching subtitle")
|
||||
res = utils.subprocess(t)
|
||||
if res.error == nil then
|
||||
if mp.commandv("sub_add", srt_path) then
|
||||
mp.msg.warn("Subtitle download succeeded")
|
||||
mp.osd_message("Subtitle '" .. srt_path .. "' download succeeded")
|
||||
else
|
||||
display_error()
|
||||
end
|
||||
else
|
||||
display_error()
|
||||
end
|
||||
end
|
||||
|
||||
mp.add_key_binding("b", "auto_load_subs", load_sub_fn)
|
|
@ -1,505 +0,0 @@
|
|||
--redefine keybindings here if needed; multiple bindings are possible
|
||||
keybinds = {
|
||||
activate = {'\\', 'MOUSE_BTN2'},
|
||||
plsup = {'UP', 'MOUSE_BTN3'},
|
||||
plsdown = {'DOWN', 'MOUSE_BTN4'},
|
||||
plsenter = {'ENTER', 'MOUSE_BTN0'}
|
||||
}
|
||||
--hide playlist after specified number of seconds
|
||||
osd_time=10
|
||||
--show only specified number of playlist entries
|
||||
window=7
|
||||
--fade video when showing playlist
|
||||
fade=false
|
||||
--if fade=true; -100 — black, 0 — normal
|
||||
plsbrightness=-70
|
||||
--favorites get promotion to the top of the pls
|
||||
favorites = {}
|
||||
-- END OF CONFIGURABLE VARIABLES
|
||||
|
||||
-- put your settings in (SCRIPTS DIR)/_iptvconf.lua
|
||||
pcall(require, "_iptvconf")
|
||||
|
||||
local timer
|
||||
--local plscount
|
||||
local pattern=""
|
||||
local is_active
|
||||
local is_playlist_loaded
|
||||
|
||||
-- UTF-8 lower/upper conversion
|
||||
local utf8_lc_uc = {
|
||||
["a"] = "A",
|
||||
["b"] = "B",
|
||||
["c"] = "C",
|
||||
["d"] = "D",
|
||||
["e"] = "E",
|
||||
["f"] = "F",
|
||||
["g"] = "G",
|
||||
["h"] = "H",
|
||||
["i"] = "I",
|
||||
["j"] = "J",
|
||||
["k"] = "K",
|
||||
["l"] = "L",
|
||||
["m"] = "M",
|
||||
["n"] = "N",
|
||||
["o"] = "O",
|
||||
["p"] = "P",
|
||||
["q"] = "Q",
|
||||
["r"] = "R",
|
||||
["s"] = "S",
|
||||
["t"] = "T",
|
||||
["u"] = "U",
|
||||
["v"] = "V",
|
||||
["w"] = "W",
|
||||
["x"] = "X",
|
||||
["y"] = "Y",
|
||||
["z"] = "Z",
|
||||
["а"] = "А",
|
||||
["б"] = "Б",
|
||||
["в"] = "В",
|
||||
["г"] = "Г",
|
||||
["д"] = "Д",
|
||||
["е"] = "Е",
|
||||
["ж"] = "Ж",
|
||||
["з"] = "З",
|
||||
["и"] = "И",
|
||||
["й"] = "Й",
|
||||
["к"] = "К",
|
||||
["л"] = "Л",
|
||||
["м"] = "М",
|
||||
["н"] = "Н",
|
||||
["о"] = "О",
|
||||
["п"] = "П",
|
||||
["р"] = "Р",
|
||||
["с"] = "С",
|
||||
["т"] = "Т",
|
||||
["у"] = "У",
|
||||
["ф"] = "Ф",
|
||||
["х"] = "Х",
|
||||
["ц"] = "Ц",
|
||||
["ч"] = "Ч",
|
||||
["ш"] = "Ш",
|
||||
["щ"] = "Щ",
|
||||
["ъ"] = "Ъ",
|
||||
["ы"] = "Ы",
|
||||
["ь"] = "Ь",
|
||||
["э"] = "Э",
|
||||
["ю"] = "Ю",
|
||||
["я"] = "Я",
|
||||
["ё"] = "Ё"
|
||||
}
|
||||
|
||||
local utf8_uc_lc = {
|
||||
["A"] = "a",
|
||||
["B"] = "b",
|
||||
["C"] = "c",
|
||||
["D"] = "d",
|
||||
["E"] = "e",
|
||||
["F"] = "f",
|
||||
["G"] = "g",
|
||||
["H"] = "h",
|
||||
["I"] = "i",
|
||||
["J"] = "j",
|
||||
["K"] = "k",
|
||||
["L"] = "l",
|
||||
["M"] = "m",
|
||||
["N"] = "n",
|
||||
["O"] = "o",
|
||||
["P"] = "p",
|
||||
["Q"] = "q",
|
||||
["R"] = "r",
|
||||
["S"] = "s",
|
||||
["T"] = "t",
|
||||
["U"] = "u",
|
||||
["V"] = "v",
|
||||
["W"] = "w",
|
||||
["X"] = "x",
|
||||
["Y"] = "y",
|
||||
["Z"] = "z",
|
||||
["А"] = "а",
|
||||
["Б"] = "б",
|
||||
["В"] = "в",
|
||||
["Г"] = "г",
|
||||
["Д"] = "д",
|
||||
["Е"] = "е",
|
||||
["Ж"] = "ж",
|
||||
["З"] = "з",
|
||||
["И"] = "и",
|
||||
["Й"] = "й",
|
||||
["К"] = "к",
|
||||
["Л"] = "л",
|
||||
["М"] = "м",
|
||||
["Н"] = "н",
|
||||
["О"] = "о",
|
||||
["П"] = "п",
|
||||
["Р"] = "р",
|
||||
["С"] = "с",
|
||||
["Т"] = "т",
|
||||
["У"] = "у",
|
||||
["Ф"] = "ф",
|
||||
["Х"] = "х",
|
||||
["Ц"] = "ц",
|
||||
["Ч"] = "ч",
|
||||
["Ш"] = "ш",
|
||||
["Щ"] = "щ",
|
||||
["Ъ"] = "ъ",
|
||||
["Ы"] = "ы",
|
||||
["Ь"] = "ь",
|
||||
["Э"] = "э",
|
||||
["Ю"] = "ю",
|
||||
["Я"] = "я",
|
||||
["Ё"] = "ё"
|
||||
}
|
||||
|
||||
--utf8 char pattern
|
||||
local utf8_char="[\1-\127\192-\223][\128-\191]*"
|
||||
|
||||
local cyr_chars={'а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я'}
|
||||
|
||||
-- символы, которые возможно вводить для поиска
|
||||
local chars={}
|
||||
for i=string.byte('a'),string.byte('z') do
|
||||
table.insert(chars,i)
|
||||
end
|
||||
for i=string.byte('A'),string.byte('Z') do
|
||||
table.insert(chars,i)
|
||||
end
|
||||
for i=string.byte('0'),string.byte('9') do
|
||||
table.insert(chars,i)
|
||||
end
|
||||
for _,v in ipairs({',','^','$','(',')','%','.','[',']','*','+','-','?','`',"'",";"}) do
|
||||
table.insert(chars,string.byte(v))
|
||||
end
|
||||
|
||||
local keybinder = {
|
||||
remove = function(action)
|
||||
for i,_ in ipairs(keybinds[action]) do
|
||||
mp.remove_key_binding(action..tostring(i))
|
||||
end
|
||||
end,
|
||||
add = function(action, func, repeatable)
|
||||
for i,key in ipairs(keybinds[action]) do
|
||||
assert(type(func)=="function", "not a function")
|
||||
if repeatable then
|
||||
mp.add_forced_key_binding(key, action..tostring(i), func, "repeatable")
|
||||
else
|
||||
mp.add_forced_key_binding(key, action..tostring(i), func)
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
local fader = {
|
||||
saved_brtns,
|
||||
on = function(self)
|
||||
if fade and not self.saved_brtns then
|
||||
self.saved_brtns = mp.get_property("brightness")
|
||||
mp.set_property("brightness", plsbrightness)
|
||||
end
|
||||
end,
|
||||
off = function(self)
|
||||
if fade and self.saved_brtns then
|
||||
mp.set_property("brightness", self.saved_brtns)
|
||||
self.saved_brtns=nil
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
local playlister = {
|
||||
-- pls — список элементов плейлиста
|
||||
pls,
|
||||
-- plsfiltered — список индексов выбранных фильтром элементов плейлиста
|
||||
plsfiltered,
|
||||
plspos,
|
||||
wndstart,
|
||||
wndend,
|
||||
cursor,
|
||||
|
||||
init = function(self)
|
||||
if not self.pls then
|
||||
self.pls = mp.get_property_native("playlist")
|
||||
end
|
||||
mp.commandv("stop")
|
||||
--need to mark first entry non-current (mpv bug?)
|
||||
if self.pls[1] then
|
||||
self.pls[1].current = false
|
||||
end
|
||||
if favorites and #favorites>0 then
|
||||
self:sortfavs()
|
||||
end
|
||||
pattern = ""
|
||||
self.plsfiltered = tablekeys(self.pls)
|
||||
end,
|
||||
|
||||
show = function(self)
|
||||
local i
|
||||
local newpos
|
||||
local msg
|
||||
--media-title
|
||||
--playlist t[2].title
|
||||
|
||||
if not self.plsfiltered then
|
||||
return
|
||||
end
|
||||
if not self.plspos then
|
||||
self.plspos=mp.get_property_native("playlist-pos-1")
|
||||
--plscount=mp.get_property_native("playlist-count")
|
||||
end
|
||||
if not self.wndstart or not self.cursor then
|
||||
self.wndstart=1
|
||||
self.cursor=0
|
||||
end
|
||||
|
||||
msg=""
|
||||
i = self.wndstart
|
||||
local prefix
|
||||
while self.plsfiltered[i] and i<=self.wndstart+window-1 do
|
||||
if self.pls[self.plsfiltered[i]].current then
|
||||
prefix="*"
|
||||
elseif i==self.wndstart+self.cursor then
|
||||
prefix=">"
|
||||
else
|
||||
prefix=" "
|
||||
end
|
||||
msg = msg..prefix..(self.pls[self.plsfiltered[i]].title or "").."\n"
|
||||
i=i+1
|
||||
end
|
||||
if self.wndstart>1 then
|
||||
msg = "...\n"..msg
|
||||
else
|
||||
msg = " \n"..msg
|
||||
end
|
||||
if self.wndstart+window-1<#self.plsfiltered then
|
||||
msg = msg.."..."
|
||||
end
|
||||
msg="/"..pattern.."\n"..msg
|
||||
mp.osd_message(msg, osd_time)
|
||||
end,
|
||||
|
||||
sortfavs = function(self)
|
||||
--favorites bubbles to the top
|
||||
local favs={}
|
||||
local nonfavs={}
|
||||
for _,v in ipairs(self.pls) do
|
||||
if in_array(favorites,v.title) then
|
||||
favs[#favs+1] = v
|
||||
else
|
||||
nonfavs[#nonfavs+1] = v
|
||||
end
|
||||
end
|
||||
for i=1,#nonfavs do
|
||||
favs[#favs+1] = nonfavs[i]
|
||||
end
|
||||
self.pls = favs
|
||||
end,
|
||||
|
||||
filter = function(self)
|
||||
self.plsfiltered={}
|
||||
for i,v in ipairs(self.pls) do
|
||||
if string.match(mylower(v.title),'.*'..prepat(pattern)..'.*') then
|
||||
table.insert(self.plsfiltered,i)
|
||||
end
|
||||
end
|
||||
self.wndstart=1
|
||||
self.cursor=0
|
||||
end,
|
||||
|
||||
down = function(self)
|
||||
if self.cursor >= #self.plsfiltered-1 then return end
|
||||
if self.cursor<window-1 then
|
||||
self.cursor=self.cursor+1
|
||||
else
|
||||
if self.wndstart<#self.plsfiltered-window+1 then
|
||||
self.wndstart=self.wndstart+1
|
||||
end
|
||||
end
|
||||
self.show(self)
|
||||
end,
|
||||
up = function(self)
|
||||
if self.cursor>0 then
|
||||
self.cursor=self.cursor-1
|
||||
self.show(self)
|
||||
else
|
||||
if self.wndstart>1 then
|
||||
self.wndstart=self.wndstart-1
|
||||
self.show(self)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
play = function(self)
|
||||
mp.commandv("loadfile",self.pls[self.plsfiltered[self.wndstart+self.cursor]].filename)
|
||||
if self.plspos then
|
||||
self.pls[self.plspos].current=false
|
||||
end
|
||||
self.plspos=self.plsfiltered[self.wndstart+self.cursor]
|
||||
self.pls[self.plspos].current=true
|
||||
end
|
||||
}
|
||||
|
||||
function add_bindings()
|
||||
keybinder.add("plsup", up, true)
|
||||
keybinder.add("plsdown", down, true)
|
||||
for i,v in ipairs(chars) do
|
||||
c=string.char(v)
|
||||
mp.add_forced_key_binding(c, 'search'..v, typing(c),"repeatable")
|
||||
end
|
||||
mp.add_forced_key_binding('SPACE', 'search32', typing(' '),"repeatable")
|
||||
|
||||
--[[ mp.add_key_binding('а', 'search1000', typing('а'),"repeatable")
|
||||
mp.add_key_binding('с', 'search1001', typing('с'),"repeatable")]]
|
||||
|
||||
mp.add_forced_key_binding('BS', 'searchbs', backspace,"repeatable")
|
||||
keybinder.add("plsenter", play)
|
||||
for i,v in ipairs(cyr_chars) do
|
||||
mp.add_forced_key_binding(v, 'search'..i+1000, typing(v),"repeatable")
|
||||
end
|
||||
end
|
||||
|
||||
function remove_bindings()
|
||||
keybinder.remove('plsup')
|
||||
keybinder.remove('plsdown')
|
||||
keybinder.remove('plsenter')
|
||||
for i,v in ipairs(chars) do
|
||||
c=string.char(v)
|
||||
mp.remove_key_binding('search'..v)
|
||||
end
|
||||
mp.remove_key_binding('search32')
|
||||
mp.remove_key_binding('searchbs')
|
||||
for i,v in ipairs(cyr_chars) do
|
||||
mp.remove_key_binding('search'..i+1000)
|
||||
end
|
||||
end
|
||||
|
||||
function activate()
|
||||
if is_active then
|
||||
shutdown()
|
||||
return
|
||||
else
|
||||
is_active=true
|
||||
fader:on()
|
||||
playlister:show()
|
||||
add_bindings()
|
||||
if not timer then
|
||||
timer=mp.add_periodic_timer(osd_time, shutdown)
|
||||
timer.oneshot=true
|
||||
else
|
||||
resumetimer()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function tablekeys(t)
|
||||
local result={}
|
||||
for i,v in ipairs(t) do
|
||||
table.insert(result,i)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
function in_array(array, value)
|
||||
for _,v in ipairs(array) do
|
||||
if v==value then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function mylower(s)
|
||||
local res,n = string.gsub(s,utf8_char,function (c)
|
||||
return utf8_uc_lc[c]
|
||||
end)
|
||||
return res
|
||||
end
|
||||
|
||||
function myupper(s)
|
||||
local res,n = string.gsub(s,utf8_char,function (c)
|
||||
return utf8_lc_uc[c]
|
||||
end)
|
||||
return res
|
||||
end
|
||||
|
||||
function prepat(s)
|
||||
--prepare nocase and magic chars
|
||||
s = string.gsub(s, "[%^%$%(%)%%%.%[%]%*%+%-%?]",function (c)
|
||||
return '%'..c
|
||||
end)
|
||||
--[[ s = string.gsub(s, utf8_char, function (c)
|
||||
return string.format("[%s%s]", utf8_uc_lc[c] or c, utf8_lc_uc[c] or c)
|
||||
end)]]
|
||||
return s
|
||||
end
|
||||
|
||||
function resumetimer()
|
||||
timer:kill()
|
||||
timer:resume()
|
||||
end
|
||||
|
||||
function typing(char)
|
||||
return function()
|
||||
local c=string.lower(char)
|
||||
pattern = pattern..c
|
||||
playlister:filter()
|
||||
playlister:show()
|
||||
resumetimer()
|
||||
end
|
||||
end
|
||||
|
||||
function backspace()
|
||||
if string.len(pattern)>0 then
|
||||
-- pattern = string.sub(pattern,1,-2)
|
||||
-- for unicode
|
||||
pattern = string.match(pattern,"(.*)"..utf8_char.."$")
|
||||
playlister:filter()
|
||||
playlister:show()
|
||||
resumetimer()
|
||||
end
|
||||
end
|
||||
|
||||
function play()
|
||||
-- mp.commandv("playlist-move", wndstart+cursor, 1)
|
||||
-- mp.commandv("playlist-clear")
|
||||
-- mp.commandv("playlist-next")
|
||||
fader:off()
|
||||
playlister:play()
|
||||
playlister:show()
|
||||
resumetimer()
|
||||
end
|
||||
|
||||
function shutdown()
|
||||
fader:off()
|
||||
remove_bindings()
|
||||
is_active=false
|
||||
mp.osd_message("", 1)
|
||||
end
|
||||
|
||||
function down()
|
||||
fader:on()
|
||||
playlister:down()
|
||||
resumetimer()
|
||||
end
|
||||
|
||||
function up()
|
||||
fader:on()
|
||||
playlister:up()
|
||||
resumetimer()
|
||||
end
|
||||
|
||||
function on_start_file()
|
||||
if is_playlist_loaded then
|
||||
playlister:init()
|
||||
mp.unregister_event(on_start_file)
|
||||
activate()
|
||||
else
|
||||
is_playlist_loaded = true
|
||||
end
|
||||
end
|
||||
|
||||
if mp.get_opt("iptv") then
|
||||
mp.set_property_bool("idle", true)
|
||||
mp.set_property_bool("force-window", true)
|
||||
mp.register_event("start-file", on_start_file)
|
||||
keybinder.add("activate", activate)
|
||||
end
|
||||
|
|
@ -1,367 +0,0 @@
|
|||
local assdraw = require 'mp.assdraw'
|
||||
|
||||
local W = 0
|
||||
local H = 0
|
||||
-- 2D array of size W*H that's addressed via gField[x][y]. Each entry is a
|
||||
-- table, with the following fields:
|
||||
-- is_mine: true or false
|
||||
-- area_mines: mine count in the 3x3 surrounding area
|
||||
-- is_covered: true or false, for visibility
|
||||
-- flag: flag put by user, one of FLAG_*
|
||||
local gField = nil
|
||||
|
||||
local FLAG_NONE = "" -- not flagged
|
||||
local FLAG_MINE = "⚑" -- "⚐" -- flagged as containing mine
|
||||
local FLAG_MAYBE_MINE = "!" -- flagged as maybe containing mine
|
||||
local FLAG_MAYBE_SAFE = "?" -- flagged as maybe empty
|
||||
|
||||
local STATUS_PLAYING = "playing"
|
||||
local STATUS_WON = "won"
|
||||
local STATUS_LOST = "lost"
|
||||
|
||||
local gStatus = nil
|
||||
|
||||
local gMines = 0
|
||||
|
||||
local gX = 0
|
||||
local gY = 0
|
||||
|
||||
local gNeedRefresh = false
|
||||
local gHidden = true
|
||||
local gTransparent = false
|
||||
|
||||
local PRESETS = {
|
||||
-- taken from kmines
|
||||
{ name = "easy", w = 9, h = 9, mines = 10 },
|
||||
{ name = "medium", w = 16, h = 16, mines = 40 },
|
||||
{ name = "hard", w = 30, h = 16, mines = 99 },
|
||||
}
|
||||
local gCurrentPreset = 2
|
||||
|
||||
function init_field()
|
||||
local preset = PRESETS[gCurrentPreset]
|
||||
gStatus = STATUS_PLAYING
|
||||
gField = {}
|
||||
W = preset.w
|
||||
H = preset.h
|
||||
gMines = math.min(preset.mines, W * H - 1)
|
||||
gX = 1
|
||||
gY = 1
|
||||
|
||||
for x = 1, W do
|
||||
gField[x] = {}
|
||||
for y = 1, H do
|
||||
gField[x][y] = {
|
||||
is_mine = false,
|
||||
area_mines = 0,
|
||||
is_covered = true,
|
||||
flag = FLAG_NONE,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
-- place mines using the dumbfuck algorithm
|
||||
local place_mines = gMines
|
||||
while place_mines > 0 do
|
||||
local x = math.random(1, W)
|
||||
local y = math.random(1, H)
|
||||
if not gField[x][y].is_mine then
|
||||
gField[x][y].is_mine = true
|
||||
place_mines = place_mines - 1
|
||||
end
|
||||
end
|
||||
|
||||
-- pick a random start position (also using dumbfuck algorithm)
|
||||
for i = 1, 1000000 do
|
||||
local x = math.random(1, W)
|
||||
local y = math.random(1, H)
|
||||
if not gField[x][y].is_mine then
|
||||
gX = x
|
||||
gY = y
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- compute proximities after mines have been placed
|
||||
for y = 1, H do
|
||||
for x = 1, W do
|
||||
local tile = gField[x][y]
|
||||
for a_x = -1, 1 do
|
||||
for a_y = -1, 1 do
|
||||
local t_x = x + a_x
|
||||
local t_y = y + a_y
|
||||
if t_x >= 1 and t_x <= W and t_y >= 1 and t_y <= H and
|
||||
gField[t_x][t_y].is_mine
|
||||
then
|
||||
tile.area_mines = tile.area_mines + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
uncover()
|
||||
|
||||
check_status()
|
||||
|
||||
gNeedRefresh = true
|
||||
end
|
||||
|
||||
function uncover_at(x, y)
|
||||
if x < 1 or x > W or y < 1 or y > H then
|
||||
return
|
||||
end
|
||||
|
||||
local tile = gField[x][y]
|
||||
|
||||
if not tile.is_covered then
|
||||
return
|
||||
end
|
||||
|
||||
tile.is_covered = false
|
||||
|
||||
if tile.is_mine then
|
||||
return -- lost anyway
|
||||
end
|
||||
|
||||
-- uncover mines as far as it goes
|
||||
-- apparently, the standard thing to do is recursively uncovering all
|
||||
-- tiles which have 0 neightbours - tiles with 1 or more neighbours are
|
||||
-- uncovered, but not recursively
|
||||
if tile.area_mines == 0 then
|
||||
for a_x = -1, 1 do
|
||||
for a_y = -1, 1 do
|
||||
uncover_at(x + a_x, y + a_y)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
gNeedRefresh = true
|
||||
end
|
||||
|
||||
function check_status()
|
||||
if gStatus ~= STATUS_PLAYING then
|
||||
return
|
||||
end
|
||||
|
||||
local won = true
|
||||
local lost = false
|
||||
|
||||
for y = 1, H do
|
||||
for x = 1, W do
|
||||
local tile = gField[x][y]
|
||||
won = won and (tile.is_mine == tile.is_covered)
|
||||
lost = lost or (tile.is_mine and not tile.is_covered)
|
||||
end
|
||||
end
|
||||
|
||||
if lost then
|
||||
gStatus = STATUS_LOST
|
||||
gNeedRefresh = true
|
||||
elseif won then
|
||||
gStatus = STATUS_WON
|
||||
gNeedRefresh = true
|
||||
end
|
||||
end
|
||||
|
||||
function uncover()
|
||||
if gStatus ~= STATUS_PLAYING and not gField[gX][gY].is_covered then
|
||||
init_field()
|
||||
render()
|
||||
return
|
||||
end
|
||||
uncover_at(gX, gY)
|
||||
check_status()
|
||||
render()
|
||||
end
|
||||
|
||||
function flag()
|
||||
local tile = gField[gX][gY]
|
||||
local cycle = {FLAG_NONE, FLAG_MINE, FLAG_MAYBE_MINE, FLAG_MAYBE_SAFE}
|
||||
for i = 1, #cycle do
|
||||
if tile.flag == cycle[i] then
|
||||
tile.flag = cycle[(i - 1 + 1) % #cycle + 1]
|
||||
break
|
||||
end
|
||||
end
|
||||
if not tile.is_covered then
|
||||
tile.flag = FLAG_NONE
|
||||
end
|
||||
force_render()
|
||||
end
|
||||
|
||||
function move(x, y)
|
||||
gX = math.min(math.max(gX + x, 1), W)
|
||||
gY = math.min(math.max(gY + y, 1), H)
|
||||
|
||||
force_render()
|
||||
end
|
||||
|
||||
function force_render()
|
||||
gNeedRefresh = true
|
||||
render()
|
||||
end
|
||||
|
||||
function render()
|
||||
if not gNeedRefresh then
|
||||
return
|
||||
end
|
||||
|
||||
if gHidden then
|
||||
mp.set_osd_ass(1280, 720, "")
|
||||
return
|
||||
end
|
||||
|
||||
local canvas_w = 1280
|
||||
local canvas_h = 720
|
||||
local dw, dh, da = mp.get_osd_size()
|
||||
if dw ~= nil and dw > 0 and dh > 0 then
|
||||
canvas_w = dw / dh * canvas_h
|
||||
end
|
||||
|
||||
local tile_wh = 32
|
||||
|
||||
local o_x = canvas_w / 2 - tile_wh * W / 2
|
||||
local o_y = canvas_h / 2 - tile_wh * (H + 2) / 2 + tile_wh
|
||||
|
||||
local ass = assdraw.ass_new()
|
||||
|
||||
local transp = nil
|
||||
if gTransparent then
|
||||
transp = "{\\1a&HA0&\\3a&HA0&}"
|
||||
end
|
||||
|
||||
-- some shitty background
|
||||
ass:new_event()
|
||||
ass:append("{\\1c&Ha3a3a3&\\1a&H30&}")
|
||||
if transp then
|
||||
ass:append(transp)
|
||||
end
|
||||
ass:pos(o_x - tile_wh, o_y - tile_wh)
|
||||
ass:draw_start()
|
||||
ass:rect_cw(0, 0, (W + 2) * tile_wh, (H + 2) * tile_wh)
|
||||
-- grid
|
||||
local function grid_line(x0, y0, x1, y1)
|
||||
ass:new_event()
|
||||
ass:append("{\\bord0.5}")
|
||||
if transp then
|
||||
ass:append(transp)
|
||||
end
|
||||
ass:pos(x0, y0)
|
||||
ass:draw_start()
|
||||
ass:coord(0, 0)
|
||||
ass:line_to(x1 - x0, y1 - y0)
|
||||
end
|
||||
for x = 0, W do
|
||||
local p_x = x * tile_wh + o_x
|
||||
grid_line(p_x, o_y, p_x, o_y + tile_wh * H)
|
||||
end
|
||||
for y = 0, H do
|
||||
local p_y = y * tile_wh + o_y
|
||||
grid_line(o_x, p_y, o_x + tile_wh * W, p_y)
|
||||
end
|
||||
|
||||
local function draw_sym(x, y, sym, c)
|
||||
ass:new_event()
|
||||
ass:pos(x, y)
|
||||
ass:append("{\\an5\\fs25\\bord0\\1c&H" .. c .. "&\\b1}" .. sym)
|
||||
end
|
||||
|
||||
for x = 1, W do
|
||||
for y = 1, H do
|
||||
local tile = gField[x][y]
|
||||
local p_x = (x - 1) * tile_wh + tile_wh / 2 + o_x
|
||||
local p_y = (y - 1) * tile_wh + tile_wh / 2 + o_y
|
||||
local wh = tile_wh - 4
|
||||
local sym = nil
|
||||
if tile.is_covered then
|
||||
ass:new_event()
|
||||
if transp then
|
||||
ass:append(transp)
|
||||
end
|
||||
ass:pos(p_x, p_y)
|
||||
ass:draw_start()
|
||||
ass:round_rect_cw(-wh / 2, -wh / 2, wh / 2, wh / 2, 5)
|
||||
ass:draw_stop()
|
||||
elseif tile.is_mine then
|
||||
draw_sym(p_x, p_y, "💣", "0000FF")
|
||||
elseif tile.area_mines > 0 then
|
||||
draw_sym(p_x, p_y, tile.area_mines, "000000")
|
||||
end
|
||||
if tile.flag ~= FLAG_NONE then
|
||||
draw_sym(p_x, p_y, tile.flag, "FF0000")
|
||||
end
|
||||
if x == gX and y == gY then
|
||||
local wh = tile_wh - 12
|
||||
ass:new_event()
|
||||
ass:append("{\\1a&HFF&}")
|
||||
ass:pos(p_x, p_y)
|
||||
ass:draw_start()
|
||||
ass:rect_cw(-wh / 2, -wh / 2, wh / 2, wh / 2)
|
||||
ass:draw_stop()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local banner = nil
|
||||
if gStatus == STATUS_WON then
|
||||
banner = "You may have won, but actually you just wasted time."
|
||||
elseif gStatus == STATUS_LOST then
|
||||
banner = "You lost (and wasted time)."
|
||||
end
|
||||
if banner then
|
||||
ass:new_event()
|
||||
ass:pos(o_x + tile_wh * W / 2, o_y - tile_wh - 10)
|
||||
ass:append("{\\fs40\\b1\\an2}" .. banner)
|
||||
end
|
||||
|
||||
mp.set_osd_ass(canvas_w, canvas_h, ass.text)
|
||||
end
|
||||
|
||||
mp.observe_property("osd-width", "native", force_render)
|
||||
mp.observe_property("osd-height", "native", force_render)
|
||||
|
||||
init_field()
|
||||
force_render()
|
||||
|
||||
function toggle_transp()
|
||||
gTransparent = not gTransparent
|
||||
force_render()
|
||||
end
|
||||
|
||||
function cycle_preset()
|
||||
gCurrentPreset = (gCurrentPreset + 1 - 1) % #PRESETS + 1
|
||||
init_field()
|
||||
render()
|
||||
end
|
||||
|
||||
function toggle_show()
|
||||
if gHidden then
|
||||
gHidden = false
|
||||
|
||||
local REP = {repeatable = true}
|
||||
mp.add_forced_key_binding("left", "mines-left", function() move(-1, 0) end, REP)
|
||||
mp.add_forced_key_binding("right", "mines-right", function() move(1, 0) end, REP)
|
||||
mp.add_forced_key_binding("up", "mines-up", function() move(0, -1) end, REP)
|
||||
mp.add_forced_key_binding("down", "mines-down", function() move(0, 1) end, REP)
|
||||
mp.add_forced_key_binding("space", "mines-uncover", uncover)
|
||||
mp.add_forced_key_binding("b", "mines-flag", flag)
|
||||
mp.add_forced_key_binding("t", "mines-transp", toggle_transp)
|
||||
mp.add_forced_key_binding("w", "mines-preset", cycle_preset)
|
||||
else
|
||||
gHidden = true
|
||||
|
||||
mp.remove_key_binding("mines-left")
|
||||
mp.remove_key_binding("mines-right")
|
||||
mp.remove_key_binding("mines-up")
|
||||
mp.remove_key_binding("mines-down")
|
||||
mp.remove_key_binding("mines-uncover")
|
||||
mp.remove_key_binding("mines-flag")
|
||||
mp.remove_key_binding("mines-transp")
|
||||
mp.remove_key_binding("mines-preset")
|
||||
end
|
||||
|
||||
force_render()
|
||||
end
|
||||
|
||||
mp.add_forced_key_binding("ctrl+x", "mines-show", toggle_show)
|
|
@ -1,43 +0,0 @@
|
|||
-- Toggle redshift when viewing videos with mpv
|
||||
|
||||
if os.execute("pgrep -x redshift >/dev/null") ~= 0
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
-- Consider that redshift is enabled when starting
|
||||
rs_enabled = true
|
||||
|
||||
function rs_toggle()
|
||||
os.execute("pkill -x -USR1 redshift")
|
||||
end
|
||||
|
||||
function rs_disable()
|
||||
if rs_enabled
|
||||
then
|
||||
rs_toggle()
|
||||
rs_enabled = false
|
||||
mp.msg.log("info", "Disabling redshift")
|
||||
end
|
||||
end
|
||||
|
||||
function rs_enable()
|
||||
if not rs_enabled
|
||||
then
|
||||
rs_toggle()
|
||||
rs_enabled = true
|
||||
mp.msg.log("info", "Reenabling redshift")
|
||||
end
|
||||
end
|
||||
|
||||
function rs_handler()
|
||||
if mp.get_property("video") ~= "no"
|
||||
then
|
||||
rs_disable()
|
||||
else
|
||||
rs_enable()
|
||||
end
|
||||
end
|
||||
|
||||
mp.register_event("file-loaded", rs_handler)
|
||||
mp.register_event("shutdown", rs_enable)
|
|
@ -1,145 +0,0 @@
|
|||
local msg = require "mp.msg"
|
||||
local utils = require "mp.utils"
|
||||
local options = require "mp.options"
|
||||
|
||||
local cut_pos = nil
|
||||
local copy_audio = true
|
||||
local o = {
|
||||
target_dir = "~",
|
||||
vcodec = "rawvideo",
|
||||
acodec = "pcm_s16le",
|
||||
prevf = "",
|
||||
vf = "format=yuv444p16$hqvf,scale=in_color_matrix=$matrix,format=bgr24",
|
||||
hqvf = "",
|
||||
postvf = "",
|
||||
opts = "",
|
||||
ext = "avi",
|
||||
command_template = [[
|
||||
ffmpeg -v warning -y -stats
|
||||
-ss $shift -i "$in" -t $duration
|
||||
-c:v $vcodec -c:a $acodec $audio
|
||||
-vf $prevf$vf$postvf $opts "$out.$ext"
|
||||
]],
|
||||
}
|
||||
options.read_options(o)
|
||||
|
||||
function timestamp(duration)
|
||||
local hours = duration / 3600
|
||||
local minutes = duration % 3600 / 60
|
||||
local seconds = duration % 60
|
||||
return string.format("%02d:%02d:%02.03f", hours, minutes, seconds)
|
||||
end
|
||||
|
||||
function osd(str)
|
||||
return mp.osd_message(str, 3)
|
||||
end
|
||||
|
||||
function get_homedir()
|
||||
-- It would be better to do platform detection instead of fallback but
|
||||
-- it's not that easy in Lua.
|
||||
return os.getenv("HOME") or os.getenv("USERPROFILE") or ""
|
||||
end
|
||||
|
||||
function log(str)
|
||||
local logpath = utils.join_path(
|
||||
o.target_dir:gsub("~", get_homedir()),
|
||||
"mpv_slicing.log")
|
||||
f = io.open(logpath, "a")
|
||||
f:write(string.format("# %s\n%s\n",
|
||||
os.date("%Y-%m-%d %H:%M:%S"),
|
||||
str))
|
||||
f:close()
|
||||
end
|
||||
|
||||
function escape(str)
|
||||
-- FIXME(Kagami): This escaping is NOT enough, see e.g.
|
||||
-- https://stackoverflow.com/a/31413730
|
||||
-- Consider using `utils.subprocess` instead.
|
||||
return str:gsub("\\", "\\\\"):gsub('"', '\\"')
|
||||
end
|
||||
|
||||
function trim(str)
|
||||
return str:gsub("^%s+", ""):gsub("%s+$", "")
|
||||
end
|
||||
|
||||
function get_csp()
|
||||
local csp = mp.get_property("colormatrix")
|
||||
if csp == "bt.601" then return "bt601"
|
||||
elseif csp == "bt.709" then return "bt709"
|
||||
elseif csp == "smpte-240m" then return "smpte240m"
|
||||
else
|
||||
local err = "Unknown colorspace: " .. csp
|
||||
osd(err)
|
||||
error(err)
|
||||
end
|
||||
end
|
||||
|
||||
function get_outname(shift, endpos)
|
||||
local name = mp.get_property("filename")
|
||||
local dotidx = name:reverse():find(".", 1, true)
|
||||
if dotidx then name = name:sub(1, -dotidx-1) end
|
||||
name = name:gsub(" ", "_")
|
||||
name = name:gsub(":", "-")
|
||||
name = name .. string.format(".%s-%s", timestamp(shift), timestamp(endpos))
|
||||
return name
|
||||
end
|
||||
|
||||
function cut(shift, endpos)
|
||||
local cmd = trim(o.command_template:gsub("%s+", " "))
|
||||
local inpath = escape(utils.join_path(
|
||||
utils.getcwd(),
|
||||
mp.get_property("stream-path")))
|
||||
local outpath = escape(utils.join_path(
|
||||
o.target_dir:gsub("~", get_homedir()),
|
||||
get_outname(shift, endpos)))
|
||||
|
||||
cmd = cmd:gsub("$shift", shift)
|
||||
cmd = cmd:gsub("$duration", endpos - shift)
|
||||
cmd = cmd:gsub("$vcodec", o.vcodec)
|
||||
cmd = cmd:gsub("$acodec", o.acodec)
|
||||
cmd = cmd:gsub("$audio", copy_audio and "" or "-an")
|
||||
cmd = cmd:gsub("$prevf", o.prevf)
|
||||
cmd = cmd:gsub("$vf", o.vf)
|
||||
cmd = cmd:gsub("$hqvf", o.hqvf)
|
||||
cmd = cmd:gsub("$postvf", o.postvf)
|
||||
cmd = cmd:gsub("$matrix", get_csp())
|
||||
cmd = cmd:gsub("$opts", o.opts)
|
||||
-- Beware that input/out filename may contain replacing patterns.
|
||||
cmd = cmd:gsub("$ext", o.ext)
|
||||
cmd = cmd:gsub("$out", outpath)
|
||||
cmd = cmd:gsub("$in", inpath, 1)
|
||||
|
||||
msg.info(cmd)
|
||||
log(cmd)
|
||||
os.execute(cmd)
|
||||
end
|
||||
|
||||
function toggle_mark()
|
||||
local pos = mp.get_property_number("time-pos")
|
||||
if cut_pos then
|
||||
local shift, endpos = cut_pos, pos
|
||||
if shift > endpos then
|
||||
shift, endpos = endpos, shift
|
||||
end
|
||||
if shift == endpos then
|
||||
osd("Cut fragment is empty")
|
||||
else
|
||||
cut_pos = nil
|
||||
osd(string.format("Cut fragment: %s - %s",
|
||||
timestamp(shift),
|
||||
timestamp(endpos)))
|
||||
cut(shift, endpos)
|
||||
end
|
||||
else
|
||||
cut_pos = pos
|
||||
osd(string.format("Marked %s as start position", timestamp(pos)))
|
||||
end
|
||||
end
|
||||
|
||||
function toggle_audio()
|
||||
copy_audio = not copy_audio
|
||||
osd("Audio capturing is " .. (copy_audio and "enabled" or "disabled"))
|
||||
end
|
||||
|
||||
mp.add_key_binding("c", "slicing_mark", toggle_mark)
|
||||
mp.add_key_binding("a", "slicing_audio", toggle_audio)
|
|
@ -1,76 +0,0 @@
|
|||
-- Copied from https://github.com/pekkarr/mpv-yledl
|
||||
-- Copyright 2021 Pekka Ristola
|
||||
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
local msg = require 'mp.msg'
|
||||
local utils = require 'mp.utils'
|
||||
|
||||
local function add_series(data)
|
||||
local playlist = { "#EXTM3U" }
|
||||
for _, episode in pairs(data) do
|
||||
table.insert(playlist, episode["webpage"])
|
||||
end
|
||||
mp.set_property("stream-open-filename", "memory://" .. table.concat(playlist, "\n"))
|
||||
end
|
||||
|
||||
local function add_single_video(data)
|
||||
local flavors = data["flavors"]
|
||||
table.sort(flavors, function(a, b) return a["bitrate"] > b["bitrate"] end)
|
||||
local best = flavors[1]
|
||||
mp.set_property("stream-open-filename", best["url"])
|
||||
mp.set_property("file-local-options/force-media-title", data["title"])
|
||||
for _, sub in ipairs(data["subtitles"]) do
|
||||
local lang = sub["language"]
|
||||
msg.verbose("Adding subtitles for " .. lang)
|
||||
mp.commandv("sub-add", sub["url"], "auto", sub["category"], lang)
|
||||
end
|
||||
end
|
||||
|
||||
mp.add_hook("on_load", 9, function()
|
||||
msg.verbose('yle-dl hook')
|
||||
local url = mp.get_property("stream-open-filename", "")
|
||||
if (url:find("https?://%a+%.yle%.fi/") == 1) or (url:find("https?://yle%.fi/") == 1) then
|
||||
local start_time = os.clock()
|
||||
local command = { "yle-dl", "--showmetadata", url }
|
||||
msg.debug("Running: " .. table.concat(command, ' '))
|
||||
local ret = mp.command_native({name = "subprocess",
|
||||
args = command,
|
||||
capture_stdout = true,
|
||||
capture_stderr = false})
|
||||
if ret.killed_by_us then
|
||||
return
|
||||
end
|
||||
if (ret.status < 0) or (ret.stdout == nil) or (ret.stdout == "") then
|
||||
msg.error("yle-dl failed to parse url")
|
||||
return
|
||||
end
|
||||
|
||||
local json, err = utils.parse_json(ret.stdout)
|
||||
if (json == nil) then
|
||||
msg.error("failed to parse JSON: " .. err)
|
||||
return
|
||||
end
|
||||
msg.verbose("yle-dl succeeded")
|
||||
msg.debug("running yle-dl took " .. os.clock() - start_time .. " seconds")
|
||||
|
||||
if #json == 1 then
|
||||
add_single_video(json[1])
|
||||
else
|
||||
add_series(json)
|
||||
end
|
||||
else
|
||||
msg.verbose('not an areena url')
|
||||
end
|
||||
end)
|
|
@ -1,26 +0,0 @@
|
|||
defaults
|
||||
auth on
|
||||
tls on
|
||||
tls_starttls off
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
logfile ~/.log/msmtp.log
|
||||
host smtp.migadu.com
|
||||
port 465
|
||||
|
||||
# functionalhacker@korhonen.cc
|
||||
account functionalhacker@korhonen.cc
|
||||
from functionalhacker@korhonen.cc
|
||||
user functionalhacker@korhonen.cc
|
||||
password "{{@@ env['PASS_EMAIL_HACKER'] @@}}"
|
||||
|
||||
# marko@korhonen.cc
|
||||
account marko@korhonen.cc
|
||||
from marko@korhonen.cc
|
||||
user marko@korhonen.cc
|
||||
password "{{@@ env['PASS_EMAIL_MARKO'] @@}}"
|
||||
|
||||
# admin@korhonen.cc
|
||||
account admin@korhonen.cc
|
||||
from admin@korhonen.cc
|
||||
user admin@korhonen.cc
|
||||
password "{{@@ env['PASS_EMAIL_ADMIN'] @@}}"
|
|
@ -1,551 +0,0 @@
|
|||
##############################################################
|
||||
## This is the example bindings file. Copy it to ##
|
||||
## ~/.ncmpcpp/bindings or $XDG_CONFIG_HOME/ncmpcpp/bindings ##
|
||||
## and set up your preferences ##
|
||||
##############################################################
|
||||
##
|
||||
##### General rules #####
|
||||
##
|
||||
## 1) Because each action has runtime checks whether it's
|
||||
## ok to run it, a few actions can be bound to one key.
|
||||
## Actions will be bound in order given in configuration
|
||||
## file. When a key is pressed, first action in order
|
||||
## will test itself whether it's possible to run it. If
|
||||
## test succeeds, action is executed and other actions
|
||||
## bound to this key are ignored. If it doesn't, next
|
||||
## action in order tests itself etc.
|
||||
##
|
||||
## 2) It's possible to bind more that one action at once
|
||||
## to a key. It can be done using the following syntax:
|
||||
##
|
||||
## def_key "key"
|
||||
## action1
|
||||
## action2
|
||||
## ...
|
||||
##
|
||||
## This creates a chain of actions. When such chain is
|
||||
## executed, each action in chain is run until the end of
|
||||
## chain is reached or one of its actions fails to execute
|
||||
## due to its requirements not being met. If multiple actions
|
||||
## and/or chains are bound to the same key, they will be
|
||||
## consecutively run until one of them gets fully executed.
|
||||
##
|
||||
## 3) When ncmpcpp starts, bindings configuration file is
|
||||
## parsed and then ncmpcpp provides "missing pieces"
|
||||
## of default keybindings. If you want to disable some
|
||||
## bindings, there is a special action called 'dummy'
|
||||
## for that purpose. Eg. if you want to disable ability
|
||||
## to crop playlists, you need to put the following
|
||||
## into configuration file:
|
||||
##
|
||||
## def_key "C"
|
||||
## dummy
|
||||
##
|
||||
## After that ncmpcpp will not bind any default action
|
||||
## to this key.
|
||||
##
|
||||
## 4) To let you write simple macros, the following special
|
||||
## actions are provided:
|
||||
##
|
||||
## - push_character "character" - pushes given special
|
||||
## character into input queue, so it will be immediately
|
||||
## picked by ncmpcpp upon next call to readKey function.
|
||||
## Accepted values: mouse, up, down, page_up, page_down,
|
||||
## home, end, space, enter, insert, delete, left, right,
|
||||
## tab, ctrl-a, ctrl-b, ..., ctrl-z, ctrl-[, ctrl-\\,
|
||||
## ctrl-], ctrl-^, ctrl-_, f1, f2, ..., f12, backspace.
|
||||
## In addition, most of these names can be prefixed with
|
||||
## alt-/ctrl-/shift- to be recognized with the appropriate
|
||||
## modifier key(s).
|
||||
##
|
||||
## - push_characters "string" - pushes given string into
|
||||
## input queue.
|
||||
##
|
||||
## - require_runnable "action" - checks whether given action
|
||||
## is runnable and fails if it isn't. This is especially
|
||||
## useful when mixed with previous two functions. Consider
|
||||
## the following macro definition:
|
||||
##
|
||||
## def_key "key"
|
||||
## push_characters "custom_filter"
|
||||
## apply_filter
|
||||
##
|
||||
## If apply_filter can't be currently run, we end up with
|
||||
## sequence of characters in input queue which will be
|
||||
## treated just as we typed them. This may lead to unexpected
|
||||
## results (in this case 'c' will most likely clear current
|
||||
## playlist, 'u' will trigger database update, 's' will stop
|
||||
## playback etc.). To prevent such thing from happening, we
|
||||
## need to change above definition to this one:
|
||||
##
|
||||
## def_key "key"
|
||||
## require_runnable "apply_filter"
|
||||
## push_characters "custom_filter"
|
||||
## apply_filter
|
||||
##
|
||||
## Here, first we test whether apply_filter can be actually run
|
||||
## before we stuff characters into input queue, so if condition
|
||||
## is not met, whole chain is aborted and we're fine.
|
||||
##
|
||||
## - require_screen "screen" - checks whether given screen is
|
||||
## currently active. accepted values: browser, clock, help,
|
||||
## media_library, outputs, playlist, playlist_editor,
|
||||
## search_engine, tag_editor, visualizer, last_fm, lyrics,
|
||||
## selected_items_adder, server_info, song_info,
|
||||
## sort_playlist_dialog, tiny_tag_editor.
|
||||
##
|
||||
## - run_external_command "command" - runs given command using
|
||||
## system() function.
|
||||
##
|
||||
## 5) In addition to binding to a key, you can also bind actions
|
||||
## or chains of actions to a command. If it comes to commands,
|
||||
## syntax is very similar to defining keys. Here goes example
|
||||
## definition of a command:
|
||||
##
|
||||
## def_command "quit" [deferred]
|
||||
## stop
|
||||
## quit
|
||||
##
|
||||
## If you execute the above command (which can be done by
|
||||
## invoking action execute_command, typing 'quit' and pressing
|
||||
## enter), ncmpcpp will stop the player and then quit. Note the
|
||||
## presence of word 'deferred' enclosed in square brackets. It
|
||||
## tells ncmpcpp to wait for confirmation (ie. pressing enter)
|
||||
## after you typed quit. Instead of 'deferred', 'immediate'
|
||||
## could be used. Then ncmpcpp will not wait for confirmation
|
||||
## (enter) and will execute the command the moment it sees it.
|
||||
##
|
||||
## Note: while command chains are executed, internal environment
|
||||
## update (which includes current window refresh and mpd status
|
||||
## update) is not performed for performance reasons. However, it
|
||||
## may be desirable to do so in some situration. Therefore it's
|
||||
## possible to invoke by hand by performing 'update enviroment'
|
||||
## action.
|
||||
##
|
||||
## Note: There is a difference between:
|
||||
##
|
||||
## def_key "key"
|
||||
## action1
|
||||
##
|
||||
## def_key "key"
|
||||
## action2
|
||||
##
|
||||
## and
|
||||
##
|
||||
## def_key "key"
|
||||
## action1
|
||||
## action2
|
||||
##
|
||||
## First one binds two single actions to the same key whilst
|
||||
## second one defines a chain of actions. The behavior of
|
||||
## these two is different and is described in (1) and (2).
|
||||
##
|
||||
## Note: Function def_key accepts non-ascii characters.
|
||||
##
|
||||
##### List of unbound actions #####
|
||||
##
|
||||
## The following actions are not bound to any key/command:
|
||||
##
|
||||
## - set_volume
|
||||
##
|
||||
#
|
||||
#def_key "mouse"
|
||||
# mouse_event
|
||||
#
|
||||
#def_key "h"
|
||||
# previous_column
|
||||
def_key "j"
|
||||
scroll_down
|
||||
def_key "k"
|
||||
scroll_up
|
||||
#def_key "l"
|
||||
# next_column
|
||||
#def_key "up"
|
||||
# scroll_up
|
||||
#
|
||||
#def_key "shift-up"
|
||||
# select_item
|
||||
# scroll_up
|
||||
#
|
||||
#def_key "down"
|
||||
# scroll_down
|
||||
#
|
||||
#def_key "shift-down"
|
||||
# select_item
|
||||
# scroll_down
|
||||
#
|
||||
#def_key "["
|
||||
# scroll_up_album
|
||||
#
|
||||
#def_key "]"
|
||||
# scroll_down_album
|
||||
#
|
||||
#def_key "{"
|
||||
# scroll_up_artist
|
||||
#
|
||||
#def_key "}"
|
||||
# scroll_down_artist
|
||||
#
|
||||
#def_key "page_up"
|
||||
# page_up
|
||||
#
|
||||
#def_key "page_down"
|
||||
# page_down
|
||||
#
|
||||
#def_key "home"
|
||||
# move_home
|
||||
#
|
||||
#def_key "end"
|
||||
# move_end
|
||||
#
|
||||
#def_key "insert"
|
||||
# select_item
|
||||
#
|
||||
#def_key "enter"
|
||||
# enter_directory
|
||||
#
|
||||
#def_key "enter"
|
||||
# toggle_output
|
||||
#
|
||||
#def_key "enter"
|
||||
# run_action
|
||||
#
|
||||
#def_key "enter"
|
||||
# play_item
|
||||
#
|
||||
#def_key "space"
|
||||
# add_item_to_playlist
|
||||
#
|
||||
#def_key "space"
|
||||
# toggle_lyrics_update_on_song_change
|
||||
#
|
||||
#def_key "space"
|
||||
# toggle_visualization_type
|
||||
#
|
||||
#def_key "delete"
|
||||
# delete_playlist_items
|
||||
#
|
||||
#def_key "delete"
|
||||
# delete_browser_items
|
||||
#
|
||||
#def_key "delete"
|
||||
# delete_stored_playlist
|
||||
#
|
||||
#def_key "right"
|
||||
# next_column
|
||||
#
|
||||
#def_key "right"
|
||||
# slave_screen
|
||||
#
|
||||
#def_key "right"
|
||||
# volume_up
|
||||
#
|
||||
#def_key "+"
|
||||
# volume_up
|
||||
#
|
||||
#def_key "left"
|
||||
# previous_column
|
||||
#
|
||||
#def_key "left"
|
||||
# master_screen
|
||||
#
|
||||
#def_key "left"
|
||||
# volume_down
|
||||
#
|
||||
#def_key "-"
|
||||
# volume_down
|
||||
#
|
||||
#def_key ":"
|
||||
# execute_command
|
||||
#
|
||||
#def_key "tab"
|
||||
# next_screen
|
||||
#
|
||||
#def_key "shift-tab"
|
||||
# previous_screen
|
||||
#
|
||||
#def_key "f1"
|
||||
# show_help
|
||||
#
|
||||
#def_key "1"
|
||||
# show_playlist
|
||||
#
|
||||
#def_key "2"
|
||||
# show_browser
|
||||
#
|
||||
#def_key "2"
|
||||
# change_browse_mode
|
||||
#
|
||||
#def_key "3"
|
||||
# show_search_engine
|
||||
#
|
||||
#def_key "3"
|
||||
# reset_search_engine
|
||||
#
|
||||
#def_key "4"
|
||||
# show_media_library
|
||||
#
|
||||
#def_key "4"
|
||||
# toggle_media_library_columns_mode
|
||||
#
|
||||
#def_key "5"
|
||||
# show_playlist_editor
|
||||
#
|
||||
#def_key "6"
|
||||
# show_tag_editor
|
||||
#
|
||||
#def_key "7"
|
||||
# show_outputs
|
||||
#
|
||||
#def_key "8"
|
||||
# show_visualizer
|
||||
#
|
||||
#def_key "="
|
||||
# show_clock
|
||||
#
|
||||
#def_key "@"
|
||||
# show_server_info
|
||||
#
|
||||
#def_key "s"
|
||||
# stop
|
||||
#
|
||||
#def_key "p"
|
||||
# pause
|
||||
#
|
||||
#def_key ">"
|
||||
# next
|
||||
#
|
||||
#def_key "<"
|
||||
# previous
|
||||
#
|
||||
#def_key "ctrl-h"
|
||||
# jump_to_parent_directory
|
||||
#
|
||||
#def_key "ctrl-h"
|
||||
# replay_song
|
||||
#
|
||||
#def_key "backspace"
|
||||
# jump_to_parent_directory
|
||||
#
|
||||
#def_key "backspace"
|
||||
# replay_song
|
||||
#
|
||||
#def_key "f"
|
||||
# seek_forward
|
||||
#
|
||||
#def_key "b"
|
||||
# seek_backward
|
||||
#
|
||||
#def_key "r"
|
||||
# toggle_repeat
|
||||
#
|
||||
#def_key "z"
|
||||
# toggle_random
|
||||
#
|
||||
#def_key "y"
|
||||
# save_tag_changes
|
||||
#
|
||||
#def_key "y"
|
||||
# start_searching
|
||||
#
|
||||
#def_key "y"
|
||||
# toggle_single
|
||||
#
|
||||
#def_key "R"
|
||||
# toggle_consume
|
||||
#
|
||||
#def_key "Y"
|
||||
# toggle_replay_gain_mode
|
||||
#
|
||||
#def_key "T"
|
||||
# toggle_add_mode
|
||||
#
|
||||
#def_key "|"
|
||||
# toggle_mouse
|
||||
#
|
||||
#def_key "#"
|
||||
# toggle_bitrate_visibility
|
||||
#
|
||||
#def_key "Z"
|
||||
# shuffle
|
||||
#
|
||||
#def_key "x"
|
||||
# toggle_crossfade
|
||||
#
|
||||
#def_key "X"
|
||||
# set_crossfade
|
||||
#
|
||||
#def_key "u"
|
||||
# update_database
|
||||
#
|
||||
#def_key "ctrl-s"
|
||||
# sort_playlist
|
||||
#
|
||||
#def_key "ctrl-s"
|
||||
# toggle_browser_sort_mode
|
||||
#
|
||||
#def_key "ctrl-s"
|
||||
# toggle_media_library_sort_mode
|
||||
#
|
||||
#def_key "ctrl-r"
|
||||
# reverse_playlist
|
||||
#
|
||||
#def_key "ctrl-f"
|
||||
# apply_filter
|
||||
#
|
||||
#def_key "ctrl-_"
|
||||
# select_found_items
|
||||
#
|
||||
#def_key "/"
|
||||
# find
|
||||
#
|
||||
#def_key "/"
|
||||
# find_item_forward
|
||||
#
|
||||
#def_key "?"
|
||||
# find
|
||||
#
|
||||
#def_key "?"
|
||||
# find_item_backward
|
||||
#
|
||||
#def_key "."
|
||||
# next_found_item
|
||||
#
|
||||
#def_key ","
|
||||
# previous_found_item
|
||||
#
|
||||
#def_key "w"
|
||||
# toggle_find_mode
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_song
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_library_tag
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_library_album
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_directory_name
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_playlist_name
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_lyrics
|
||||
#
|
||||
#def_key "i"
|
||||
# show_song_info
|
||||
#
|
||||
#def_key "I"
|
||||
# show_artist_info
|
||||
#
|
||||
#def_key "g"
|
||||
# jump_to_position_in_song
|
||||
#
|
||||
#def_key "l"
|
||||
# show_lyrics
|
||||
#
|
||||
#def_key "ctrl-v"
|
||||
# select_range
|
||||
#
|
||||
#def_key "v"
|
||||
# reverse_selection
|
||||
#
|
||||
#def_key "V"
|
||||
# remove_selection
|
||||
#
|
||||
#def_key "B"
|
||||
# select_album
|
||||
#
|
||||
#def_key "a"
|
||||
# add_selected_items
|
||||
#
|
||||
#def_key "c"
|
||||
# clear_playlist
|
||||
#
|
||||
#def_key "c"
|
||||
# clear_main_playlist
|
||||
#
|
||||
#def_key "C"
|
||||
# crop_playlist
|
||||
#
|
||||
#def_key "C"
|
||||
# crop_main_playlist
|
||||
#
|
||||
#def_key "m"
|
||||
# move_sort_order_up
|
||||
#
|
||||
#def_key "m"
|
||||
# move_selected_items_up
|
||||
#
|
||||
#def_key "n"
|
||||
# move_sort_order_down
|
||||
#
|
||||
#def_key "n"
|
||||
# move_selected_items_down
|
||||
#
|
||||
#def_key "M"
|
||||
# move_selected_items_to
|
||||
#
|
||||
#def_key "A"
|
||||
# add
|
||||
#
|
||||
#def_key "S"
|
||||
# save_playlist
|
||||
#
|
||||
#def_key "o"
|
||||
# jump_to_playing_song
|
||||
#
|
||||
#def_key "G"
|
||||
# jump_to_browser
|
||||
#
|
||||
#def_key "G"
|
||||
# jump_to_playlist_editor
|
||||
#
|
||||
#def_key "~"
|
||||
# jump_to_media_library
|
||||
#
|
||||
#def_key "E"
|
||||
# jump_to_tag_editor
|
||||
#
|
||||
#def_key "U"
|
||||
# toggle_playing_song_centering
|
||||
#
|
||||
#def_key "P"
|
||||
# toggle_display_mode
|
||||
#
|
||||
#def_key "\\"
|
||||
# toggle_interface
|
||||
#
|
||||
#def_key "!"
|
||||
# toggle_separators_between_albums
|
||||
#
|
||||
#def_key "L"
|
||||
# toggle_lyrics_fetcher
|
||||
#
|
||||
#def_key "F"
|
||||
# fetch_lyrics_in_background
|
||||
#
|
||||
#def_key "alt-l"
|
||||
# toggle_fetching_lyrics_in_background
|
||||
#
|
||||
#def_key "ctrl-l"
|
||||
# toggle_screen_lock
|
||||
#
|
||||
#def_key "`"
|
||||
# toggle_library_tag_type
|
||||
#
|
||||
#def_key "`"
|
||||
# refetch_lyrics
|
||||
#
|
||||
#def_key "`"
|
||||
# add_random_items
|
||||
#
|
||||
#def_key "ctrl-p"
|
||||
# set_selected_items_priority
|
||||
#
|
||||
#def_key "q"
|
||||
# quit
|
||||
#
|
|
@ -1,156 +0,0 @@
|
|||
##### directories ######
|
||||
ncmpcpp_directory = ~/.ncmpcpp
|
||||
lyrics_directory = ~/.lyrics
|
||||
##### MPD settings #####
|
||||
mpd_host = {{@@ env['PASS_MPD_ADMIN'] @@}}@localhost
|
||||
mpd_port = 6600
|
||||
mpd_connection_timeout = 5
|
||||
mpd_music_dir = ~/Music
|
||||
mpd_crossfade_time = 2
|
||||
|
||||
##### visualizer #####
|
||||
visualizer_data_source = /tmp/mpd.fifo
|
||||
visualizer_output_name = Visualizer
|
||||
visualizer_in_stereo = yes
|
||||
# spectrum,wave,wave_filled,ellipse.
|
||||
visualizer_type = wave_filled
|
||||
visualizer_look = ●▮
|
||||
visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
|
||||
|
||||
##### delays #####
|
||||
# Time of inactivity (in seconds) after playlist highlighting will be disabled
|
||||
## (0 = always on).
|
||||
playlist_disable_highlight_delay = 5
|
||||
message_delay_time = 5
|
||||
|
||||
##### song format #####
|
||||
# %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
|
||||
|
||||
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 = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
|
||||
current_item_prefix = $(yellow)$r
|
||||
current_item_suffix = $/r$(end)
|
||||
current_item_inactive_column_prefix = $(white)$r
|
||||
current_item_inactive_column_suffix = $/r$(end)
|
||||
now_playing_prefix = $b
|
||||
now_playing_suffix = $/b
|
||||
browser_playlist_prefix = "$2playlist$9 "
|
||||
selected_item_prefix = $6
|
||||
selected_item_suffix = $9
|
||||
modified_item_prefix = $3> $9
|
||||
song_window_title_format = {%a - }{%t}|{%f}
|
||||
browser_sort_mode = name
|
||||
browser_sort_format = {%a - }{%t}|{%f} {(%l)}
|
||||
|
||||
##### columns #####
|
||||
song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
|
||||
|
||||
##### misc #####
|
||||
execute_on_song_change = ""
|
||||
execute_on_player_state_change = ""
|
||||
playlist_show_mpd_host = no
|
||||
playlist_show_remaining_time = no
|
||||
playlist_shorten_total_times = no
|
||||
playlist_separate_albums = no
|
||||
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 = no
|
||||
centered_cursor = no
|
||||
progressbar_look = =>
|
||||
default_place_to_search_in = database
|
||||
user_interface = alternative
|
||||
data_fetching_delay = yes
|
||||
media_library_primary_tag = album_artist
|
||||
media_library_albums_split_by_date = yes
|
||||
default_find_mode = wrapped
|
||||
default_tag_editor_pattern = %n - %t
|
||||
header_visibility = yes
|
||||
statusbar_visibility = yes
|
||||
titles_visibility = yes
|
||||
header_text_scrolling = yes
|
||||
cyclic_scrolling = no
|
||||
lines_scrolled = 2
|
||||
lastfm_preferred_language = en
|
||||
screen_switcher_mode = playlist, browser
|
||||
startup_screen = playlist
|
||||
startup_slave_screen = ""
|
||||
startup_slave_screen_focus = no
|
||||
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 = no
|
||||
display_remaining_time = no
|
||||
regular_expressions = perl
|
||||
ignore_leading_the = no
|
||||
ignore_diacritics = no
|
||||
block_search_constraints_change_if_items_found = yes
|
||||
mouse_support = yes
|
||||
mouse_list_scroll_whole_page = yes
|
||||
empty_tag_marker = <empty>
|
||||
tags_separator = " | "
|
||||
tag_editor_extended_numeration = no
|
||||
media_library_sort_by_mtime = no
|
||||
enable_window_title = yes
|
||||
search_engine_default_search_mode = 1
|
||||
external_editor = nvim
|
||||
use_console_editor = yes
|
||||
|
||||
##### lyrics #####
|
||||
#lyrics_fetchers = embedded
|
||||
follow_now_playing_lyrics = yes
|
||||
fetch_lyrics_for_current_song_in_background = no
|
||||
store_lyrics_in_song_dir = no
|
||||
|
||||
##### files #####
|
||||
generate_win32_compatible_filenames = yes
|
||||
allow_for_physical_item_deletion = no
|
||||
space_add_mode = add_remove
|
||||
show_hidden_files_in_local_browser = no
|
||||
|
||||
##### colors #####
|
||||
colors_enabled = yes
|
||||
empty_tag_color = cyan
|
||||
header_window_color = red
|
||||
volume_color = default
|
||||
state_line_color = default
|
||||
state_flags_color = default:b
|
||||
main_window_color = yellow
|
||||
color1 = white
|
||||
color2 = green
|
||||
progressbar_color = black:b
|
||||
progressbar_elapsed_color = green:b
|
||||
statusbar_color = default
|
||||
statusbar_time_color = default:b
|
||||
player_state_color = default:b
|
||||
alternative_ui_separator_color = black:b
|
||||
window_border_color = green
|
||||
active_window_border = red
|
|
@ -1,9 +0,0 @@
|
|||
# vim: filetype=neomuttrc
|
||||
|
||||
set folder = ~/.mail/marko@korhonen.cc
|
||||
set spoolfile = +INBOX
|
||||
set postponed = +Drafts
|
||||
set record = +Sent
|
||||
|
||||
set realname='Marko Korhonen'
|
||||
set from=marko@korhonen.cc
|
|
@ -1,9 +0,0 @@
|
|||
# vim: filetype=neomuttrc
|
||||
|
||||
## General options
|
||||
set header_cache = "~/.cache/neomutt"
|
||||
set mbox_type=Maildir
|
||||
|
||||
# Accounts
|
||||
source "~/.config/neomutt/accounts/marko@korhonen.cc"
|
||||
folder-hook $folder 'source ~/.config/neomutt/accounts/marko@korhonen.cc'
|
|
@ -1,28 +0,0 @@
|
|||
[dmenu]
|
||||
fn = -*-SF-Pro-Display-Regular-*-*-*-10-*-*-*-*-*-*-*
|
||||
dmenu_command = /usr/bin/rofi
|
||||
l = 10
|
||||
# # Note that dmenu_command can contain arguments as well like `rofi -width 30`
|
||||
# # Rofi and dmenu are set to case insensitive by default `-i`
|
||||
# l = number of lines to display, defaults to number of total network options
|
||||
# fn = font string
|
||||
# nb = normal background (name, #RGB, or #RRGGBB)
|
||||
# nf = normal foreground
|
||||
# sb = selected background
|
||||
# sf = selected foreground
|
||||
# b = (just set to empty value and menu will appear at the bottom
|
||||
# m = number of monitor to display on
|
||||
# p = Custom Prompt for the networks menu
|
||||
# pinentry = Pinentry command
|
||||
# rofi_highlight = <True or False> # (Default: False) use rofi highlighting instead of '**'
|
||||
|
||||
# # override normal foreground and background colors (dmenu) or use the
|
||||
# # -password option (rofi) to obscure passphrase entry
|
||||
# [dmenu_passphrase]
|
||||
# nf = #222222
|
||||
# nb = #222222
|
||||
# rofi_obscure = True
|
||||
|
||||
[editor]
|
||||
terminal = termite
|
||||
gui_if_available = True
|
|
@ -1,16 +0,0 @@
|
|||
= FunctionalHacker's NeoVim configuration
|
||||
|
||||
This is my personal NeoVim configuration I use for all text editing in my free
|
||||
time and at my day job. I mostly code in Java, TypeScript and ReactJS, with
|
||||
a bit of Rust and Python once in a blue moon.
|
||||
|
||||
The configuration is quite minimal but still fully featured. Some highlights
|
||||
include
|
||||
|
||||
* LSP support with neovim's built in LSP client
|
||||
** LSP servers are easily installed and auto-configured with Mason
|
||||
* Treesitter
|
||||
** Code folding
|
||||
** Code highlighting
|
||||
** Text objects
|
||||
* Lazy plugin manager for fast startup times
|
|
@ -1,111 +0,0 @@
|
|||
local nvim_local_dir = vim.fn.expand("~/.local/share/nvim")
|
||||
local mason_packages = nvim_local_dir .. "/mason/packages"
|
||||
local lombok_jar = mason_packages .. "/jdtls/lombok.jar"
|
||||
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
|
||||
local workspace_dir = nvim_local_dir .. "/jdtls-workspaces/" .. project_name
|
||||
local lsp_utils = require("lsp_utils")
|
||||
local jvm = "/usr/lib/jvm"
|
||||
local java_version = 21
|
||||
|
||||
require("jdtls").start_or_attach({
|
||||
cmd = {
|
||||
jvm .. "/java-" .. java_version .. "-openjdk-amd64/bin/java",
|
||||
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
||||
"-Dosgi.bundles.defaultStartLevel=4",
|
||||
"-Declipse.product=org.eclipse.jdt.ls.core.product",
|
||||
"-Dlog.protocol=true",
|
||||
"-Dlog.level=ALL",
|
||||
"-Xms1g",
|
||||
"--add-modules=ALL-SYSTEM",
|
||||
"--add-opens",
|
||||
"java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens",
|
||||
"java.base/java.lang=ALL-UNNAMED",
|
||||
"-javaagent:" .. lombok_jar,
|
||||
"-jar",
|
||||
vim.fn.glob(mason_packages .. "/jdtls/plugins/org.eclipse.equinox.launcher_*.jar"),
|
||||
"-configuration",
|
||||
nvim_local_dir .. "/mason/packages/jdtls/config_linux",
|
||||
"-data",
|
||||
workspace_dir,
|
||||
},
|
||||
settings = {
|
||||
java = {
|
||||
signatureHelp = { enabled = true },
|
||||
autobuild = { enabled = false },
|
||||
configuration = {
|
||||
runtimes = {
|
||||
{
|
||||
name = "JavaSE-1.8",
|
||||
path = jvm .. "/java-8-openjdk-amd64/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-11",
|
||||
path = jvm .. "/java-11-openjdk-amd64/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-17",
|
||||
path = jvm .. "/java-17-openjdk-amd64/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-21",
|
||||
path = jvm .. "/java-21-openjdk-amd64/",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
completion = { favoriteStaticMembers = { "java.text.MessageFormat.format" } },
|
||||
handlers = {
|
||||
["language/status"] = function() end,
|
||||
},
|
||||
init_options = {
|
||||
bundles = {
|
||||
vim.fn.glob(mason_packages .. "/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar"),
|
||||
},
|
||||
},
|
||||
capabilities = lsp_utils.get_capabilities(),
|
||||
on_attach = lsp_utils.map_keys,
|
||||
})
|
||||
|
||||
function RunJava()
|
||||
local function show_output(output)
|
||||
vim.cmd("split")
|
||||
vim.cmd("enew")
|
||||
vim.fn.append(0, output)
|
||||
--vim.cmd("1d") -- Remove the empty first line
|
||||
vim.bo[0].modifiable = false
|
||||
end
|
||||
|
||||
local filename = vim.fn.expand("%") -- Get the current file name
|
||||
local class_name = vim.fn.fnamemodify(filename, ":r") -- Extract the class name
|
||||
local compile_cmd = "javac " .. filename
|
||||
local run_cmd = "java " .. class_name
|
||||
|
||||
-- Create a temporary file to capture the compile output
|
||||
local temp_file = vim.fn.tempname()
|
||||
|
||||
-- Run the compilation command and save the output to the temporary file
|
||||
local compile_exit_code = vim.fn.system(compile_cmd .. " > " .. temp_file .. " 2>&1")
|
||||
|
||||
-- Check the exit code of the compile command
|
||||
if compile_exit_code == 0 then
|
||||
-- Compilation was successful, run the Java program
|
||||
show_output(vim.fn.systemlist(run_cmd))
|
||||
else
|
||||
-- Compilation failed, display the error output from the temporary file
|
||||
show_output(vim.fn.readfile(temp_file))
|
||||
end
|
||||
|
||||
-- Clean up the temporary file and class file
|
||||
vim.fn.delete(temp_file)
|
||||
vim.fn.delete(vim.fn.expand("%:p:h") .. "/" .. class_name .. ".class")
|
||||
end
|
||||
|
||||
-- Define a VimScript command to execute the Lua function
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
command! RunJava lua RunJava()
|
||||
]],
|
||||
false
|
||||
)
|
|
@ -1,28 +0,0 @@
|
|||
-- Install lazy if it's not yet installed
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("settings")
|
||||
require("keybinds")
|
||||
require("neovide")
|
||||
require("highlight_yank")
|
||||
require("lazy").setup({
|
||||
spec = { import = "plugins" },
|
||||
lockfile = "~/git/dotfiles/home/.config/nvim/lazy-lock.json",
|
||||
performance = {
|
||||
disabled_plugins = { "netrwPlugin" },
|
||||
},
|
||||
defaults = {
|
||||
-- version = "*", -- Disabled for now
|
||||
},
|
||||
})
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "b84eeb3641b08324287587b426ec974b888390d9" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "b6f4129302db197a7249e67a90de3f2b676de13e" },
|
||||
"auto-dark-mode.nvim": { "branch": "master", "commit": "14cad96b80a07e9e92a0dcbe235092ed14113fb2" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
|
||||
"cder.nvim": { "branch": "main", "commit": "0a071389bb52544ac9cf9557378aa1212dff6982" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-git": { "branch": "main", "commit": "50d526dff0f6bc441b51fc269d9fdc99a50c76af" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"confirm-quit.nvim": { "branch": "main", "commit": "f15f6d728d385a3d2efa22098e9a45b8a2b20144" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
|
||||
"copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dropbar.nvim": { "branch": "master", "commit": "d26bf92161cd70e049dc138b44ffa0246dbf7178" },
|
||||
"firenvim": { "branch": "master", "commit": "bb70728c13c305ff35193586d5f6ce68668af063" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||
"fugitive-gitea": { "branch": "master", "commit": "d93176028d13820f941c165c14039a6019744a5a" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "dddb5d21811c319eb6e51a993d8fb44b193aae3f" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-extra-cmds": { "branch": "main", "commit": "1bf94d631a9d35061e694ab49dbdea83172a8e51" },
|
||||
"mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1c55991321d1a861537e32446affc5de5d9a6eaf" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.nvim": { "branch": "main", "commit": "fe573c7fb74252076d6c6d40837a92a7138dbb00" },
|
||||
"neoformat": { "branch": "master", "commit": "b3b38589b39038dc12c2f5a59a828ed43439363a" },
|
||||
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
|
||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||
"nvim-asciidoc-preview": { "branch": "main", "commit": "50708bea09cead374bf0b4b9c50686de68951d5c" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "99e4b2081de1d9162666cc7b563cbeb01c26b66b" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "43200fb3a820ed1b6c526e0eb0f3e6e6edd9fd64" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "ad0b95dee55955817af635fa121f6e2486b10583" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "cfd2095e66e49ea0dfbef6b41be2efd0ba6cc4ee" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "7dcb8fea3e7b3ccdb50f2c3ae7c248cdf6fe1ae1" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
|
||||
"password-store": { "branch": "master", "commit": "b5e965a838bb68c1227caa2cdd874ba496f10149" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"statuscol.nvim": { "branch": "main", "commit": "93d8bcda516fc86e11c03f9ef577bae9a72fba0e" },
|
||||
"suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
|
||||
"vim-asciidoctor": { "branch": "master", "commit": "f553311b5db03440eb8d7035434d0405e4a2c559" },
|
||||
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
|
||||
"vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" }
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
-- Highlight yanked text
|
||||
|
||||
local ag = vim.api.nvim_create_augroup
|
||||
local au = vim.api.nvim_create_autocmd
|
||||
|
||||
au('TextYankPost', {
|
||||
group = ag('yank_highlight', {}),
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
vim.highlight.on_yank { higroup='IncSearch', timeout=300 }
|
||||
end,
|
||||
})
|
|
@ -1,15 +0,0 @@
|
|||
vim.keymap.set("n", "<leader>b", function()
|
||||
local current_theme = vim.fn.eval("&background")
|
||||
if current_theme == "dark" then
|
||||
vim.cmd("set background=light")
|
||||
else
|
||||
vim.cmd("set background=dark")
|
||||
end
|
||||
end, { desc = "Toggle background between dark and light" })
|
||||
|
||||
vim.keymap.set("n", "<leader>h", "<cmd>nohlsearch<cr>", { desc = "Turn off search highlight" })
|
||||
vim.keymap.set("n", "<leader>co", '<cmd>silent! execute "%bd|e#|bd#"<cr>', { desc = "Close other buffers" })
|
||||
vim.keymap.set("n", "<leader>a", "<cmd>e#<cr>", { desc = "Edit alternate file" })
|
||||
vim.keymap.set("n", "<Tab>", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||
vim.keymap.set("n", "<S-Tab>", "<cmd>bprevious<cr>", { desc = "Previous buffer" })
|
||||
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", { desc = "Exit terminal insert mode with esc" })
|
|
@ -1,56 +0,0 @@
|
|||
-- This module contains lsp related
|
||||
-- reusable functions
|
||||
local m = {}
|
||||
|
||||
local lsp = vim.lsp
|
||||
local diagnostic = vim.diagnostic
|
||||
local k = vim.keymap.set
|
||||
|
||||
-- Maps LSP specific keybinds.
|
||||
-- This makes them only available when LSP is running
|
||||
function m.map_keys()
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
require("which-key").add({
|
||||
{ "<leader>w", group = "Workspace" },
|
||||
})
|
||||
|
||||
k("n", "<leader>F", lsp.buf.format, { desc = "Format with LSP" })
|
||||
k("n", "<leader>ca", lsp.buf.code_action, { desc = "Code action" })
|
||||
k("n", "<leader>e", diagnostic.open_float, { desc = "Open diagnostics" })
|
||||
k("n", "<leader>k", lsp.buf.signature_help, { desc = "Signature help" })
|
||||
k("n", "<leader>rn", lsp.buf.rename, { desc = "Rename symbol" })
|
||||
k("n", "<leader>wa", lsp.buf.add_workspace_folder, { desc = "Add folder" })
|
||||
k("n", "<leader>wl", function()
|
||||
print(vim.inspect(lsp.buf.list_workspace_folders()))
|
||||
end, { desc = "List folders" })
|
||||
k("n", "<leader>wr", lsp.buf.remove_workspace_folder, { desc = "Remove folder" })
|
||||
k("n", "K", lsp.buf.hover, { desc = "Hover" })
|
||||
k("n", "[d", diagnostic.goto_prev, { desc = "Previous diagnostic" })
|
||||
k("n", "]d", diagnostic.goto_next, { desc = "Next diagnostic" })
|
||||
k("n", "gD", lsp.buf.declaration, { desc = "Declaration" })
|
||||
k("n", "gd", builtin.lsp_definitions, { desc = "Definition" })
|
||||
k("n", "gi", builtin.lsp_implementations, { desc = "Implementation" })
|
||||
k("n", "gr", builtin.lsp_references, { desc = "References" })
|
||||
k("n", "gs", builtin.lsp_document_symbols, { desc = "Symbols" })
|
||||
k("n", "gt", lsp.buf.type_definition, { desc = "Type definition" })
|
||||
end
|
||||
|
||||
-- Combine built-in LSP and cmp cabaibilities
|
||||
-- and additional capabilities from other plugins
|
||||
function m.get_capabilities()
|
||||
local capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
lsp.protocol.make_client_capabilities(),
|
||||
require("cmp_nvim_lsp").default_capabilities()
|
||||
)
|
||||
|
||||
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually for ufo
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
return capabilities
|
||||
end
|
||||
|
||||
return m
|
|
@ -1,29 +0,0 @@
|
|||
local g = vim.g
|
||||
local o = vim.o
|
||||
|
||||
-- Change scale factor with C+ and C-
|
||||
g.neovide_scale_factor = {{@@ scale_factor|default(1.0) @@}}
|
||||
local change_scale_factor = function(delta)
|
||||
g.neovide_scale_factor = g.neovide_scale_factor * delta
|
||||
end
|
||||
vim.keymap.set("n", "<C-+>", function()
|
||||
change_scale_factor(1.25)
|
||||
end)
|
||||
vim.keymap.set("n", "<C-->", function()
|
||||
change_scale_factor(1 / 1.25)
|
||||
end)
|
||||
|
||||
-- Hide mouse when typing in neovide (disabled)
|
||||
g.neovide_hide_mouse_when_typing = false
|
||||
|
||||
-- Enable cursor particles in neovide
|
||||
g.neovide_cursor_vfx_mode = "railgun"
|
||||
|
||||
-- Enable dark/light theme detection
|
||||
g.neovide_theme = "auto"
|
||||
|
||||
-- Confirm quit
|
||||
g.neovide_confirm_quit = true
|
||||
|
||||
-- Set font
|
||||
--o.guifont = "Hack Nerd Font Mono:h15"
|
|
@ -1,2 +0,0 @@
|
|||
-- Settings for pager mode
|
||||
vim.keymap.set("n", "q", vim.cmd.q)
|
|
@ -1,39 +0,0 @@
|
|||
-- Startup dashboard
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
dashboard.section.header.val = {
|
||||
[[ __ ]],
|
||||
[[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
|
||||
[[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
|
||||
[[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
|
||||
[[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
|
||||
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
|
||||
}
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button(
|
||||
"<leader>p",
|
||||
"📽 Open a project",
|
||||
":lua require('telescope').extensions.project.project()<CR>"
|
||||
),
|
||||
dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("<C-f>", "🔍 Find file", "<cmd>Telescope find_files<CR>"),
|
||||
dashboard.button("<C-g>", "𑪢 Grep files", "<cmd>Telescope live_grep<CR>"),
|
||||
dashboard.button("l", "🛋 Lazy", ":Lazy<CR>"),
|
||||
dashboard.button("m", "📦 Mason", ":Mason<CR>"),
|
||||
dashboard.button("q", "ꭙ Quit NeoVim", ":qa<CR>"),
|
||||
}
|
||||
|
||||
-- Fortune in footer
|
||||
dashboard.section.footer.val = require("alpha.fortune")()
|
||||
|
||||
dashboard.config.opts.noautocmd = true
|
||||
|
||||
vim.cmd([[autocmd User AlphaReady echo 'ready']])
|
||||
|
||||
alpha.setup(dashboard.config)
|
||||
end,
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
-- AsciiDoc plugins are grouped together here
|
||||
return {
|
||||
-- Vim ♥️ Asciidoctor
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"habamax/vim-asciidoctor",
|
||||
ft = { "asciidoctor", "asciidoc" },
|
||||
},
|
||||
-- AsciiDoc preview
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"tigion/nvim-asciidoc-preview",
|
||||
ft = { "asciidoctor", "asciidoc" },
|
||||
},
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
-- Automatic brackets
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
config = true
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
-- Bufferline
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
--- @type BufferlineConfig
|
||||
opts = {
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(count, level)
|
||||
local icon = level:match("error") and " " or " "
|
||||
return " " .. icon .. count
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
-- Caddyfile syntax support
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"isobit/vim-caddyfile",
|
||||
ft = "caddyfile",
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
-- Auto completion
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", -- Buffer source
|
||||
-- Git source
|
||||
{
|
||||
"petertriho/cmp-git",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = true,
|
||||
},
|
||||
"hrsh7th/cmp-nvim-lsp", -- LSP source
|
||||
"hrsh7th/cmp-nvim-lua", -- Neovim Lua API documentation source
|
||||
"hrsh7th/cmp-path", -- Path source
|
||||
"hrsh7th/cmp-cmdline", -- cmdline source
|
||||
"saadparwaiz1/cmp_luasnip", -- Snippets source
|
||||
"f3fora/cmp-spell", -- Spell check source
|
||||
"petertriho/cmp-git", -- Git source
|
||||
-- Copilot source
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
opts = { fix_pairs = true },
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
|
||||
local bordered = cmp.config.window.bordered()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = bordered,
|
||||
documentation = bordered,
|
||||
},
|
||||
mapping = {
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
-- Snippet placeholder forward
|
||||
["<C-f>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
-- Snippet placeholder backward
|
||||
["<C-b>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
-- Completion menu forward
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
-- If only one entry, select it
|
||||
if #cmp.get_entries() == 1 then
|
||||
cmp.confirm({ select = true })
|
||||
else
|
||||
cmp.select_next_item()
|
||||
end
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
if #cmp.get_entries() == 1 then
|
||||
cmp.confirm({ select = true })
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
-- Completion menu backward
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = "luasnip" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "git" },
|
||||
{ name = "copilot" },
|
||||
{ name = "buffer" },
|
||||
{ name = "spell" },
|
||||
{ name = "path" },
|
||||
{
|
||||
name = "lazydev",
|
||||
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("cmp_git").setup()
|
||||
|
||||
-- Enable autopairs when enter is processed
|
||||
-- on completion
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
||||
-- search cmdline setup.
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{
|
||||
name = "cmdline",
|
||||
option = {
|
||||
ignore_cmds = { "Man", "!" },
|
||||
},
|
||||
},
|
||||
}),
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
-- Confirm before quit
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
cond = vim.g.neovide == not nil,
|
||||
"yutkat/confirm-quit.nvim",
|
||||
event = "CmdlineEnter",
|
||||
opts = {
|
||||
quit_message = "You are in Neovide, are you sure you want to quit?",
|
||||
},
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
-- GitHub Copilot
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"zbirenbaum/copilot.lua",
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
},
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
-- Improved diffs
|
||||
--- @type LazyPluginSpec
|
||||
return { "sindrets/diffview.nvim" }
|
|
@ -1,6 +0,0 @@
|
|||
-- Show the current LSP context in winbar
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
enabled = vim.fn.has("nvim-0.10") == 1,
|
||||
"Bekaboo/dropbar.nvim",
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
-- Neovim inside Firefox
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"glacambre/firenvim",
|
||||
build = function()
|
||||
vim.fn["firenvim#install"](0)
|
||||
end,
|
||||
config = function()
|
||||
vim.g.firenvim_config = {
|
||||
localSettings = {
|
||||
[".*"] = {
|
||||
takeOver = "never",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
-- Git commands
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"tpope/vim-fugitive",
|
||||
dependencies = { "borissov/fugitive-gitea" },
|
||||
config = function()
|
||||
vim.g.fugitive_gitea_domains = {
|
||||
"https://git.korhonen.cc",
|
||||
"https://git.rossum.fi",
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
local k = vim.keymap.set
|
||||
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
local gs = require("gitsigns")
|
||||
gs.setup()
|
||||
|
||||
-- Add groups for which-key
|
||||
require("which-key").add({
|
||||
{ "<leader>g", group = "Git" },
|
||||
{ "<leader>gr", group = "Reset" },
|
||||
{ "<leader>ga", group = "Add" },
|
||||
})
|
||||
|
||||
-- Keybinds
|
||||
local opts
|
||||
|
||||
-- Hunk navigation
|
||||
k("n", "[h", gs.prev_hunk, { desc = "Previous hunk" })
|
||||
k("n", "]h", gs.next_hunk, { desc = "Next hunk" })
|
||||
|
||||
-- Hunk actions
|
||||
opts = { desc = "Hunk" }
|
||||
k("n", "<leader>grh", gs.reset_hunk, opts)
|
||||
k("n", "<leader>gah", gs.stage_hunk, opts)
|
||||
|
||||
-- Buffer actions
|
||||
opts = { desc = "Buffer" }
|
||||
k("n", "<leader>gab", gs.stage_buffer, opts)
|
||||
k("n", "<leader>grb", gs.reset_buffer, opts)
|
||||
end,
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
-- Edit GPG encrypted files transparently
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"jamessan/vim-gnupg",
|
||||
ft = { "gpg" },
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
-- Indent characters
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
--- @type ibl.config
|
||||
opts = {
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"",
|
||||
"checkhealth",
|
||||
"alpha",
|
||||
"git",
|
||||
"gitcommit",
|
||||
"TelescopePrompt",
|
||||
"TelescopeResults",
|
||||
"help",
|
||||
"lazy",
|
||||
"lspinfo",
|
||||
"man",
|
||||
},
|
||||
},
|
||||
},
|
||||
main = "ibl",
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
-- Colorscheme
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"rebelot/kanagawa.nvim",
|
||||
dependencies = { { "f-person/auto-dark-mode.nvim", config = true } },
|
||||
--- @type KanagawaConfig
|
||||
opts = {
|
||||
compile = true,
|
||||
dimInactive = true,
|
||||
colors = {
|
||||
theme = {
|
||||
all = {
|
||||
ui = {
|
||||
bg_gutter = "none", -- Hide gutter background
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
background = {
|
||||
dark = "wave",
|
||||
light = "lotus",
|
||||
},
|
||||
overrides = function(colors)
|
||||
local theme = colors.theme
|
||||
return {
|
||||
-- Transparent floating windows
|
||||
NormalFloat = { bg = "none" },
|
||||
FloatBorder = { bg = "none" },
|
||||
FloatTitle = { bg = "none" },
|
||||
NormalDark = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 },
|
||||
LazyNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
MasonNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
|
||||
-- Block-like modern Telescope UI
|
||||
TelescopeTitle = { fg = theme.ui.special, bold = true },
|
||||
TelescopePromptNormal = { bg = theme.ui.bg_p1 },
|
||||
TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 },
|
||||
TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 },
|
||||
TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 },
|
||||
TelescopePreviewNormal = { bg = theme.ui.bg_dim },
|
||||
TelescopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim },
|
||||
|
||||
-- More uniform look for the popup menu
|
||||
Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1, blend = vim.o.pumblend },
|
||||
PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 },
|
||||
PmenuSbar = { bg = theme.ui.bg_m1 },
|
||||
PmenuThumb = { bg = theme.ui.bg_p2 },
|
||||
}
|
||||
end,
|
||||
},
|
||||
--- @param opts KanagawaConfig
|
||||
config = function(_, opts)
|
||||
require("kanagawa").setup(opts)
|
||||
vim.cmd("colorscheme kanagawa")
|
||||
end,
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
-- Neovim setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API.
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "luvit-meta/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
local noice_mode = require("noice").api.statusline.mode
|
||||
-- Statusline
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
opts = {
|
||||
sections = {
|
||||
lualine_x = {
|
||||
"encoding",
|
||||
"fileformat",
|
||||
"filetype",
|
||||
{
|
||||
noice_mode.get,
|
||||
cond = noice_mode.has,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
"selectioncount",
|
||||
cond = function()
|
||||
local mode = vim.fn.mode()
|
||||
return mode == "v" or mode == "V" or mode == "\22"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"location",
|
||||
cond = function()
|
||||
local mode = vim.fn.mode()
|
||||
return mode ~= "v" and mode ~= "V" and mode ~= "\22"
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
-- Snippets plugin
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
-- Snippets collection
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
config = function()
|
||||
local vsCodeLoader = require("luasnip/loaders/from_vscode")
|
||||
|
||||
-- Load friendly-snippets
|
||||
vsCodeLoader.lazy_load()
|
||||
|
||||
-- Load my custom snippets
|
||||
vsCodeLoader.lazy_load({
|
||||
paths = { "./snippets" },
|
||||
})
|
||||
end,
|
||||
run = "make install_jsregexp",
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
-- Markdown preview
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = "cd app && yarn install",
|
||||
config = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
-- Package manager for LSP servers, DAP adapters etc.
|
||||
-- It also handles starting all of my LSP servers
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- Add MasonUpdateAll
|
||||
{ "Zeioth/mason-extra-cmds", opts = {} },
|
||||
-- Add lockfile support
|
||||
{
|
||||
"zapling/mason-lock.nvim",
|
||||
opts = {
|
||||
lockfile_path = vim.fn.expand("~/git/dotfiles/home/.config/nvim/mason-lock.json"),
|
||||
},
|
||||
},
|
||||
-- Extended functionality for jdtls
|
||||
"mfussenegger/nvim-jdtls",
|
||||
-- Add support for LSP file operations
|
||||
{ "antosha417/nvim-lsp-file-operations", opts = {} },
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
|
||||
local mlspc = require("mason-lspconfig")
|
||||
local lsp_utils = require("lsp_utils")
|
||||
|
||||
local commonLspConfigArgs = {
|
||||
on_attach = lsp_utils.map_keys,
|
||||
capabilities = lsp_utils.get_capabilities(),
|
||||
}
|
||||
|
||||
mlspc.setup()
|
||||
mlspc.setup_handlers({
|
||||
-- Default handler
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup(commonLspConfigArgs)
|
||||
end,
|
||||
|
||||
-- Disable tsserver diagnostics diagnostics
|
||||
-- that come from ESLint
|
||||
["tsserver"] = function()
|
||||
require("lspconfig").tsserver.setup(vim.tbl_extend("force", commonLspConfigArgs, {
|
||||
settings = {
|
||||
diagnostics = {
|
||||
ignoredCodes = {
|
||||
6133, -- Unused variable
|
||||
6192, -- Unused import
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
end,
|
||||
|
||||
-- Don't set up jdtls, it is set up by nvim-jdtls
|
||||
["jdtls"] = function() end,
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
-- Library of 30+ independent Lua modules improving overall Neovim
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"echasnovski/mini.nvim",
|
||||
config = function()
|
||||
require("mini.surround").setup()
|
||||
require("mini.comment").setup()
|
||||
|
||||
-- Recommended for which-key
|
||||
require("mini.icons").setup()
|
||||
end,
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
-- Formatter plugin
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"sbdchd/neoformat",
|
||||
keys = {
|
||||
{
|
||||
desc = "Format with Neoformat",
|
||||
"<leader>f",
|
||||
"<cmd>Neoformat<cr>",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
-- Replace much of neovim's default UI
|
||||
-- with a modern replacement
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
|
||||
--- @type NoiceConfig
|
||||
opts = {
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true,
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
-- add a border to hover docs and signature help
|
||||
lsp_doc_border = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
desc = "Dismiss notifications",
|
||||
"<leader>d",
|
||||
"<cmd>NoiceDismiss<cr>",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
-- High performance color highlighter
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = true,
|
||||
}
|
|
@ -1,123 +0,0 @@
|
|||
-- Debug adapter for NeoVim
|
||||
|
||||
local masonPkg = vim.fn.stdpath("data") .. "/mason/packages"
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
dependencies = { "nvim-neotest/nvim-nio" },
|
||||
config = true,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local configurations = dap.configurations
|
||||
local adapters = dap.adapters
|
||||
local pick_process = require("dap.utils").pick_process
|
||||
|
||||
-- Applies all given configurations to the given filetypes
|
||||
--- @param filetypes string[]
|
||||
--- @param configs Configuration[]
|
||||
local function dapConfigure(filetypes, configs)
|
||||
for _, ft in ipairs(filetypes) do
|
||||
configurations[ft] = configs
|
||||
end
|
||||
end
|
||||
|
||||
-- Bash/sh
|
||||
local bashAdapter = masonPkg .. "/bash-debug-adapter"
|
||||
local bashExtension = bashAdapter .. "/extension"
|
||||
adapters.bashdb = {
|
||||
type = "executable",
|
||||
command = bashAdapter .. "/bash-debug-adapter",
|
||||
name = "bashdb",
|
||||
}
|
||||
configurations.sh = {
|
||||
name = "Debug with bashdb",
|
||||
type = "bashdb",
|
||||
request = "launch",
|
||||
showDebugOutput = true,
|
||||
trace = true,
|
||||
pathBashdbLib = bashExtension .. "/bashdb_dir",
|
||||
pathBashdb = bashExtension .. "/bashdb_dir/bashdb",
|
||||
file = "${file}",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
pathCat = "cat",
|
||||
pathBash = "/bin/bash",
|
||||
pathMkfifo = "mkfifo",
|
||||
pathPkill = "pkill",
|
||||
args = {},
|
||||
env = {},
|
||||
terminalKind = "integrated",
|
||||
}
|
||||
|
||||
-- JavaScript/TypeScript in Firefox/Chrome/Node
|
||||
adapters.libreWolf = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
args = { masonPkg .. "/firefox-debug-adapter/dist/adapter.bundle.js" },
|
||||
}
|
||||
adapters["pwa-node"] = {
|
||||
type = "server",
|
||||
host = "localhost",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "node",
|
||||
args = { masonPkg .. "/js-debug-adapter/js-debug/src/dapDebugServer.js", "8123" },
|
||||
},
|
||||
}
|
||||
|
||||
--- @type Configuration[]
|
||||
local browserConfigs = {
|
||||
{
|
||||
name = "LibreWolf attach",
|
||||
type = "libreWolf",
|
||||
request = "attach",
|
||||
url = "http://localhost:4000",
|
||||
webRoot = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
name = "Chrome attach",
|
||||
type = "pwa-chrome",
|
||||
request = "attach",
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
||||
--- @type Configuration[]
|
||||
local nodeConfigs = {
|
||||
{
|
||||
name = "Node attach",
|
||||
type = "pwa-node",
|
||||
request = "attach",
|
||||
processId = pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
name = "Node launch",
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
port = "8123",
|
||||
},
|
||||
}
|
||||
|
||||
dapConfigure({ "typescriptreact", "javascriptreact" }, browserConfigs)
|
||||
dapConfigure({ "typescript", "javascript" }, vim.tbl_extend("force", browserConfigs, nodeConfigs))
|
||||
|
||||
-- Java
|
||||
configurations.java = {
|
||||
{
|
||||
name = "Debug (Attach) - Remote",
|
||||
type = "java",
|
||||
request = "attach",
|
||||
hostName = "127.0.0.1",
|
||||
port = 9009,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
-- Tree explorer
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
opts = {
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
},
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
desc = "Open/close nvim-tree",
|
||||
"<leader>o",
|
||||
"<cmd>NvimTreeToggle<cr>",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
-- Make editing passwords safer
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"https://git.zx2c4.com/password-store",
|
||||
config = function(plugin)
|
||||
vim.opt.rtp:append(plugin.dir .. "contrib/vim/redact_pass.vim")
|
||||
end,
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
-- Customize statuscolumn
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"luukvbaal/statuscol.nvim",
|
||||
config = function()
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
relculright = true,
|
||||
segments = {
|
||||
{ text = { builtin.foldfunc }, click = "v:lua.ScFa" },
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
-- Do stuff as sudo
|
||||
--- @type LazyPluginSpec
|
||||
return { "lambdalisue/suda.vim" }
|
|
@ -1,107 +0,0 @@
|
|||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = {
|
||||
-- Internal dependency for telescope
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
-- Use fzf for fuzzy finder
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
},
|
||||
|
||||
-- Replace vim built in select with telescope
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
|
||||
-- cd plugin for telescope
|
||||
"zane-/cder.nvim",
|
||||
|
||||
-- project plugin for telescope
|
||||
"nvim-telescope/telescope-project.nvim",
|
||||
},
|
||||
opts = {
|
||||
-- Set layout to vertical
|
||||
defaults = {
|
||||
layout_strategy = "flex",
|
||||
layout_config = {
|
||||
flex = {
|
||||
flip_columns = 200,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = { find_command = { "fd", "-Ht", "f" } },
|
||||
lsp_references = { show_line = false },
|
||||
live_grep = {
|
||||
additional_args = function()
|
||||
return { "--hidden" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
cder = {
|
||||
previewer_command = "eza "
|
||||
.. "-a "
|
||||
.. "--color=always "
|
||||
.. "-T "
|
||||
.. "--level=3 "
|
||||
.. "--icons "
|
||||
.. "--git-ignore "
|
||||
.. "--long "
|
||||
.. "--no-permissions "
|
||||
.. "--no-user "
|
||||
.. "--no-filesize "
|
||||
.. "--git "
|
||||
.. "--ignore-glob=.git",
|
||||
dir_command = { "fd", "-Ht", "d", ".", os.getenv("HOME") },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = function()
|
||||
local telescope = require("telescope")
|
||||
local builtin = require("telescope.builtin")
|
||||
local extensions = telescope.extensions
|
||||
|
||||
return {
|
||||
{
|
||||
desc = "Open Telescope",
|
||||
"t",
|
||||
function()
|
||||
builtin.builtin({ include_extensions = true })
|
||||
end,
|
||||
},
|
||||
{
|
||||
desc = "Change directories",
|
||||
"cd",
|
||||
extensions.cder.cder,
|
||||
},
|
||||
{
|
||||
desc = "Find files",
|
||||
"<C-f>",
|
||||
builtin.find_files,
|
||||
},
|
||||
{
|
||||
desc = "Grep files",
|
||||
"<C-g>",
|
||||
builtin.live_grep,
|
||||
},
|
||||
{
|
||||
desc = "Open a project",
|
||||
"<leader>p",
|
||||
extensions.project.project,
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
telescope.setup(opts)
|
||||
|
||||
-- Load extensions
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("cder")
|
||||
telescope.load_extension("project")
|
||||
telescope.load_extension("notify")
|
||||
end,
|
||||
}
|
|
@ -1,153 +0,0 @@
|
|||
return {
|
||||
-- Improved syntax highlighting, text objects and more
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
init = function()
|
||||
require("nvim-treesitter.install").update({
|
||||
with_sync = true,
|
||||
})
|
||||
end,
|
||||
--- @type TSConfig
|
||||
opts = {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"css",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"html",
|
||||
"http",
|
||||
"java",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"json5",
|
||||
"jsonc",
|
||||
"latex",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"php",
|
||||
"python",
|
||||
"query",
|
||||
"rasi",
|
||||
"regex",
|
||||
"rst",
|
||||
"scss",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
move = {
|
||||
enable = true,
|
||||
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
|
||||
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" },
|
||||
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" },
|
||||
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
|
||||
},
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = {
|
||||
query = "@function.outer",
|
||||
desc = "Select outer part of a function",
|
||||
},
|
||||
["if"] = {
|
||||
query = "@function.inner",
|
||||
desc = "Select inner part of a function",
|
||||
},
|
||||
["ac"] = {
|
||||
query = "@class.outer",
|
||||
desc = "Select outer part of a class",
|
||||
},
|
||||
["ic"] = {
|
||||
query = "@class.inner",
|
||||
desc = "Select inner part of a class",
|
||||
},
|
||||
["as"] = {
|
||||
query = "@scope",
|
||||
query_group = "locals",
|
||||
desc = "Select language scope",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
--- @param opts TSConfig
|
||||
config = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
--- @type table<string, boolean>
|
||||
local added = {}
|
||||
opts.ensure_installed = vim.tbl_filter(function(lang)
|
||||
if added[lang] then
|
||||
return false
|
||||
end
|
||||
added[lang] = true
|
||||
return true
|
||||
end, opts.ensure_installed)
|
||||
end
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
config = function()
|
||||
-- When in diff mode, we want to use the default
|
||||
-- vim text objects c & C instead of the treesitter ones.
|
||||
--- @type table<string,fun(...)>
|
||||
local move = require("nvim-treesitter.textobjects.move")
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
for name, fn in pairs(move) do
|
||||
if name:find("goto") == 1 then
|
||||
move[name] = function(q, ...)
|
||||
if vim.wo.diff then
|
||||
--- @type table<string,string>
|
||||
local config = configs.get_module("textobjects.move")[name]
|
||||
for key, query in pairs(config or {}) do
|
||||
if q == query and key:find("[%]%[][cC]") then
|
||||
vim.cmd("normal! " .. key)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
return fn(q, ...)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Automatically add closing tags for HTML and JSX
|
||||
--- @type LazyPluginSpec
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
config = true,
|
||||
},
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
-- Better folds
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
--- @type UfoConfig
|
||||
opts = {
|
||||
close_fold_kinds_for_ft = {
|
||||
default = { "imports" },
|
||||
},
|
||||
},
|
||||
--- @param opts UfoConfig
|
||||
config = function(_, opts)
|
||||
local ufo = require("ufo")
|
||||
ufo.setup(opts)
|
||||
|
||||
-- Using ufo, we need to remap `zR` and `zM`
|
||||
vim.keymap.set("n", "zR", ufo.openAllFolds)
|
||||
vim.keymap.set("n", "zM", ufo.closeAllFolds)
|
||||
|
||||
-- Fold settings
|
||||
local o = vim.o
|
||||
o.foldcolumn = "1"
|
||||
o.foldlevel = 99
|
||||
o.foldlevelstart = 99
|
||||
o.foldenable = true
|
||||
end,
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
-- Display possible keybinds
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
require("which-key").add({
|
||||
{ "<leader>", group = "Leader" },
|
||||
{ "g", group = "Go to" },
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
local o = vim.o
|
||||
local g = vim.g
|
||||
o.pumblend = 10
|
||||
|
||||
-- Relative line numbers
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
|
||||
-- True colors
|
||||
o.termguicolors = true
|
||||
|
||||
-- Enable cursorline highlighting
|
||||
o.cursorline = true
|
||||
|
||||
-- Floating window transparency
|
||||
o.winblend = 10
|
||||
|
||||
-- Set window title
|
||||
o.title = true
|
||||
o.titlestring = "NeoVim: " .. vim.fn.getcwd()
|
||||
|
||||
-- Diff settings
|
||||
o.diffopt = "filler,internal,algorithm:histogram,indent-heuristic"
|
||||
|
||||
-- Allow switching buffers with unsaved changes
|
||||
o.hidden = true
|
||||
|
||||
o.guicursor = table.concat({
|
||||
"i:ver1", -- Vertical bar cursor in insert mode
|
||||
"a:blinkon1", -- Blinking cursor in all modes
|
||||
}, ",")
|
||||
|
||||
-- Enable global statusline
|
||||
o.laststatus = 3
|
||||
|
||||
-- Use suda by default
|
||||
g.suda_smart_edit = 1
|
||||
|
||||
-- Case insensitive search
|
||||
o.ignorecase = true
|
||||
o.smartcase = true
|
||||
|
||||
-- Set leader
|
||||
g.mapleader = " "
|
||||
|
||||
-- Indentation settings
|
||||
o.tabstop = 4
|
||||
o.softtabstop = -1
|
||||
o.expandtab = true
|
||||
o.shiftwidth = 4
|
||||
o.smartindent = true
|
||||
|
||||
o.showmode = false
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"bash-language-server": "5.4.0",
|
||||
"css-lsp": "4.10.0",
|
||||
"docker-compose-language-service": "0.2.0",
|
||||
"dockerfile-language-server": "0.13.0",
|
||||
"eslint-lsp": "4.10.0",
|
||||
"google-java-format": "v1.23.0",
|
||||
"html-lsp": "4.10.0",
|
||||
"java-debug-adapter": "0.58.0",
|
||||
"jdtls": "v1.38.0",
|
||||
"json-lsp": "4.10.0",
|
||||
"lemminx": "0.27.1",
|
||||
"lua-language-server": "3.10.5",
|
||||
"prettier": "3.3.3",
|
||||
"prettierd": "0.25.3",
|
||||
"stylua": "v0.20.0",
|
||||
"taplo": "0.9.3",
|
||||
"tree-sitter-cli": "v0.22.6",
|
||||
"typescript-language-server": "4.3.3",
|
||||
"yaml-language-server": "1.15.0"
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"queryListFromModel": {
|
||||
"scope": "java",
|
||||
"description": "Create a method to get a List from the database (Rossum JpaBaseDAO)",
|
||||
"prefix": "queryListFromModel",
|
||||
"body": [
|
||||
"public List<$1> $2($3) {",
|
||||
" return queryFromModelObject()",
|
||||
" .where((cb, root) -> $0)",
|
||||
" .results();",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"name": "functionalhacker-snippets",
|
||||
"engines": {
|
||||
"vscode": "^1.11.0"
|
||||
},
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "java",
|
||||
"path": "./java.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
PACKAGER="Marko Korhonen <marko@korhonen.cc>"
|
||||
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
|
||||
'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
|
||||
'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
||||
'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
||||
'rsync::/usr/bin/rsync --no-motd -z %u %o'
|
||||
'scp::/usr/bin/scp -C %u %o')
|
||||
|
||||
|
||||
VCSCLIENTS=('bzr::bzr'
|
||||
'git::git'
|
||||
'hg::mercurial'
|
||||
'svn::subversion')
|
||||
|
||||
CARCH="x86_64"
|
||||
CHOST="x86_64-pc-linux-gnu"
|
||||
|
||||
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
|
||||
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
|
||||
-fstack-clash-protection -fcf-protection \
|
||||
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
|
||||
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
|
||||
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
|
||||
-Wl,-z,pack-relative-relocs"
|
||||
LTOFLAGS="-flto=auto"
|
||||
RUSTFLAGS="-Cforce-frame-pointers=yes"
|
||||
DEBUG_CFLAGS="-g"
|
||||
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
||||
DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||
|
||||
BUILDENV=(!distcc color !ccache check !sign)
|
||||
|
||||
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
|
||||
|
||||
INTEGRITY_CHECK=(md5)
|
||||
STRIP_BINARIES="--strip-all"
|
||||
STRIP_SHARED="--strip-unneeded"
|
||||
STRIP_STATIC="--strip-debug"
|
||||
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
|
||||
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
|
||||
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
||||
DBGSRCDIR="/usr/src/debug"
|
||||
|
||||
|
||||
COMPRESSGZ=(pigz -c -f -n)
|
||||
COMPRESSBZ2=(bzip2 -c -f)
|
||||
COMPRESSXZ=(xz -c -z - --threads=0)
|
||||
COMPRESSZST=(zstd -c -z -q -)
|
||||
COMPRESSLRZ=(lrzip -q)
|
||||
COMPRESSLZO=(lzop -q)
|
||||
COMPRESSZ=(compress -c -f)
|
||||
|
||||
PKGEXT='.pkg.tar.zst'
|
||||
SRCEXT='.src.tar.gz'
|
|
@ -1,6 +0,0 @@
|
|||
[options]
|
||||
NewsOnUpgrade
|
||||
|
||||
[bin]
|
||||
Sudo = doas
|
||||
Bat = /dev/null
|
|
@ -1,9 +0,0 @@
|
|||
[DEFAULT]
|
||||
username_extractor=regex_search
|
||||
regex_username=^username: (.*)$
|
||||
|
||||
[git.rossum.fi*]
|
||||
target=work/ldap.rossum.fi
|
||||
|
||||
[git.korhonen.cc*]
|
||||
target=git/git.korhonen.cc
|
16
home/.config/plasma-workspace/env/wayland.sh
vendored
16
home/.config/plasma-workspace/env/wayland.sh
vendored
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Set environment variables for Sway
|
||||
|
||||
# Firefox
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_USE_XINPUT2=1
|
||||
export MOZ_WEBRENDER=1
|
||||
export MOZ_DBUS_REMOTE=1
|
||||
|
||||
# Fix java on wayland
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
|
||||
|
||||
# Enable wayland support on clutter
|
||||
export CLUTTER_BACKEND=wayland
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue