vim surround
you type capitol v capitol s as if you were typing VIM SURROUND, then you type out your tag like p for example.
you type capitol v capitol s as if you were typing VIM SURROUND, then you type out your tag like p for example.
:!chmod +x %
its a pretty cool trick. so great that you don't need to leave vim!
xfce4 timer is perfect. it can run a shell command periodically. I've got it set up like a pomodoro.Got me wondering how i could do this on my mac? Maybe cron jobs?
I heard cronnix the gui front end for cron jobs was discontinued. maybe Il just use chatgpt to write my cron commands
you type this in the terminal in the current working directory and it joins all your org files you have in there and outputs them to a file called merged.org
cat *.org > merged.org
very handy indeed.
I decided to set up a daemon to automatically start synthing heres how
sudo vim /etc/systemd/system/syncthing.service
use the whoami command if you don't know your username. and add it to this syncthing.service file
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization
After=network.target
[Service]
User=
ExecStart=/usr/bin/syncthing -no-browser -gui-address="http://127.0.0.1:8384"
Restart=on-failure
RestartSec=10
ExecStartPre=/bin/sleep 5
[Install]
WantedBy=multi-user.target
reload systemd to read new service file
sudo systemctl daemon-reload
start syncthing service and enable it to start on boot:
sudo systemctl start syncthing
sudo systemctl enable syncthing
now syncthing should be running as a daemon on your linux system. you can use commands like 'sudo systemctl start/stop/restart/status syncthing'
add this to your vimrc
let g:vimwiki_path = '~/Documents/vimwiki/'
It's annoying how when you first try to run vimwiki on an iphone it prompts to create the vimwiki folder but it can't properly in a-shell mini because of sandboxing. The github page said just look it up in the manual. :h vimwiki_list. for some reason the help docs weren't opening for me so anyway I just asked chatgpt for some lines to add to the vimrc.
:w ! sudo tee %
its super annoying when you type out that long path only to find you forgot to sudo and now it wont let you save. It's good to know there's a way to fix this.
pomodoro shmomadoro. who needs it anyway? well i thought i did.
turns out there was something hidden away in linux mint in plain sight.
all i had to do was click in the top right corner
panel: add new items: xfce4-timer
what I like about it is it lets you trigger a command after the timed interval
tomatoshell was cool but I like this one because I dont need to just have it be for half hour increments. also its kind of a waste to have a terminal window taken up by a graphical thing. this is less obtrusive exactly what i was looking for all along. Im still glad I didn't download that gigabyte sized pomodoro. (although its tempting im still kind of curious to see what 2 gigabytes of pomodoro could be. I imagine the tomato being 2 gigabytes juicier even though the juicyness has nothing to do with the file size. but im curious still...)
almost went with gnome pomodoro it was the only thing that showed up in the package manager but damn its almost a gigabyte. WHY!!! theres no reason a simple pomodoro timer app needs to be almost a gig jeeeezus.
"I tried a few others, none of them worked. Probably downloaded a million viruses on my computer instead."
you can make a custom alarm by putting your own alarm.wav file in
$HOME/.local/share/tomatoshell/alarm.wav
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
and this further down
"fzf
nnoremap fr :Files
# I've got it triggered with Space F -R like doom emacs
I tried to use fzf before and was unsuccessful
apt installing it wasn't enough
installing junegun/fzf wasn't enough either
you need all 3 for it to work
the next hurdle you have to jump over is set a keybind
:set spell
ive been using this one a whole lot lately.
with emmet i have comma in normal mode to expand html.
it gets really confusing switching back and forth between modes all the time. being able to slip in and out without ever leaving insert has real potential for some slick typing
p ctrl o comma coma
its gonna take some getting used to to work that into muscle memory but it will be worth it.
ctrl o o = jump line staying in insert mode
ctrl w r = swap panes
ctrl w c = close panes
what sucked was I wanted to be like linuxmint-computer@local to ssh into it but it wouldnt let me.
on raspberry pi i could do that and it was nice because I wouldnt need to know my ip all the time. DNS would switch the ips
sudo apt install avahi-daemon
type hostname it will tell you your hostname
I forgot to put my tags in doublequotes.
gh pages actions freaks out at you saying the TOML is wrong.
multiple git commits later realized last few blogposts werent posted :(
even though it was in one file. all the other posts that were correctly formatted wouldnt be added because hugo builds the entire site at once from the markdown files.
theres a lot of things you need to change to make this clipboard manager decent. a majorly annoying thing is when an item is selected in the list IT DOESNT ADD IT TO YOUR CLIPBOARD. the terminal you have to say copyq next, copyq previous (prev doesnt work!) grossly verbose.
enable vi motions (obviously)
enable autostart
disable closed when unfocused (default on is annoying)
preferences: appearances: enable darktheme
in history: set editor to gvim -f %1
max number of items in history i set to 10
layout: disable hide toolbar labels (default is off)
its kind of annoying in 3 ways.
setting up rofi to deal with it instead is wayyyy better.
I have it set to pop up with ctrl period
#!/usr/bin/env python3
# https://github.com/albertlauncher/python/blob/master/CopyQ.py
import json
import subprocess as sp
copyq_script_getAll = r"""
var result=[];
for ( var i = 0; i < size(); ++i ) {
var obj = {};
obj.row = i;
obj.mimetypes = str(read("?", i)).split("\n");
obj.mimetypes.pop();
obj.text = str(read(i));
result.push(obj);
}
JSON.stringify(result);
"""
if __name__ == '__main__':
p = sp.run('copyq -'.split(), input=copyq_script_getAll,
encoding='utf-8', stdout=sp.PIPE, stderr=sp.PIPE)
json_arr = json.loads(p.stdout)
items = []
for json_obj in json_arr:
text = json_obj['text']
text = " ".join(filter(None, text.replace("\n", " ").split(" ")))
items.append(text)
title = 'rofi-copyq'
rofi = f'rofi -dmenu -i -p {title} -format i'.split()
rofi_input = '\n'.join(x for x in items)
p = sp.run(rofi, input=rofi_input, encoding='utf-8', stdout=sp.PIPE, stderr=sp.PIPE)
if p.returncode == 0:
num = p.stdout.strip()
sp.run(f'copyq select({num});'.split(),
encoding='utf-8', stdout=sp.PIPE, stderr=sp.PIPE)
I put that text in a text file called roficlipq.py
startmenu: settings: keyboard: application shortcuts: python3 pathto roficopyq.py
this is a pretty cool feature
you enable by going to
preferences: shortcuts: application: create qr code from url (requires qrencode)
sudo apt install qrencode
i find this very handy
potatoes reaching for the light//
they have no eye but they grow them.
the roots reach out for the light
they grow tentacles and they find a way.
pushing through the bag. in search of soil
in search of light