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