Skip to content

Instantly share code, notes, and snippets.

@wolandark
wolandark / dict.vim
Created June 20, 2024 23:33
dict wrapper in vim9script. Gets word_under_cursor definition from wordnet and displays it in a split buffer
vim9script
def GetWord()
var word_under_cursor = expand('<cword>')
var result = system('dict -d wn ' .. word_under_cursor)
execute 'vnew'
setlocal buftype=nofile
setlocal bufhidden=hide
@wolandark
wolandark / xkcd.sh
Created June 9, 2024 17:08
grabs the latest xkcd comic and displays it with sixel graphics
#!/usr/bin/env bash
# xkcdsh
# info:
# grabs the latest xkcd comic and displays it with sixel graphics
# Written By Wolandark
# https://www.github.com/wolandark
# Dependency:
# libsixel
# curl
@wolandark
wolandark / No-Signal.sh
Last active February 20, 2024 02:44
No Signal old TV color bars in BASH
#!/usr/bin/env bash
get_terminal_height() {
tput lines
}
get_terminal_width() {
tput cols
}
@wolandark
wolandark / bilingual.vim
Created September 30, 2023 00:36
Settings for using an alternative keymapping in Vim
let g:alt_keymap = 'persian' " Change to your prefered keymap located at $VIMRUNTIME/keymap/
let g:alt_enabled = 1
function! CallToggleKeymap()
if g:alt_enabled
call ToggleKeymap()
endif
endfunction
function! ToggleKeymap()
# Get a load of Loremipsum from your shell using curl:
curl https://www.lipsum.com/feed/json | jq -r '.feed.lipsum'
# Get a load of AI generated occult mystical gibberish from your shell using curl:
curl https://woland.tilde.team/mysticipsum.txt
# Its possible to add a function to your shellrc that does both.
@wolandark
wolandark / gist:2dc4199ad3cbcd9a111d6767c1ffcb55
Created August 12, 2023 02:09
Latest Xresources for Xterm and ST colors
! _ __ __ __
!| | / /___ / /___ _____ ____/ /
!| | /| / / __ \/ / __ `/ __ \/ __ /
!| |/ |/ / /_/ / / /_/ / / / / /_/ /
!|__/|__/\____/_/\__,_/_/ /_/\__,_/
!
! _ __
! | |/ /________ _________ __ _______________ _____
! | // ___/ _ \/ ___/ __ \/ / / / ___/ ___/ _ \/ ___/
! / |/ / / __(__ ) /_/ / /_/ / / / /__/ __(__ )