Sunday, December 31, 2023

sort by date reverse order

in the food template in beorg this is how you query date in reverse order.

(it’s a 3.99$ iap to save search that’s why i’m making a blog post.)

f food > h

this searches in file food sorting headings with oldest (lowest) at the top

high to low = descending
low to high = ascending

< = desc
> = asc

^ * i encoded this post to prevent blogger from deleting the greater than signs but that makes it a little harder to read.

  • TODO look into a plug-in that can decode escaped html entities
  • hopefully something slick already exists like highlight js but for writing html in blogger posts

beorg food diary shortcut

food
hold homebutton, say food.
make sure you have a file called food and a template called food.

The cool thing about this is it sorts by year month day and time and generates a nice looking PDF report of the things you ate. It takes advantage of the Emacs outline, collapsing structure, so you can easily view the things that you ate over a period of time and gain some insights perhaps.

Saturday, December 30, 2023

how to get a youtube transcript

emacs had a great rss reader called elfeed tube that auto transcribes youtube videos. but i was wondering what can i use on my phone?

youtube transcript

on safari tap to the left of the address bar to enter reader mode. not only does this let you have a nice dark reader mode but more importantly it will hide any adds and nonsense on the side do you can select all the text to copy it.

  • an alternative

on iphone: go into settings, accessibility, enable speak screen.

  • when you swipe down from the top it will read your screen and there is a toolbar for controls. i like to put it to 2x speed.

beorg x callback

voice control beorg

hold home button and say "run dotjot"
siri will run the shortcut asking you for the headline for your todo.
you can add &notes= to the x-callback url if you want to create outlines (i wanted to keep it simple). my shortcut for beorg todos w siri

  • you need to make a template called todo for it to work

Friday, December 29, 2023

emacs export html

"space m e h o" to export and you gotta "control b" to only export the buffer.Not only that but you also need to include

  • #+OPTIONS: toc:nil num:nil created:nil date:nil author:nil

even after that theres still not stylesheet!


so add your stylesheet to this block of text and

put this in your doom emacs config.el



(after! org
  ;; Set the default HTML stylesheet link
  (setq org-html-head (concat ""))

  ;; Customize Org export settings
  (setq org-export-with-author nil      ; Exclude the author info
        org-export-time-stamp-file nil  ; Exclude the timestamp
        org-html-postamble nil))        ; Exclude postamble content

;; Function to export to HTML without opening the file
(defun my-org-export-to-html ()
  "Export Org Mode buffer to HTML."
  (interactive)
  (org-html-export-to-html)) ; Export to HTML

