aboutsummaryrefslogtreecommitdiff
path: root/system-notes.md
blob: 8d05fd68b3f2d4e2e0e9227358650ec98707154f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# Archlinux System Setup for Markov

## `aconfmgr`

To use, first install from AUR.
Then clone the repo in `~/.config/aconfmgr` and run `aconfmgr apply`.

## Firefox

- [arkenfox gui](https://arkenfox.github.io/gui/)
- [arkenfox user.js](https://github.com/arkenfox/user.js/wiki/2.1-User.js)
- See [here](https://github.com/arkenfox/user.js/wiki/4.1-Extensions#-recommended) for uBlock.
- Add
```
! Those incessant "Sign in with Google" boxes
accounts.google.com/gsi/*
```
  to my custom filters.

# TODOs

- complete the script `~/.local/bin/moreka`
- verify if `~/.local/bin/moreka-open` works
- XF86 keys not working...

# pam

run `gpg -K --with-keygrip` and get the Keygrip (the one under ssb), put it in
`~/.config/pam-gnupg`

# oama
oama authorize microsoft moreka@mit.edu --device

# to clone a git forked repo and add upstream repo as well
```sh
git remote add upstream https://github.com/.../....git
git fetch upstream
git branch -r # gives all branches
git checkout main # or master (my local branch)
git pull --rebase upstream main # or master
git push origin main
```

Then, start working on a fix branch:
```sh
git checkout -b feature/my-new-thing
git push -u origin feature/my-new-thing
```

From time to time, update the main branch:
```sh
git checkout main
git fetch upstream
git rebase upstream/main
git push origin main
```
and if the feature branch has diverged
```sh
git checkout feature/my-new-thing
git rebase main
```

**Always keep main clean!**

# bash inputrc

Some useful stuff here:
```
C-x p --> edit the path
C-x " --> prepare to type a quoted word
C-x q --> quote the current or previous word
C-x r --> redraw the current line
```

# GPG

```bash
gpg --import your@id.here.pub.asc
gpg --import your@id.here.priv.asc
gpg --import your@id.here.sub_priv.asc
gpg --import-ownertrust ownertrust.txt

gpg --edit-key your@id.here
```
```cmd
gpg> trust
Your decision? 5
```

# fingerprint

1. fprintd, imagemagick installed
2. pam stuff (changed hyprlock and polkit-1):
```sh
cp /usr/share/polkit-1/rules.d/50-default.rules /etc/polkit-1/rules.d/
```

```rules
polkit.addAdminRule(function(action, subject) {
    return ["unix-group:wheel"];
});
```

3. sudo fprintd-enroll -f right-index-finger moreka
4. fprintd-verify
5. sudo fprintd-enroll -f left-index-finger moreka
4. fprintd-verify

# LESS

&pattern  -> display only matching lines
ESC-u -> toggle search highlight
^O^N -> search forward for OSC8 hyperlink
^O^P -> search backward for OSC8 hyperlink
^O^L -> jump to currently selected OSC8
^O^O -> open currently selected OSC8
v -> edit file with editor
| ???
s -> save to file

-i -> ignore case

t, T -> go to next/prev tag
m<letter> -> mark top line
'<letter> -> goto mark
'' -> goto previous pos

# iPhone

works surprisingly well! Wow!

main link: [archwiki](https://wiki.archlinux.org/title/IOS)

install `libimobiledevice`, `usbmuxd`, and `ifuse`.

## Mounting iOS

After connecting, check `systemctl status usbmuxd.service`. It should be running automatically.

```bash
# pairing
idevicepair pair # might need to enter passcode and trust the computer on iphone
idevicepair validate

# data
ifuse some_user_mountpoint

# list apps
ifuse --list-apps
ifuse --documents APPID some_other_mountpoint # wasn't that useful
```
Pictures/videos are going to be in `DCIM/`.

When done, `fusermount -u mount_point`.


## Backup

```bash
# to backup
idevicebackup2 backup --full some_folder

# to restore
idevicebackup2 restore some_folder
```

- [GUI for exploring files in a backup](https://github.com/MaxiHuHe04/iTunes-Backup-Explorer)
- [Restoring firmware](https://github.com/libimobiledevice/idevicerestore) (also in the AUR: `idevicerestore-git`)

# VIM
- Interesting. Vim has a confini filetype (can be used for Python's configparser-type configs)

- using `:oldfiles`, you can do `:e #<1` to edit the first item (replace 1 with any item number)

# some links
https://www.youtube.com/watch?v=Jllnhid7O7w


# CachyOS Kernel Install
```bash
sudo pacman-key --recv-keys F3B607488DB35A47 --keyserver keyserver.ubuntu.com
sudo pacman-key --lsign-key F3B607488DB35A47

sudo pacman -U \
    'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-keyring-20240331-1-any.pkg.tar.zst' \
    'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-mirrorlist-22-1-any.pkg.tar.zst' \
    'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-v3-mirrorlist-22-1-any.pkg.tar.zst'
```

Then, in `pacman.conf`:
```confini
Architecture = x86_64 x86_64_v3 # replace the existing "auto"

[multilib]
Include = /etc/pacman.d/mirrorlist

[cachyos-v3]
Include = /etc/pacman.d/cachyos-v3-mirrorlist

[cachyos-core-v3]
Include = /etc/pacman.d/cachyos-v3-mirrorlist

[cachyos-extra-v3]
Include = /etc/pacman.d/cachyos-v3-mirrorlist
```
Then,
```bash
sudo pacman -Syu
sudo pacman -S linux-cachyos linux-cachyos-headers
```

Then, copy the default loader into `/boot/loader/entries/cachyos-kernel.conf` and change:
```
title   Arch Linux (with cachyos kernel)
linux   /vmlinuz-linux-cachyos
initrd  /initramfs-linux-cachyos.img
options [same as the default]
```

# I also installed UEFI shell `edk2-shell` following Archwiki's guide
[link](https://wiki.archlinux.org/title/Systemd-boot#UEFI_Shells_or_other_EFI_applications)

# Fzflua undotree

# HDMI sound

```sh
wpctl status | less
```
then see what is the default at the bottom and take note of the number of the HDMI output.
After that, use
```sh
wpctl set-default 58
```

# Mirroring

Use `hyprmon`. Don't forget to apply (`A`).

# Revert back to markdown todos

# etc-update from gentoo... check it out (related to `pacdiff` from `pacman-contrib`)

# mount

```bash
udiskctl mount -b /dev/sda3
```

# paccat

# installed HyprDynamicMonitos-bin

# stow -R for restow

# qutebrowser
- [Greasemonkey · Issue #926 · darkreader/darkreader](https://github.com/darkreader/darkreader/issues/926#issuecomment-575893299)
- need `python-idna` and `python-tldextract` for the qute-pass userscript to work; see [here](/usr/share/qutebrowser/userscripts/qute-pass:43-52).

# pasteimg in neovim is on the go!

# podman

```sh
pacman -S podman

```

# treesitter-modules.nvim

# lambda font
```sh
curl -LO https://github.com/glepnir/dotfiles/raw/refs/heads/master/fonts/Lambda/Lambda.ttf
curl -LO https://github.com/glepnir/dotfiles/raw/refs/heads/master/fonts/Lambda/Lambda-Bold.ttf
curl -LO https://github.com/glepnir/dotfiles/raw/refs/heads/master/fonts/Lambda/Lambda-BoldItalic.ttf
curl -LO https://github.com/glepnir/dotfiles/raw/refs/heads/master/fonts/Lambda/Lambda-Italic.ttf
```


# Alacritty.nvim issue repro


sudo rsync -avxHAX /home/yourusername/ /path/to/your/backup/location/

# Some todos
- call/email US embassy for getting an appointment
- call/email [headstart](https://www.caasomerville.org/head-start/)

# configs:
- gpanders
- glepnir
- seandewar