Tuesday, November 28, 2023

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.