;; Bind this export function to a key
(map! :leader
      :desc "Export to HTML"
      "e h" #'my-org-export-to-html)

Thursday, December 28, 2023

Obsidian Dataview Tutorial: The Basics

download the

example vault for dataview queries

they say.


well I did and I found it super confusing because even though there is an edit mode, and a preview mode, Obsidian is too slick at auto hiding and rendering out the codeblocks.

I have no idea what Im looking at most of the time. Is this a real table or is this a dynamically generated block of code?


I feel like im lost in a hall of mirrors.


so I made a super simple example just with one or two things instead of the whole kitchen sink.


Inline metadata

were using inline metadata::

yaml front matter I think only works at the top of your document?? so im just going to avoid messing with it for now.

my db example

make a new file called Inventory.md in your vault

  
    ## Item 1
    - Item:: Item 1
    - Description:: This is item 1
    - Quantity:: 5
    - Location:: Warehouse A

    ## Item 2
    - Item:: Item 2
    - Description:: This is item 2
    - Quantity:: 10
    - Location:: Warehouse B

    ## Item 3
    - Item:: Item 3
    - Description:: This is item 3
    - Quantity:: 3
    - Location:: Warehouse C
  

make a new file called inventory_table.md

  • add this dataview query in the backticks
  

```dataview
TABLE Item, Description, Quantity, Location
FROM "Inventory.md"
SORT Quantity ASC
````
  

how to use vim-surround reminder 2 self

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.

Wednesday, December 27, 2023

chmod a file from within vim


:!chmod +x %

its a pretty cool trick. so great that you don't need to leave vim!

Tuesday, December 26, 2023

xfce4 is pretty sweet what about mac?

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

Saturday, December 23, 2023

how to join org files and delete duplicates

delete

ls *.org | grep -v -E "(merge.org|init\.org|groovy\ black\.org)" | xargs rm

merges

awk '!seen[$0]++' *.org | grep -vE 'init\.org|groovy black\.org' > merge.org

how to join org files

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.

cool pomodoro timer website

pomodor
pomofocus

syncthing daemon

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'

how to set path on vimwiki

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.

Thursday, December 21, 2023

how to sudo save a file already open in vim

how to sudo save a file already open in vim

    
  :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.

xfce4-timer: it was there all along

i should've used xfce4-timer instead

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...)

cli pomodoro for linux

tomatoshell

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."

how to use

  • p = pause
  • s = skip (reset)
  • q = quit

you can make a custom alarm by putting your own alarm.wav file in

    
  $HOME/.local/share/tomatoshell/alarm.wav
    

how to install fzf in vim

how to install fzf in vim

add this to your .vimrc


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


vim spellcheck

:set spell

  • s[ search next mispelled word
  • z= that brings up a list of corrections
  • :set nospell turns it off

ctrl o: temporary normal mode

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

dealing with splits in vim

ctrl w r = swap panes

ctrl w c = close panes


Sunday, December 17, 2023

Control + Alt + D = hide desktop (linux mint)

this is the default. i was thinking about remapping ctrl h to hide but that toggles hide/show hidden files. was maybe thinking command h, was going to see if there was already something conflicting but then i saw control alt d. most of the time I just want to hide everything anyway and use rofi to launch stuff.

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

Avahi is what you need

sudo apt install avahi-daemon

type hostname it will tell you your hostname

so easy to break a hugo site

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.

How I like to setup Copyq

settings

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)


just use rofi

its kind of annoying in 3 ways.

  • you need to type out and remember long terminal commands
  • gui keeps dissapearing
  • even though you select it it doesnt copy

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


qr code generation

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

Friday, December 15, 2023

Vscode Extensions

vscode extensions

some extensions im using lately.

Thursday, December 14, 2023

Hugo Date Format In Vim

cliptools is perfect on mac for creating front matter.
too bad its only on mac.
I tried looking for a solution using a clipboard manager on linux.
but it only got me part way there. hardest part is adding the date.
looked at some snippet tools and some automation tools.
cb, copyq, clipman, diodon
the vim plugin hugo helper sucks. its too complicated.
almost easier to do manually. (defeats the whole purpose)
I found out you don't need a plugin vims got you covered.

add this to your .vimrc:
" Map <leader>d to insert the current date and time in "YYYY-MM-DD HH:MM:SS" format
nnoremap <leader>d i<C-R>=strftime('%Y-%m-%d %H:%M:%S')<CR><Esc>

potatoes

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

Wednesday, December 13, 2023

clipboard managers for linux mint

- clipman
- diodon

how to copy from term without mouse

 on linux mint xfce for whatever reason its just not easy to ctrl c ctrl v in the term

I end up reaching for the mouse and i hate it.

although ive got set -o vi in my .bashrc for vim motions, the y only copies internally.

ctrl shift a selects the whole terminal which isnt what I want.

visual mode isnt working anyway.


My solution:

piping my commands into xclip.

making a bash alias for xclip so i dont need to type xclip=selection clipboard.

add this to your .bashrc:


# Alias to copy text to clipboard using xclip

alias c='xclip -selection clipboard'


    after that you can echo it into a thing and pipe it to c which is your alias

Tuesday, December 12, 2023

csv2table

I like this vscode extension by Michel SLAGMULDER.

    you press ctrl H ctrl T on some selected csv and it converts to and HTML table. (although the command isn't working for me on linux mint so i use the command palate instead ctrl shift p)


    arggg you know what sucks though? it doesn't escape  the characters inside double quotes. so you've got a date like "sept, 11, 1905" it thinks you have 3 columns. SOO ANNNOYING. (I was wondering why the default delimiter was set to semi-colon instead of comma.)

gotta do a find and replace with a regex. heres the pattern I use to match:

,(?=(?:[^"]*"[^"]*")*[^"]*$)

open vscode live server = alt L O

format HTML = ctrl shift i 

bootstrap has dark mode add this to the head: data-bs-theme="dark"

<html lang="en" data-bs-theme="dark">

     basic table css styling:

table, th, td {
  border: 1px solid;
}

    Striped tables:

<style>
table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {background-color: #f2f2f2;}
</style> 



Saturday, December 9, 2023

how to make beorg not suck

what a hassle!

heres what it looks like once you get it going. ( gruvbox inspired) >>

screen shot of dark theme

  • i bought the dark theme export it did nothing. 99 cents wasted
  • i bought the dark theme it did nothing. 3.99 wasted!
  • somehow in canada that's probably gonna be 8 bucks with taxes and extra nonsense fees.

whatever... im committed now to figuring this out. its kind of neat that they have some
kind if repl witha elisp type thing but i was hoping to not spend my afternoon digging the docs. but i needed that dark mode.

on closer inspection dark theme isnt necessary after ios 13 implemented dark mode. the iap is a better dark mode dim grey lower contrast but still did't effext export at all! which was what i wanted it for arggg.

it says you can use your own css. they dont make it easy though. there isn't any quick menu selection. you have to read the docs to use "scheme" sort of like lisp.

** note **
if you want my roboto mono font to work on ios you need to download the app fontcase roboto mono dl link @ cufonts

the steps:

  • create org file called init
  • add this:
#+BEGIN_SRC scheme
(load-themes "groovy black")
#+END_SRC
  • create org file called groovy black
  • add this:
* groovy black
im pissed i had to make my own dark theme

#+begin_src css
@include "beorg default theme";

body { background-color: #2c2c2c;
   font-family: Roboto Mono;
       color: #8f8f8f;
}
a { color: darkseagreen;
}
h1, h2, h3, h4, h5, h6 { color: orange;
}
ul, ol {
  color: white ;
}
#+end_src

how to fix alt key in terminal so it actually alts

in kitty.conf add this.

 macos_option_as_alt left

in default mac terminal go to
preferences > profile > keyboard > checkbox "use option as meta key"

Friday, December 8, 2023

how to resize an image from terminal

    don't you hate it when you upload a picture and when you go to post realize the picture is HUUUUUUUGe. its great that these modern phones have all those pixels but it sucks when your trying to do a quick edit in ms paint.

trying to throw some quick text on there and you gotta zoom all the way out and find the corner of the screen and drag it all down. peeved.

but don't worry there's a better way.

IMAGEMAGICK

the imagemagick command in this case is convert (just like how sox has a bunch of commands other than sox like synth, play, rec). by giving only one input for the dimensions in the argument it conveniently maintains the aspect ration scaling it down nicely.

convert image.png -resize 300 image_resized.png

how to fix syncthing "folder marker missing"

syncthing creates an invisible file called .stfolder if it cant find it you get this error and sync thing wont start!!! its really easy to accidentally not copy it if you delete a folder and start from scratch so just make a new folder and name it that and you should be all good!

gotcha: keyboard shortcut for vim

Setting a keyboard shortcut for launching apps on linux mint 2 ways.

- vim .xbindkeyrc

- start>settings>keyboard>application shortcuts

was wondering why just having path to vim wasn't working

it needs to be run as a terminal command.

THE FIX: >>

xfce4-terminal -e 'vim'

whats the -e flag?

 it specifies that its to be run as a terminal command.

Thursday, December 7, 2023

how to paste in vim without leaving insert mode

         - press ctrl + r + 0 ( zero )

that lets you enter normal mode for a command and paste from the zero register which usually is the system clipboard. 

but in general you want CTRL o ( control o) 

- that lets you step breiefly into normal mode for a single command before returning you back into insert mode.

How to launch apps like finder on mac but on linux



        So on linux mint xfce you can get twister os to look like mac..

but my biggest gripe is it comes with a thing that looks like spotlight search

but instead its docked in the corner and you have to click on it to use it.


cmd space doesn't work! thats what it should be!! its so awkward

I don't want to use the mouse it gives me carpel tunnel!!



        One thing that the tiling window manager i3 gaps got right is rofi. (okay well it comes with dmenu but following some tutorial that's where i first saw a use for rofi)

cmd d (or was it control d? whatever doesnt matter) is gold!!!!!



THE STEPS:

- on linux mint, click top right start menu icon.

- settings>keyboard>Application shortcuts>Add.

- rofi -show run 

- set it to super space

and there ya go. 

now you have a nice app launcher.

Tuesday, December 5, 2023

how to open html in browser (doom emacs)

 Space o b

on mac meta x isnt working?

do space : (colon) and type open browser

vim nerdtree show hidden files

Press I and they show up.

dot files are hidden by default in nerdtree.

in lf . (period shows them)

some bash rc settings for emacs client on i3

 # start emacs daemon if not already running
if [ -z "$(pgrep -u $USER emacs)" ]; then
/usr/bin/emacs --daemon
fi
# DOOM EMACS
export PATH="$HOME/.emacs.d/bin:$PATH"
# Emacs Client
alias emacs='emacsclient -c -a 'emacs''

 

-----------------

 this helps with the load times

Monday, December 4, 2023

fixing doom emacs not opening exported org in firefox

so you wrote some text in doom emacs

space m + e to export,  ctrl + b for body only

h + o for html export and open but it doesnt open? 

WHY!!! emacs doesnt know how to open the browser

== how to fix ==

on linux mint edit:

mint/.config/doom/config.el

then add this:

;; SET BROWSER TO OPEN WITH FIREFOX --THIS IS YOUR CUSTOM THING YOU ADDED --
(after! org
  (setq org-file-apps
        '((auto-mode . emacs)
          ("\\.mm\\'" . default)
          ("\\.x?html?\\'" . "/usr/bin/firefox %s")
          ("\\.pdf\\'" . default))))

 

Sunday, December 3, 2023

lf_kitty_preview

#!/usr/bin/env bash file=$1 w=$2 h=$3 x=$4 y=$5 preview() { kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$1" < /dev/null > /dev/tty } TEMPDIR=/home/mint/.cache file="$1"; shift case "$(basename "$file" | tr '[A-Z]' '[a-z]')" in *.tar*) tar tf "$file" ;; *.zip) unzip -l "$file" ;; *.rar) unrar l "$file" ;; *.7z) 7z l "$file" ;; *.avi|*.mp4|*.mkv) thumbnail="$TEMPDIR/thumbnail.png" ffmpeg -y -i "$file" -vframes 1 "$thumbnail" preview "$thumbnail" ;; *.pdf) thumbnail="$TEMPDIR/thumbnail.png" gs -o "$thumbnail" -sDEVICE=pngalpha -dLastPage=1 "$file" >/dev/null preview "$thumbnail" ;; *.jpg|*.jpeg|*.png|*.bmp) preview "$file" ;; *.ttf|*.otf|*.woff) thumbnail="$TEMPDIR/thumbnail.png" fontpreview -i "$file" -o "$thumbnail" preview "$thumbnail" ;; *.svg) thumbnail="$TEMPDIR/thumbnail.png" convert "$file" "$thumbnail" preview "$thumbnail" ;; *) lf_bat_preview "$file" ;; esac return 127 # nonzero retcode required for lf previews to reload

Saturday, December 2, 2023

LF config

set previewer ~/.config/lf/lf_kitty_preview set cleaner ~/.config/lf/lf_kitty_clean # Basic Settings set hidden false set ignorecase true set icons true # Custom Functions cmd mkdir ${{ printf "Directory Name: " read ans mkdir $ans }} cmd mkfile ${{ printf "File Name: " read ans $EDITOR $ans }} cmd setwallpaper ${{ setwallpaper "$f" }} # Archive bindings cmd unarchive ${{ case "$f" in *.zip) unzip "$f" ;; *.tar.gz) tar -xzvf "$f" ;; *.tar.bz2) tar -xjvf "$f" ;; *.tar) tar -xvf "$f" ;; *) echo "Unsupported format" ;; esac }} # Trash bindings cmd trash ${{ files=$(printf "$fx" | tr '\n' ';') while [ "$files" ]; do file=${files%%;*} trash-put "$(basename "$file")" if [ "$files" = "$file" ]; then files='' else files="${files#*;}" fi done }} cmd restore_trash ${{ trash-restore }} # Bindings map d map m map c $vim "$f" map au unarchive map ae $wine "$f" # Basic Functions map . set hidden! map dd trash map dr restore_trash map p paste map x cut map y copy map open map R reload map mf mkfile map md mkdir map bg setwallpaper map C clear # Movement map gD cd ~/Documents map gd cd ~/Downloads map gp cd ~/Pictures map gc cd ~/.config map gh cd ~/Desktop map gr cd ~/repos map gv cd ~/Videos map gs cd ~/.local/bin map gt cd ~/.local/share/Trash/files #file openers filetype ^pdf,PDF$ zathura filetype ^epub,EPUB$ calibre ebook-viewer q

xbindkeysrc

my kebinds for linux mint on a mac extended keyboard ############################################# "/home/mint/Documents/bashscripts/codepen.sh" Alt + m:0x0 + c:191 "/home/mint/Documents/bashscripts/blog.sh" Control + m:0x0 + c:191 "/home/mint/Documents/bashscripts/blogedit.sh" Shift + m:0x0 + c:191 # 13, 14, 15 "firefox" m:0x0 + c:191 "kitty" m:0x0 + c:192 "subl" m:0x0 + c:193 #16, 17, 18, 19 "mousepad" m:0x0 + c:194 "kolourpaint" m:0x0 + c:195 "/home/mint/Documents/bashscripts/youtube.sh" m:0x0 + c:196 "/home/mint/Documents/bashscripts/chatgpt.sh" m:0x0 + c:197 "scrot '/home/mint/Pictures/screenshots/%Y-%m-%d_%H-%M-%S.png' -s" Control + Shift + 4

^^^COPY PASTE BLOCK SNIPPET^^^

my I3-gaps gruvbox dark theme config


set $bg #282828
set $red #cc241d
set $green #98971a
set $yellow #d79921
set $blue #458588
set $purple #b16286
set $aqua #689d68
set $gray #a89984
set $darkgray #1d2021
set $lightgray #bdae93

bar {
    position bottom
    status_command i3blocks
    colors {
        # bar background color
        background $bg
        # text color used for blocks that do not have a color specified.
        statusline $lightgray
        # workspaces section            
        #                    border  backgr. text
        focused_workspace    $lightgray $lightgray $bg
        inactive_workspace   $darkgray $darkgray $lightgray
        active_workspace     $darkgray $darkgray $lightgray
        urgent_workspace     $red $red $bg
    }
}

# class                 border|backgr|text|indicator|child_border
client.focused          $lightgray $lightgray $bg $purple $darkgray
client.focused_inactive $darkgray $darkgray $lightgray $purple $darkgray
client.unfocused        $darkgray $darkgray $lightgray $purple $darkgray
client.urgent           $red $red $white $red $red

# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!

set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 12

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3

# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.

# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork

# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet

# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
# i3-sensiblw-terminal is the default
#bindsym $mod+Return exec i3-sensible-terminal
#bindsym $mod+Return exec alacritty
bindsym $mod+Return exec kitty

# kill focused window
bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id rofi -show drun -width 400 -lines 5 
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon 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+h split h

# split in vertical orientation
bindsym $mod+v 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 the child container
#bindsym $mod+d focus child

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"

# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10

# reload the configuration file
bindsym $mod+Shift+c reload
# 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 "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' '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 or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
#        status_command i3status
#}

kitty.conf

background #1f1c27 foreground #b6a0ff cursor #ff9738 selection_background #353146 color0 #1f1c27 color8 #353146 color1 #d8393d color9 #d8393d color2 #2dcc72 color10 #2dcc72 color3 #d8b76e color11 #d8b76e color4 #ffc183 color12 #ffc183 color5 #dd8d40 color13 #dd8d40 color6 #2388ff color14 #2388ff color7 #b6a0ff color15 #e9e4ff selection_foreground #1f1c27 enable_audio_bell no #font_family DejaVuSansM Nerd Font Mono Regular #font_family FiraMono Nerd Font Mono #font_family Hack Nerd Font Mono Regular #font_family RobotoMono Nerd Font Mono #font_family DroidSansM Nerd Font Mono #font_family Menlo Regular #font_family BitstromWera Nerd Font Mono font_family SF Mono font_size 16 enable_audio_bell no # Enable mouse map mouse {override,click} enable=1 # Enable copy-on-select map ctrl+shift+v paste_from_selection

how to sleep mac from terminal

how to sleep mac from terminalsleep

redoing my shortcuts.
Previously had pause/break r corner key to sleep.
but that real estate is too valuable.
doesnt need to be THAT easy to get to.
so gonna go with shift to access instead.
freeing up that hot spot.
for my HOT key. 🥵

what do i want instead?

  • terminal? no ctrl alt t does that

i switched my terminal to kitty because it can preview images in the LF file manger. so i need to remap.

previously: karabiner is what i used to trigger the shortcut. there was one online that worked. BUT, i just figured out how to edit the json myself so i dont need to rely on hoping and wishing for somebody to make my keyboard templates for me.

  • that also means I dont need to use the shortcuts app potentially! it could be done all in karabiner maybe.
  • i was doing some of the shortcuts in one and some in the other this simplifies things alot knowing i no longer need to do that. the way i came up with using the shortcuts app was just some work around i came up with.
  • think il put chat gpt on that button

Thursday, November 30, 2023

how to multi line comment in vim

  1. ctrl + v
  2. shift + I then # (or whatever your comment)
  3. hit escape

this applys the comment to all the selected lines in visual block mode

how to install i3 on linux mint

on linux mint > package manager > install i3 metapackage (includes menu, statusbar, screenlocker)


sudo apt install rofi

#go to line 54 of the file below and swap out dmenu for rofi

vim ~/config/13/config bindsym $mod+d exec --no-startup-id rofi -show drun -width 400 -lines 5

mods to twister os mac theme window manager shortcuts

Action shortcut remap
Toggle Fullscreen Alt +f11 ctrl+alt+f
Hide Window Alt+f9 shift+Ctrl+h

Wednesday, November 29, 2023

samples for making 90s jungle

rhythmlab breaks
90s sample cds
internet archive- sample cds

speaking text with vim

so i was playing with the firefox plugin vimium, using it to navigate around, then realized you can also use visual mode to select blocks of text. selecting is the most annoying thing to do with the mouse. Now it became super easy and that got me thinking..

what if i got it to speak the text?

yeah so what you need to do to get this to work is 3 things

the three things

  1. install xclip
  2. install espeak
  3. make a bash script
  4. don't forget to


    	
    		chmod +x speak.sh
    	
    

the bash

	
		#!/bin/bash
		xclip -o | espeak
	

use mc to move it to my bash script directory. Create an alias for it

	
		alias speak='/home/mint/Documents/bashscripts/speak.sh'
	

how to focus: brown noise

sudo apt install sox


then you can run this command to play brown noise.


whats brown noise?

Also known as Brownian noise or red noise. Its power decreases by 6 dB per octave as the frequency increases. This means that as the frequency rises, the energy decreases more slowly compared to pink noise. Brown noise contains more low-frequency components than pink noise. It's often described as having a "darker" or "deeper" sound. It is often used in audio engineering, sound masking, and relaxation purposes.

other noise

you may have heard of white noise, well theres also pink noise which has all the frequencies evenly distributed. I prefer brown for masking because its less harsh on the top end and with more low end it muffles things better imo.

protip::

you can do yourself one better by making a bash script and setting an alias for it in your .bashrc file


#!/bin/bash play -n synth brownnoise
alias noise='/home/mint/Documents/bashscripts/noise.sh'

brightness controller

my 2008 imac with linux mint boots up hella bright. I want to be able to dim it all the way down to black in finite increments which by default isn't an option. this is one solution I found

BE VERY CAREFULL WITH THIS!!!

one simple mistake and your screen is black

I had to ssh in and delete brightness-controller. you think id learn. I made the same mistake twice when I did it again with xcalib which is horrible.

xcalib -co 95 -a darkens the screen in managable increments. but it doesnt let you undo it!!!! i tried negative values, decimal values nothing worked. I had it on 50 and i ran the command again BOOM it was black and i couldnt see shit. i was trapped in the dark with no way out

i should've done all my messing around in the guest profile so i could log out.

remapping capslock to escape

xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'


thats another way ^


both of these ways don't kick in untill you open up the terminal

Textmate Vim = Textastic Vim Motions?!

textmate vim
download

Tuesday, November 28, 2023

TWISTER UI: a great theme for xfce linux mint

that raspberry pi twister os theme can be applied to linux mint! classic mac/windows dark/light themes, discord,steam https://twisteros.com/twisterui.html I went in with it to try it out because it had a windows 95 theme. I really liked the chicago 95 theme i had before but this mac one is nice.

HOT TIP::: copying in vim

if your trying to copy from the terminal to the browser your probably gonna be having a bad time. vim --version lets you know if your vim has clipboard enabled + beside means it does - means it doesnt. sudo apt install vim-gtk this is the same as G vim, graphical interface vim. then after thats installed you can use "+y to yank to system clipboard

screenshot on linux mint with keyboard shortcut

the 2008 imac with linux mint cant cmd shift 4 to screenshot like on mac os :( cmd key triggers the menu. I did some digging around found out about remapping keys with xbindkeys by editing the .xbindkeysrc with vim. found a cli screen shot program called scrot "scrot '/home/mint/Pictures/screenshots/%Y-%m-%d_%H-%M-%S.png' -s" Control + Shift + 4

webcam on linux mint

my 2008 imac has been brought back to life with linux mint. I was looking for a way to get a feature like photobooth as it was one of the greatest features the mac had. i tried cheese but it wouldnt work. i found this one called guvcview it works sudo apt install guvcview

top windows vsts

genny (not fl note glide version)vst
tal bassline - win 64
poise - win 64
Gclip
sitala
sfizz- win 64
oxefm

Monday, November 27, 2023

how to grep IP from ifconfig

how to sudo save from within vim

Sunday, November 26, 2023

how tp map a usb numpad to trigger apps

keypad layout

the layout I settled on


used karabiner to map f13 to f20 figured out what the blocker was.
I was stuck with f14 f15 not working thought apple just didnt let you use f13-f20, that they were just there to taunt you. I read somewhere that they just dont let you..
I actually believed that oh mann thats ridiculous.
almost gave up.

what I realized was f14, f15 were mapped to brightness
so you simply uncheck that and it works!!

I cmd shift 4'd the icons in shortcuts and layed them out in excalidraw. tried to use pinta and paintbrush but they both suck! they dont let you have more than one layer.
ms paint was soo much better. mypaint on linux was good.
apparently it can work with macapps package manager (homebrews evil twin)but last time i tried to install macapps it took forever and did nothing. I think i terminated the download by closing my laptop (before i knew about tmux detached sessions) I didnt want to wait around with my laptop case open or spend all day waiting for it to finish.

  • karabiner'd the windows "help key" to get an extra shortcut
  • tried remapping eject but it wouldnt let me 😓

full screen youtube within a window

youtube windowed fullscren


 this chrome extension is great! combined with tiles window manager its perfect

there is also one for firefox


youtube-windowed-fullscreen

by navi.jadoor

Saturday, November 25, 2023

finding mac temperature from terminal

44.97 c is what it was when i started running it cold.
56.98 c is what its at now after running it for a while...
Im going to let it run for a while with a courier bag on top of it
to see if its okay or if it gets too hot covered up.
heres the one liner:
sudo powermetrics --samplers smc |grep -i "CPU die temperature"

Tiles Window Manger + karabiner app launching

 Tiles Is nice and simple//

============================

amethyst was kind of overkill.

playing arounmd with linux mint

gave me a taste of a simpler but 

nice way of going about window managers.

ITS JUST LIKE THE ONE IN LINUX MINT !!! YES

The Home Page For Tiles

-----------------------------------

KARABINER ::

Getting ctrl+ alt + T to open the terminal//

==============================

why isn't this also the default on mac?

Im sick of cmd space-ing and typing term

then hitting enter. finally figured out 

how to use karabiner to do it.

    - under complex mods

    - add rule

    - import rule from the internet.

another thing:: 

on my dell windows keyboard remapped

- pause = sleep

- scroll lock = f14

- print screen f13

why f13 & f14? because then you can use the shortcuts app to trigger them. in shortcut details click add keyboard shortcut. get the shortcut to open the app of your choosing.


* trick to get this working properly: go to system preferences > keyboard

> shortcuts. after that it should work properly. (was banging my head against the wall before wondering why it wouldn't work still not entirely sure but i think it might be so weird security thing? but thats weird because if it was usually you have to go into privacy settings, type your pass and check some box)

Tmux Copying Between Panes

  • ctrl [ = enter into copy mode
  • press v to select text
  • ctrl w to copy the text
  • ctrl HJKL (or arrows)
  • ctrl ] to paste the text

use tmux navigator to have proper vim navigation. leader k arrows is only if your a masochist.


the video on the amazing tmux config i got this from

set-option -sa terminal-overrides ",xterm*:Tc" set -g mouse on unbind C-b set -g prefix C-Space bind C-Space send-prefix # Vim style pane selection bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R # Start windows and panes at 1, not 0 set -g base-index 1 set -g pane-base-index 1 set-window-option -g pane-base-index 1 set-option -g renumber-windows on # Use Alt-arrow keys without prefix key to switch panes bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D # Shift arrow to switch windows bind -n S-Left previous-window bind -n S-Right next-window # Shift Alt vim keys to switch windows bind -n M-H previous-window bind -n M-L next-window set -g @catppuccin_flavour 'mocha' set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'christoomey/vim-tmux-navigator' set -g @plugin 'dreamsofcode-io/catppuccin-tmux' set -g @plugin 'tmux-plugins/tmux-yank' run '~/.tmux/plugins/tpm/tpm' # set vi-mode set-window-option -g mode-keys vi # keybindings bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind '"' split-window -v -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}"

Tuesday, November 21, 2023

Thursday, November 16, 2023

linux mint is awesome!

so i heard nomad bsd could run off usb with persistant storage but i couldnt get internet and thats a deal breaker. couldnt get the wifi drivers and wasted a day trying to figure it out. not even my usb ethernet adapter would work.

what about raspberry pi os? no you have to wipe yoir whole drive. then i found mint had a live version could run off usb but lacks persistance. whatever its really good. no wifi either but my ethernet card worked! once connected was able to install wifi drivers but need to reboot for the changes to take effect.

tried partitioning got an error. I am scared i will accidentally delete my whole mac partition by mistake. im going to bed instead. i want to try again some other time. the old mac is great its a shame it cant be used to its full potential in its current state. its exciting to know that it can be revitalized.


love this theme!!!

chicago95

clone the repo run the python script to run the nice install wizard. it makes it easy to get it set up.


the hex color for win 95 bg =#018281

FONTS

Roboto Mono
Hack
Menlo
microsoft sans serif
Lucida Console
sudo apt-get install msttcorefonts my vim rc
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

I like that for default font in appearance


for terminal I like "less perfect DOS VGA regular" size 16


firefox: got the win 95 theme


firefox extensions

  • vimium
  • ubl0ck 0rigin
  • dark reader
  • video speed controller
  • YouTube Windowed FullScreen by navi.jador

linux terminal

  • vim
  • git
  • mc
  • htop
  • neofetch
  • cmatrix
  • cmus
  • mpv
  • tmux
  • ffmpeg
  • sox

gui linux software

reaper, koala sampler, pencil2d, milkytracker, renoise, lmms, shotcut/openshot, kdenlive, gimp, mypaint


sfz/sf2 player for linux

reaper for linux mint
sfzero
General Midi SF2 by S. Christian Collins
nokia soundfont
opl3 soundfont
2mbgmgs.sf2

to install linux vsts drop the file into /usr/lib/vst/ (mkdir vst if it doesnt exit yet)

fixing reaper

chordgun
how to make reapers piano roll more like FL

import the repository for tukan

https://raw.githubusercontent.com/TukanStudios/TUKAN_STUDIOS_PLUGINS/main/index2.xml
  • time selection: set time selection to items = p (default is pan)
  • open piano roll > options > mouse modifiers > midi piano roll > left click
    change default action: deselect all notes and move edit cursor
    change behavior to insert > just insert
    action: split notes on grid SET TO = ctrl u
    - Item Properties: pitch item down/up one octave = ctrl + down/up
    - Item Properties: pitch item down/up one semitown = (/)
    

Monday, November 13, 2023

how to delete non unique lines in vim with a regex

:g/^\(.*\)$\n\1$/d

how to cut long audio files in terminal with sox

## Half hour ## 
input.mp3 output.mp3 trim 0 1800 : newfile : restart

##1 hour cuts##
input.mp3 output.mp3 trim 0 3600 : newfile : restart

Sunday, November 12, 2023

how to get wordcount of a txt file in the terminal

use the wc command.


wc file.txt


the output is 3 columns of numbers:


# of lines, WORDCOUNT, bytes


how to convert .caf to mp3 in terminal

ffmpeg -i input.caf -c:a libmp3lame -b:a 320k output.mp3

Saturday, November 11, 2023

grab youtube video title from terminal

#/bin/bash 
[[ "$1" ]] && url="$1" || url="$(xclip -o)"
[[ "$url" != "https://"* ]] && read -p "Please Enter Video URL: " url
[[ "$url" != "https://"* ]] || exit 1
 
wget -qO- "$url"|tr "," "\n"|grep '^"title":"'|cut -d\" -f4

waltzs of the flowers - kenji nakatani

Thursday, November 9, 2023

Strip Blank Lines In Vim

Heres the regular expression you would use in vim to delete all those blank new lines you dont want that are needlessly taking up space in your text file.


  :g/^$/d

convert pdf to plain text

I wanted to spice up my typing practise on monkeytype by using pdfs.
heres a python script that takes the file paths as inputs and spits out a plain text version you can copy into monkeytype.

import PyPDF2

def pdf_to_text(pdf_path, output_text_path):
    text = ""
    
    with open(pdf_path, 'rb') as file:
        pdf_reader = PyPDF2.PdfReader(file)
        
        for page_num in range(len(pdf_reader.pages)):
            page = pdf_reader.pages[page_num]
            text += page.extract_text()
    
    with open(output_text_path, 'w', encoding='utf-8') as output_file:
        output_file.write(text)

# Take input for the PDF file and output text file
pdf_path = input("Enter the path to the PDF file: ")
output_text_path = input("Enter the path for the output text file: ")

pdf_to_text(pdf_path, output_text_path)

print(f'Text extracted from PDF and saved to {output_text_path}')

okay so after i did that i found an easier way:
using some free software called calibre this can convert ebook formats from CLI but its giving me some troubles il have to come back to this later.

  1. I set an alias for ebook-convert
  2. trying to get a bash script to take the input args as variables for the input and output paths.

Saturday, November 4, 2023

vim colemak keybinds on a qwerty board

a qwerty board marked up with the vim shortcuts for reference

sunset color pallate

saw this view from the bridge.
couldn’t wait to get home and figure out thise hexcodes.

immediately thought:
make a css template with it
vim/ textastic/ mweb colorschemes
want that terminal rice in i3

Friday, November 3, 2023

notes on vim tables

tables

vimwiki

just make pipes it auto aligns
pipe and 3 dashes will do horizontal lines

== VIMWIKITABLE CMDS ==

  • :VimwikiTableAddRowAbove
  • :VimwikiTableAddRowBelow
  • :VimwikiTableDeleteRow
  • :VimwikiTableAddColBefore
  • :VimwikiTableDeleteCol

== markdown-toc ==

  • ajorgensen/vim-markdown-toc
    :GenMarkdownTOC:
    :UpdateMarkdownTOC:

    • Align by a Delimiter:
      :Tabularize: /: Align lines based on a specified delimiter.
      For example, to align lines by equal signs, use :Tabularize /=.
      Align by Regular Expression:

:Tabularize: /<regular_expression>: Align lines based on a regular expression.
For example, to align lines by spaces or tabs, use :Tabularize /\s+.
Align by a Range:

:Tabularize: / : Align lines within a specified range.
For example, to align lines within a visual selection, use :'<,'>Tabularize /=.
Custom Alignment:

  • You can specify a custom alignment character or string. For example, :Tabularize: / / will align lines using spaces.
    Automatic Alignment with Operators:

  • In normal mode, select the lines you want to align.
    Then, use the :Tabularize: command to automatically align the selected lines based on the delimiter, regex, or alignment character you specify.
    Repeat the Last Tabularize Command:

:Tabularize (without any arguments) will repeat the last Tabularize command with the same arguments.
Visual Mode Alignment:

  • In visual mode, select the text you want to align.
    Then, press :, and Vim will automatically add '<,'> to the command for aligning the selected visual block.
    Custom Mappings:

You can create custom mappings in your .vimrc to quickly apply Tabularize to common delimiters or regex patterns. For example:

nnoremap a :Tabularize /,

  • This mapping allows you to align text by commas by typing a in normal mode.

== table mode ==

| name | price |
| phil | 3 |
| susan | 5 |
| janice | 8 |
| doreen | 39 |
| cordelia | 12 |
| --------------------+------- | |
| total | 67.0 |
%% tmf: $8,2=Sum(2:-1)
leader tt = csv to table
:Tableize

leader tm = :TableModeToggle

  • then you can pipe away
  • double pipe does horiz sep

== moving ==
bracket / curly brace + pipe

== editing ==

ci| = change in cell /
ca| = change around cell
leader tdd = delete row
leader tdc = delete column
leader tic = insert col

== formulas ==
leader tfa =:TableAddFormula
leader tfe = evaluate
leader t? also eval (no need it auto evaluates)

Sum(2:-1) that means col 2 and -1 = row above current line

Sum(2,2:-1) 2,2 is start at col 2 row 2
when you specify a pair of values eg 2,2 its specific to that row
when you just have 1 its the whole column.


:TableModeEnable:
Enables table mode for the current buffer.
:TableModeDisable: Disables table mode for the current buffer.
:TableModeRealign: Realigns the table columns.
:TableModeAutoFormat: Automatically formats the table by aligning columns.
:TableModeToggle: Toggles between enabling and disabling table mode.
:TableModeToggleInsertMode: Toggles between insert mode and normal mode for a table cell.
ta: Toggle table alignment (e.g., left-align, center-align, right-align).
tr: Toggle table row alignment.
tt: Toggle table text wrapping.
Table Navigation:

|: Move to the next cell in the table.
j and k (in Normal mode): Move between rows.
H and L (in Normal mode): Move to the first and last cells in the current row, respectively.
gh and gl (in Normal mode): Navigate between columns.
[[ and ]]: Jump to the previous and next table.
Text Objects:

iat: Select the entire table.
iab: Select the current cell.
a|: Select the current column.
ir: Select the current row.
Other Useful Shortcuts:

ti: Inserts a new row above the current row.
tI: Inserts a new row below the current row.
td: Deletes the current row.
tD: Deletes the current column.
tc: Change the contents of the current cell.

folds and diff

zf - manually define a fold up to motion
zd - delete fold under the cursor
za - toggle fold under the cursor
zo - open fold under the cursor
ze - close fold under the cursor
zr - reduce (open) all folds by one level
zm - fold more (close) all folds by one level
zi - toggle folding functionality


]c - jump to start of next change
[c - jump to start of previous change
do or :diffg[et] - obtain (get) difference (from other buffer)
ap or :diffpu[t] - put difference (to other buffer)
:diffthis - make current window part of diff
:dif[fupdate] - update differences
:diffo[ff] - switch off diff mode for current window


Tip The commands for folding (e.g. za ) operate on one level. To
operate on all levels, use uppercase letters (e.g. zA).

Tip To view the differences of files, one can directly start Vim in diff mode by running vimdiff in a terminal. One can even set this as git difftool

Thursday, November 2, 2023

awk simple 2 col csv sum

awk -F, 'BEGIN { OFS = ","; total = 0; } { if (NR == 1) { print $0; } else { total += $2; lines[NR] = $0; } } END { for (i = 2; i <= NR; i++) { print lines[i]; } print "total," total; }' yourfile.csv > temp.csv && mv temp.csv yourfile.csv

multi cursor editing in vim

ctrl v shift i ctrk v shift x enter visual block mode i to insert x to delete great for commenting out blocks of code

Wednesday, November 1, 2023

textastic theme

codepen themes for textastic

the best theme = "tommorow night eighties" w roboto mono font.

Friday, October 27, 2023

args and buffers

link to an article

faster vim workflow with buffers and args

Args

:args *
:n / :p
:wn
:arga = add
:argd= delete

buffers

:ls
:bn /bp

substitution

  • argdo
  • bufdo
    %s/method1/method2/g | update

autocomplete in vim no plugins needed

HTML

autocmd FileType html set omnifunc=htmlcomplete#CompleteTags

  • then ctrl X ctrl o on tag to show list
  • ctrl n/ ctrl p to move through the list

CSS

autocmd FileType css set omnifunc=csscomplete#CompleteCSS

Javascript

autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS

Filenames

  • ctrl x ctrl f
  • ctrl n/ ctrl p

Monday, October 23, 2023

vim html editing

When editing the contents of an HTML tag or changing the tag type in Vim, there are several useful shortcuts and techniques you can use:

  1. Inside Tag Editing:

    • To edit the contents within the current HTML tag, place your cursor inside the tag and press ci> (change inside >). This will change everything within the tag, but leave the tag itself intact.
  2. Changing the Tag Type:

    • To change the HTML tag itself, place your cursor on the tag you want to change, and use the following commands:
      • To change a <div> to a <span>, for example, you can use cit (change inside tag) and type <span>.
      • If you want to change a <div> to a <p>, you can use cit and type <p>.
      • To change a <span> to a <div>, you can use cit and type <div>.
  3. Tag Surroundings:

    • If you want to surround an element with a new tag, you can use the surround.vim plugin, which allows you to visually select text and then specify a new tag to surround it. For example, you can select a block of text, press S, and then type the new tag you want to wrap around it.
  4. HTML Commenting:

    • To comment out an HTML tag or a block of code, you can use the following shortcuts:
      • gcc to comment a single line.
      • :x,ys/old/new/g to replace old with new in lines x through y (e.g., :1,5s/<div>/<p>/g to replace <div> with <p> in lines 1 through 5).
  5. Changing Case:

    • To change the case of an HTML tag (e.g., from lowercase to uppercase), you can visually select the tag and use the ~ key to toggle the case.
  6. Auto-pairing Plugins:

    • Consider using Vim plugins like auto-pairs or surround.vim, which can assist in auto-closing and modifying HTML tags.

Saturday, October 21, 2023

budget friendly 60 % keyboards I saw that I liked at Canada Computers

Keyboard Price
AULA F3287 Wired TKL $29.99
Redragon K613 Jax $39.99
Redragon Kumara K552 $39.99
Redragon K616 black+red Bluetooth Wireless $49.99
Redragon Jax Pro (K613P) Bluetooth $59.99
Redragon K530 Pro-red switch 60% Wireless $64.99
60% budget keyboards I liked oct 2023

AULA F3287
k613 JAX
Kumara K552
K616 black + red
K613p JAX pro
K530 pro w red switches

Honorable mention

iCAN 87 Key Rainbow Backlit Gaming Keyboard, 1.5M Cable (Black)(Open Box)

17.99 open box

Thursday, October 19, 2023

squarebeat

ios tracker sequencer just released. it can load auv3 plugins!! its so wicked!!

a jungle demo track on youtube

doesnt have keyboard shortcuts but its been well optimized well for the small touch interface of a phone. easier than sunvox, you dont need to be a genius to use. Thats a big deal, most of the time trackers seem too complicated. its alot more like renoise reminds me a bit of lgpt. can load auv3 effects on seperate mix busses and import your own samples. its free to try but doesnt let you save or export the unlock iap is 17 bucks canadian

vim args

In Vim, "args" typically refer to the list of files you're working with, and Vim provides several shortcuts and commands to work with this argument list. Here are some common Vim shortcuts and commands for working with arguments:

  1. :args <file1> <file2> ... - Set the argument list to a specific list of files.

  2. :args *.txt - Set the argument list to all files matching a pattern (e.g., all .txt files in the current directory).

  3. :argadd <file> - Add a file to the argument list.

  4. :argdelete - Remove the current file from the argument list.

  5. :args - List all files in the current argument list.

  6. :argnext (or :an) - Go to the next file in the argument list.

  7. :argprev (or :ap) - Go to the previous file in the argument list.

  8. :argfirst - Go to the first file in the argument list.

  9. :arglast - Go to the last file in the argument list.

  10. :argdo <command> - Execute a command on all files in the argument list. For example, :argdo :%s/foo/bar/g would replace "foo" with "bar" in all files.

  11. :args $mylist - Set the argument list from a variable.

  12. :argopen - Open all files in the argument list in separate windows.

  13. :arglist - Display the argument list and the cursor position within each file.

Wednesday, October 18, 2023

AFP Share: open raspberri pi using mac finder

sudo apt install netatalk

sudo nano /etc/netatalk/afp.conf

** inside that file add to bottom **

[Homes]

  basedir regex = /home

sudo systemctl restart netatalk

how to set up a pip venv

sudo apt install python3-venv python3 -m venv myenv source myenv/bin/activate pip install package-name deactivate

urls

https://www.youtube.com/feeds/videos.xml?channel_id=UCked4Esmdl16F1CwHjiBe3w https://www.youtube.com/feeds/videos.xml?channel_id=%20UCuQRDVBQP6kL5kcgm8s8WQA https://www.youtube.com/feeds/videos.xml?channel_id=UC2Xd-TjJByJyK2w1zNwY0zQ https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA https://www.youtube.com/feeds/videos.xml?channel_id=UCngn7SVujlvskHRvRKc1cTw https://www.chch.com/feed/ https://www.youtube.com/feeds/videos.xml?channel_id=UCX6b17PVsYBQ0ip5gyeme-Q https://ecksesontress.blogspot.com/feeds/posts/default https://www.youtube.com/feeds/videos.xml?channel_id=UCbiGcwDWZjz05njNPrJU7jA https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA https://www.youtube.com/feeds/videos.xml?channel_id=UCNmTQerbBm8AFzXYYvs1ywQ https://news.itsfoss.com/latest/rss https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA https://www.youtube.com/feeds/videos.xml?channel_id=UCKQdc0-Targ4nDIAUrlfKiA https://www.youtube.com/feeds/videos.xml?channel_id=UCYVU6rModlGxvJbszCclGGw https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw https://www.youtube.com/feeds/videos.xml?channel_id=UCUyeluBRhGPCW4rPe_UvBZQ https://www.youtube.com/feeds/videos.xml?channel_id=UCn8zNIfYAQNdrFRrr8oibKw https://www.youtube.com/feeds/videos.xml?playlist_id=PL-p5XmQHB_JSTaEPygu1DZjuFfb704Uv7 https://www.youtube.com/feeds/videos.xml?channel_id=UCFbNIlppjAuEX4znoulh0Cw https://www.cbc.ca/cmlink/rss-topstories "Canada" https://www.ctvnews.ca/rss/ctvnews-ca-top-stories-public-rss-1.822009 "Canada" https://business.financialpost.com/feed/ "Canada" https://www.lapresse.ca/actualites/rss "Canada" https://nationalpost.com/feed/ "Canada" https://ottawacitizen.com/feed/ "Canada" https://theprovince.com/feed/ "Canada" https://www.thestar.com/content/thestar/feed.RSSManagerServlet.articles.topstories.rss "Canada" https://torontosun.com/category/news/feed "Canada" https://globalnews.ca/feed/ "Canada" https://alistapart.com/main/feed/ "Web Development" https://www.codewall.co.uk/feed/ "Web Development" https://css-tricks.com/feed/ "Web Development" https://davidwalsh.name/feed "Web Development" https://hacks.mozilla.org/feed/ "Web Development" https://gosink.in/rss/ "Web Development" https://developers.google.com/web/updates/rss.xml "Web Development" https://www.youtube.com/feeds/videos.xml?channel_id=UCoOae5nYA7VqaXzerajD0lg https://www.youtube.com/feeds/videos.xml?channel_id=UCvFApMFo_AafXbHRyEJefjA https://www.youtube.com/feeds/videos.xml?channel_id=UCvmINlrza7JHB1zkIOuXEbw https://www.youtube.com/feeds/videos.xml?channel_id=UCIcCXe3iWo6lq-iWKV40Oug https://www.youtube.com/feeds/videos.xml?channel_id=UCZFPiLpzd4cKOsBS9CIu3xg https://www.youtube.com/feeds/videos.xml?channel_id=UCGSGPehp0RWfca-kENgBJ9Q https://www.youtube.com/feeds/videos.xml?channel_id=UC5ZoLwtjX_7Zs8LoqpiLztQ https://www.youtube.com/feeds/videos.xml?channel_id=UCgTNupxATBfWmfehv21ym-g https://www.youtube.com/feeds/videos.xml?channel_id=UCEMe4pwYxWc0O4o7CpDYqEg https://www.youtube.com/feeds/videos.xml?channel_id=UCq297H7Ca98HlB5mVFHGSsQ https://www.youtube.com/feeds/videos.xml?channel_id=UC7QE72cxiBkiwnvGoFfqYOg https://www.youtube.com/feeds/videos.xml?channel_id=UC4xKdmAXFh4ACyhpiQ_3qBw https://www.youtube.com/feeds/videos.xml?channel_id=UC39aOXMqg48qpzEz1l_-7tQ https://www.youtube.com/feeds/videos.xml?channel_id=UCeR0n8d3ShTn_yrMhpwyE1Q

Tuesday, October 17, 2023

alias

set -o vi alias sd='sudo shutdown -h now' alias yta='yt-dlp -x --audio-format mp3' alias ytv='yt-dlp -f mp4' alias vids='yt-dlp -f mp4 -a -i --batch-file=batch.txt' alias music='yt-dlp -x --audio-format mp3 -a -i --batch- file=batch.txt'

batch.txt

https://www.youtube.com/watch?v=Gs1VDYnS-Ac https://www.youtube.com/watch?v=vt33Hp-4RXg https://www.youtube.com/watch?v=jfyt5ueyWN8&pp=ygUFeXRmemY%3D https://www.youtube.com/watch?v=sC9JH-Sr_2Q&pp=ygULdzNtIHZzIGx5bng%3D https://www.youtube.com/watch?v=b8kxdiskGzI&pp=ygULdzNtIHZzIGx5bng%3D https://www.youtube.com/watch?v=6eyFXcyosu8&pp=ygUEdmlmbQ%3D%3D https://www.youtube.com/watch?v=47QYCa8AYG4&pp=ygUEdmlmbQ%3D%3D https://www.youtube.com/watch?v=qgxsduCO1pE&pp=ygUEdmlmbQ%3D%3D https://www.youtube.com/watch?v=_xxTcKJMnWQ&pp=ygUEdmlmbQ%3D%3D

amethyst window manager

shortcut action
ctrl alt shift t toggle amethyst
alt shift t toggle float for active window
ctrl alt shift z refresh amethyst
alt shift j/k cycle active window
alt shift h/l resize windows
ctrl alt shift j/k swap active windows
ctrl alt shift # throws active window to a space

Thursday, October 12, 2023

incrementing in vim

- Ctrl A/ Ctrl Z increments  a single number up and down
- ctrl v, g ctrl a/ ctrl z does all the numbers at once

** it doesnt work on old vim 7 

Tuesday, September 26, 2023

sunvox color theme

R G B
255 255 255
29 30 22
80 80 32
241 231 236

basic mac shortcuts in csv format

Shortcut Action
ctrl-cmd-f FULLSCREEN
ctrl-cmd-s Opera:toggle sidebar (for RSS viewer)
ctrl-tab next/prev opera tab
cmd-down go into folder(or open program)
cmd-up go to parent director
cmd-right/left go in folder/out folder
cmd-shift o Documents
cmd-shift d Desktop
cmd-shift d Hide/show dock
cmd-opt l Downloads
cmd-shift a Applications
cmd-shift g Go to folder
cmd-shift u Utilities
cmd-shift k Networks
cmd-shift c Computers
cmd-shift i Icloud
cmd-tab switch program focus
cmd-l in browser switch focus to url bar
cmd-[/] back/forward webpages
cmd-shift-t reopen last closed browser tab
opt-cmd-b open bookmarks
cmd-d add bookmark
cmd-shift-h open browser history
cmd-j see browser downloads
cmd-` cycle to next terminal window
cmd-w close tab
cmd-h Hide window
cmd-q Quit
cmd-n New window
cmd-opt tab switch and open program
cmd-space spotlight search
cmd-opt t toggle toolbar on/off
cmd-opt s toggle sidebar on/off
cmd-left/right switch views
fn f3 mission controll
cmd-left/right go to start/end of line
opt-left/right jump to next/prev word
cmd-backspace delete line
alt-backspace delte word
shift-cmd-left/right select line
shift-opt-left/right select word
cmd-s save
cmd-o open
cmd-delete close textedit without saving

schism tracker bash rc alias

alias schism='schismtracker --video-size=640x480'

Wednesday, September 20, 2023

create dir and move everything into it

heres some one liners

mkdir -p todays_songs && mv * todays_songs/

rename to remove that square bracket shit

for f in *; do mv "$f" "$(echo "$f" | sed 's/\[.*\]//')"; done

Thursday, September 14, 2023

raspberry pi adhoc

link to article

sudo nano /etc/network/interfaces

find line:
iface default inet dhcp
put a # character in front of the line to temporarily disable requesting an IP address from a DHCP server.
Then add below:

iface default inet static address 192.168.10.1 netmask 255.255.255.0

pi@raspberrypi ~ $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

in wpa_supplicant # out all lines of previous wifi


ap_scan=2 network={ ssid="MyHoc" mode=1 frequency=2432 proto=WPA key_mgmt=WPA-NONE pairwise=NONE group=CCMP psk="CaptainHoc!" }

to connect on mac

Next click on the Advanced… button and go to the TCP/IP tab.



Select Manually from the Configure IPv4 drop-down menu.



Now fill in 192.168.10.2 for the IP Address and 255.255.255.0 for the Subnet Mask, then click the OK button.

webm to mp3 bash conversion

 
#!/bin/bash

# Check if ffmpeg is installed
if ! command -v ffmpeg &> /dev/null; then
    echo "ffmpeg is not installed. Please install it."
    exit 1
fi

# Loop through all .webm files in the current directory
for webm_file in *.webm; do
    # Check if there are any .webm files
    if [ -e "$webm_file" ]; then
        # Extract the base filename without extension
        base_filename="${webm_file%.*}"

        # Convert .webm to .mp3 using ffmpeg
        ffmpeg -i "$webm_file" -vn -acodec libmp3lame -q:a 4 "$base_filename.mp3"

        # Check if the conversion was successful
        if [ $? -eq 0 ]; then
            echo "Conversion of $webm_file to $base_filename.mp3 successful."

            # Remove the original .webm file
            rm -f "$webm_file"
            echo "$webm_file deleted."
        else
            echo "Conversion of $webm_file to $base_filename.mp3 failed."
        fi
    fi
done

Wednesday, September 13, 2023

my .vimrc

packloadall
call plug#begin('~/.vim/plugged')
Plug 'vimwiki/vimwiki'
Plug 'vim-airline/vim-airline'
Plug 'matze/vim-move'
Plug 'jceb/vim-orgmode'
Plug 'tpope/vim-speeddating'
Plug 'vim-scripts/utl.vim'
Plug 'mattn/calendar-vim'
Plug 'vim-airline/vim-airline-themes'
Plug 'sainnhe/sonokai'
Plug 'morhetz/gruvbox'
Plug 'tpope/vim-fugitive'
Plug 'plasticboy/vim-markdown'
Plug 'sfztools/sfz.vim'
Plug 'ap/vim-css-color'
Plug '907th/vim-auto-save'
Plug 'jiangmiao/auto-pairs'
Plug 'ajorgensen/vim-markdown-toc'
Plug 'mattn/emmet-vim'
Plug 'kshenoy/vim-signature'
Plug 'mechatroner/rainbow_csv'
Plug 'dhruvasagar/vim-table-mode'
Plug 'godlygeek/tabular'
Plug 'scrooloose/nerdtree'
Plug 'junegunn/goyo.vim'
Plug 'reedes/vim-pencil'
call plug#end()

" Enable folding based on Org mode headings
let g:org_special_headline_highlight = 1
let g:org_headline_fold = 1
" Remap vim-move from alt to shift
let g:move_key_modifier_visualmode = 'S'
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
set background=dark
colorscheme sonokai
syntax enable
set nobackup
set nowb
set noswapfile
set autoread
set wildmenu
set ffs=unix,dos,mac
set encoding=utf8
set showmatch
set backspace=eol,start,indent
set autoread
set wrap
set si
set ai
filetype plugin on
filetype indent on
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set nocompatible
filetype plugin on
syntax on
set autowriteall
" Automatically save files on change
let g:auto_save = 1
" Set the interval for auto-saving in milliseconds (optional)
let g:auto_save_silent = 1
" Emmet shortcuts
let g:user_emmet_mode='n'
let g:user_emmet_leader_key=','
nnoremap  :NERDTreeToggle
" Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
nnoremap  :bnext
nnoremap  :bprev
set tags=./tags,tags;/
" Tmux Navigator integration for Vim
let g:navigator_no_mappings = 1
nnoremap  :TmuxNavigateLeft
nnoremap  :TmuxNavigateDown
nnoremap  :TmuxNavigateUp
nnoremap  :TmuxNavigateRight




setting up smb server raspberry pi

sudo apt-get install samba samba-common-bin
sudo nano /etc/samba/smb.conf

## add to bottom
[thon2na]
path = /home/pi/
writeable=Yes
create mask=0777
directory mask=0777
public=no

sudo smbpasswd -a pi
sudo systemctl restart smbd

Friday, September 8, 2023

TTS AI tool

elevenlabs

elevenlabs

audio transcription

Audio Transcription

Revoldiv

this website is great for converting mp3 to text

for mac shortcuts you can add on an app called actions. Actions adds extra functionality to shortcuts, one is transcribe audio as of 2023 its kind of buggy and i prefer revoldiv its more accurate.

Thursday, September 7, 2023

Bash Shortcuts

Bash Shortcuts

most important - ctrl U delete line

Monday, September 4, 2023

Videosnap : recording vid using CLI

recording video using CLI: VideoSnap

videosnap

Wednesday, August 23, 2023

Musicals with gpt

Here’s a fun idea. Make musicals using chat gpt. These are the steps:

  1. Make a list of your favourite songs
  2. get the lyrics
  3. Paste them into chatgpt
  4. Figure out the order you want your songs to be in, maybe ask chatgpt to order them for you if your lazy.
  5. get chatgpt to create a plot that connects the songs together.

markdown to powerpoint!

making a powerpoint in markdown

using cleaver and node

cleaver npm install -g cleaver run it with cleaver path/to/something.md


tried pandoc and beamer which required latex packages to be installed. latex is too huge. cleaver is better nice and simple outputs it as html.

	presenta web based md to slide show website.

Monday, August 21, 2023

Emmet Vim

Emmet vim

Emmet + Vim - The Best Way To Write Html

for vimplug

Plug ‘mattn/emmet-vim’

add to .vimrc

“ Emmet shortcuts let g:user_emmet_mode=’n’ let g:user_emmet_leader_key=’,’

this remaps the awkward ctrl y + comma to just normal mode comma

Tried for ages to get this plugin working and i didnt see the comma!!!! I kept doing ctrl Y nothing happened. html:5 then ,, BOOM boilerplate html !!

a-shell mini vim setup

a-shell can run vim!!


  • put .vimrc in ~/documents
  • vimplug doesn’t work you gotta install them manually
  • git doensn’t work properly instead you use lg2
  • path to install plugins is ~/documents/.vim/pack/*/start/
  • pickFolder is the command to select a folder
  • lg2 clone https://github.com/theplugin
https://github.com/tpope/vim-surround
https://github.com/jiangmiao/auto-pairs
https://github.com/ap/vim-css-color
https://github.com/vimwiki/vimwiki
https://github.com/907th/vim-auto-save
https://github.com/mattn/emmet-vim
https://github.com/plasticboy/vim-markdown
set background=dark
syntax enable
set nobackup
set nowb
set noswapfile
set number
set autoread
set wildmenu
set ffs=unix,dos,mac
set encoding=utf8
set showmatch
set backspace=eol,start,indent
set autoread
set wrap
set si
set ai
filetype plugin on
filetype indent on
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set nocompatible
filetype plugin on
set autowriteall
set laststatus=2
" Emmet shortcuts
let g:user_emmet_mode='n'
let g:user_emmet_leader_key=','

Saturday, August 19, 2023

cliptools is great

cliptools lets you dump your entire clip history in one go
https://apps.apple.com/ca/app/cliptools/id1619348240?mt=12

https://www.youtube.com/watch?v=pGAqV0O__4w

Smart Clips

Smart clips are clips you create manually instead of being imported from copied text. They can also use some very powerful special functions embedded in the text. For example, if you have the smart clip **The quick {clip:1} fox.** and the first copied clip is currently **blue**, then using the smart clip will paste The quick blue fox.

{clip:N} will paste the copied clip that is at the position N indicated by the number.

{date:M/d/yy} will paste the current date and time using the same formatting as the Paste Date and Paste Time commands. You can also use **|+** and **|-** like in those commands.

{ask:Which name?} will prompt you with the text Which name? to enter text that will appear in place of that function.

{pick:this|that|other} will prompt you to choose between this, that or other and then that will appear in place of that function. This prompt will also let you type in any text in addition to choosing from the list.

{random:this|that|other} will randomly choose between this, that or other and then that will appear in place of that function.

{selection} will use the text currently selected at that point in the Smart Clip. If no text is selected it will use the contents of the clipboard instead