how to multi line comment in vim
- ctrl + v
- shift + I then # (or whatever your comment)
- hit escape
this applys the comment to all the selected lines in visual block mode
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
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..
yeah so what you need to do to get this to work is 3 things
don't forget to
chmod +x speak.sh
#!/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'
sudo apt install sox
then you can run this command to play 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.
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.
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'
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
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.
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
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.
this chrome extension is great! combined with tiles window manager its perfect
there is also one for firefox
by navi.jadoor
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 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)
use tmux navigator to have proper vim navigation. leader k arrows is only if your a masochist.
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}"
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.
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
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
reaper, koala sampler, pencil2d, milkytracker, renoise, lmms, shotcut/openshot, kdenlive, gimp, mypaint
to install linux vsts drop the file into /usr/lib/vst/ (mkdir vst if it doesnt exit yet)
import the repository for tukan
https://raw.githubusercontent.com/TukanStudios/TUKAN_STUDIOS_PLUGINS/main/index2.xml
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 = (/)
## Half hour ##
input.mp3 output.mp3 trim 0 1800 : newfile : restart
##1 hour cuts##
input.mp3 output.mp3 trim 0 3600 : newfile : restart
use the wc command.
wc file.txt
the output is 3 columns of numbers:
# of lines, WORDCOUNT, bytes
#/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
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
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.
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
just make pipes it auto aligns
pipe and 3 dashes will do horizontal lines
== VIMWIKITABLE CMDS ==
== markdown-toc ==
ajorgensen/vim-markdown-toc
:GenMarkdownTOC:
:UpdateMarkdownTOC:
: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: /
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:
You can create custom mappings in your .vimrc to quickly apply Tabularize to common delimiters or regex patterns. For example:
nnoremap
== 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
== 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.
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:
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
the best theme = "tommorow night eighties" w roboto mono font.
sandbox for the other blog to practise posting and try out ideas. build up that muscle memory.