Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing
This commit is contained in:
commit
5ece5b7bc9
|
@ -0,0 +1,18 @@
|
|||
# essentially the same thing as sxhkdrc, but super is replaced with ctrl + b and all shortcuts are chorded
|
||||
ctrl + b; c
|
||||
st
|
||||
|
||||
ctrl + b; q
|
||||
bspc node -c
|
||||
|
||||
ctrl + b; {_,shift + } {1-9,0}
|
||||
bspc {desktop -f,node -d} '{1-9,10}'
|
||||
|
||||
ctrl + b; {_,ctrl +,shift + }{h,j,k,l}
|
||||
bspc node -{f,p,s} {west,south,north,east}
|
||||
|
||||
ctrl + b; d
|
||||
tmenu_run
|
||||
|
||||
ctrl + b; m
|
||||
mode phonemouse
|
|
@ -0,0 +1,43 @@
|
|||
# exit mouse mode
|
||||
w
|
||||
mode phone
|
||||
|
||||
# move left
|
||||
{ctrl +,shift +,_} h
|
||||
xdotool mousemove_relative -- {-5,-50,-20} 0
|
||||
|
||||
# move down
|
||||
{ctrl +,shift +,_} j
|
||||
xdotool mousemove_relative -- 0 {5,50,20}
|
||||
|
||||
# move up
|
||||
{ctrl +,shift +,_} k
|
||||
xdotool mousemove_relative -- 0 {-5,-50,-20}
|
||||
|
||||
# move right
|
||||
{ctrl +,shift +,_} l
|
||||
xdotool mousemove_relative -- {5,50,20} 0
|
||||
|
||||
# left, middle, right click
|
||||
{ctrl +,_} {a,s,d}
|
||||
xdotool {mousedown,click} {1,2,3}
|
||||
|
||||
# let go of clicked button
|
||||
q
|
||||
xdotool mouseup 1; xdotool mouseup 2; xdotool mouseup 3
|
||||
|
||||
# move the mouse to the top of the window
|
||||
g ; g
|
||||
mousehelper top
|
||||
|
||||
# ditto for bottom
|
||||
G
|
||||
mousehelper bottom
|
||||
|
||||
# ditto for left
|
||||
0
|
||||
mousehelper left
|
||||
|
||||
# ditto for right
|
||||
dollar
|
||||
mousehelper right
|
|
@ -35,6 +35,7 @@
|
|||
libreoffice
|
||||
texliveMedium
|
||||
ledger
|
||||
git-annex
|
||||
];
|
||||
|
||||
services.hardware.bolt.enable = true; # thunderbolt support
|
||||
|
@ -81,7 +82,7 @@
|
|||
hostName = "mlg";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 6000 ];
|
||||
allowedTCPPorts = [ 6000 8000 ];
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 1714; to = 1764; } # KDE Connect
|
||||
];
|
||||
|
|
|
@ -18,12 +18,17 @@
|
|||
./franklincce.nix
|
||||
];
|
||||
|
||||
# nix optimization
|
||||
nix.optimise = {
|
||||
nix = {
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "03:45" ];
|
||||
dates = [ "02:30" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "03:15";
|
||||
options = "-d";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
|
@ -59,6 +64,7 @@
|
|||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILBGh1FHPneg7PCDkhMs2BCJPTIRVJkRTKpOj1w02ydD usr" # copernicus
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGrpVDLQszFKoYbvYKRyVTTpehxR0BVU47SXkz39l2wK usr" # mainsail
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xUbQw9+RCPVw7qCFm4NNCP/MpS2BIArcwMv0KdKOI usr" # mlg
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHZw5bg0TrvSkW/XQa4c+2iLbIKOxfMGbjy5Nb3HSfBv usr" # phone
|
||||
];
|
||||
isNormalUser = true;
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
termux: termux-pkgs termux-dots utils-sh st
|
||||
|
||||
st:
|
||||
cd builds/st/ && CC=clang make && cp st ~/.local/bin/st
|
||||
cd ../../../builds/st/ && CFLAGS="-DIS_PHONE" CC=clang make && cp st ~/.local/bin/st
|
||||
|
||||
utils-sh:
|
||||
cp builds/utils/sh/* ~/.local/bin
|
||||
cp ../../../builds/utils/* ~/.local/bin
|
||||
|
||||
termux-pkgs:
|
||||
pkg install \
|
||||
neovim \
|
||||
xdotool \
|
||||
git \
|
||||
tig \
|
||||
tigervnc \
|
||||
|
@ -33,7 +34,7 @@ termux-pkgs:
|
|||
x11-repo
|
||||
|
||||
termux-dots:
|
||||
ln -sf $(CURDIR)/.config ~/.config
|
||||
ln -sf $(CURDIR)/home/ssh/config ~/.ssh/config
|
||||
ln -sf $(CURDIR)/../../../.config ~/.config
|
||||
ln -sf $(CURDIR)/../../../home/ssh/config ~/.ssh/config
|
||||
ln -sf ~/.config/bash/bashrc ~/.bashrc
|
||||
ln -sf ~/.config/bash/profile ~/.bash_profile
|
|
@ -3,7 +3,12 @@
|
|||
/*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
#ifdef IS_PHONE
|
||||
static char *font = "Monospace:pixelsize=34:antialias=true:autohint=true";
|
||||
#else
|
||||
static char *font = "Fantasque Sans Mono:pixelsize=14:antialias=true:autohint=true";
|
||||
#endif
|
||||
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
|
|
|
@ -186,6 +186,12 @@ case "$(hostname)" in
|
|||
dunst & disown
|
||||
phone pair & disown
|
||||
;;
|
||||
"localhost") # phone in termux
|
||||
pkill sxhkd
|
||||
sxhkd -c ~/.config/sxhkd/phone & disown
|
||||
|
||||
xrandr --output VNC-0 --mode 1920x1080
|
||||
bspc monitor VNC-0 -d 1 2 3 4 5 6 7 8 9
|
||||
esac
|
||||
|
||||
# initial post-wm setup
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
#!/bin/bash
|
||||
|
||||
printf "This tool is for establishing sshfs links to transfer git-annex repo contents.\n"
|
||||
|
||||
printf "server or client?\n"
|
||||
printf 'EITHER OF `s` or `c`\n'
|
||||
|
||||
read -p "?> "
|
||||
|
||||
case "$REPLY" in
|
||||
s)
|
||||
printf "[] ensure that port 22 is unfiltered\n"
|
||||
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||
|
||||
printf "[] starting sshd\n"
|
||||
sudo systemctl start sshd
|
||||
|
||||
WIRELESS_INTERFACE=$(
|
||||
nmcli --get-values GENERAL.DEVICE,GENERAL.TYPE device show |
|
||||
sed '/^wifi/!{h;d;};x' |
|
||||
head -n1)
|
||||
|
||||
IP_OF_INTERFACE=$(
|
||||
ip address show dev $WIRELESS_INTERFACE |
|
||||
grep 'inet ' |
|
||||
awk -F' ' '{print $2}' |
|
||||
awk -F'/' '{print $1}')
|
||||
|
||||
printf "[] instruct client to connect to %s\n" "$IP_OF_INTERFACE"
|
||||
|
||||
printf "[] waiting to stop sshd\n"
|
||||
|
||||
read
|
||||
|
||||
sudo systemctl stop sshd
|
||||
|
||||
printf "[] sshd stopped, but port 22 still open\n"
|
||||
;;
|
||||
c)
|
||||
printf "What IP to connect to?\n"
|
||||
printf "ENSURE THAT the IP is accessable on the current VLAN\n"
|
||||
|
||||
printf 'ONE OF `ipv4 address`'
|
||||
|
||||
read -p "?> " ADDRESS
|
||||
|
||||
INFORMED_GUESS=$(ssh usr@$ADDRESS hostname)
|
||||
if [ -z "$INFORMED_GUESS" ]; then
|
||||
printf "What hostname?\n"
|
||||
|
||||
mkdir -p ~/annex-remotes
|
||||
ls ~/annex-remotes
|
||||
|
||||
read -p "?> " REMOTE_HOST
|
||||
else
|
||||
REMOTE_HOST=$INFORMED_GUESS
|
||||
printf "[] using hostname %s\n" "$INFORMED_GUESS"
|
||||
fi
|
||||
|
||||
printf "[] mounting fs via sshfs\n"
|
||||
|
||||
mkdir -p ~/annex-remotes/$REMOTE_HOST
|
||||
fusermount3 -qu ~/annex-remotes/$REMOTE_HOST
|
||||
sshfs usr@$ADDRESS:/home/usr/annex ~/annex-remotes/$REMOTE_HOST
|
||||
|
||||
printf "[] mounted fs\n"
|
||||
|
||||
# check if the fuse mount worked
|
||||
df_output=$(df -h | grep -c '/home/usr/annex')
|
||||
if [ "$df_output" -eq 0 ]; then
|
||||
printf "It seems the sshfs mount didn't work. Exiting.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if we need to make a copy of the annex on the new device
|
||||
if [ ! -d ~/annex-remotes/$REMOTE_HOST/.git ]; then
|
||||
printf "Should I do that with the current computer's git-annex store?\n\n"
|
||||
|
||||
printf '`y`) initialize with the local store\n'
|
||||
printf '`n`) no, just mount the sshfs\n'
|
||||
|
||||
read -p '?> '
|
||||
|
||||
case $REPLY in
|
||||
y)
|
||||
cd ~/annex-remotes/$REMOTE_HOST
|
||||
printf "[] cloning the local git-annex store\n"
|
||||
git clone -v ~/annex
|
||||
|
||||
shopt -s dotglob # include dotfiles and dotdirs in wildcard
|
||||
mv ./annex/* . # move everything up a dir
|
||||
|
||||
if find "annex" -maxdepth 1 -type f -o -type d -empty; then # if annex is empty...
|
||||
printf "[] removing spurious ./annex directory\n"
|
||||
rm -r ./annex # ...remove it
|
||||
fi
|
||||
|
||||
git annex init "$REMOTE_HOST"
|
||||
cd ~/annex
|
||||
git remote add $REMOTE_HOST ~/annex-remotes/$REMOTE_HOST
|
||||
;;
|
||||
esac # it's okay that the `n` and `*` cases fall-through
|
||||
fi
|
||||
|
||||
printf "[] waiting to stop sshfs\n"
|
||||
|
||||
read
|
||||
|
||||
fusermount3 -u ~/annex-remotes/$REMOTE_HOST
|
||||
|
||||
printf "[] unmounted sshfs\n"
|
||||
;;
|
||||
*)
|
||||
printf "unknown\n"
|
||||
;;
|
||||
esac
|
18
flake.lock
18
flake.lock
|
@ -41,11 +41,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1726632193,
|
||||
"narHash": "sha256-oDT1HGKLn3HhzgmYwhSf31Rkpa7K2IBuhMsHGtLfAng=",
|
||||
"lastModified": 1728307881,
|
||||
"narHash": "sha256-stJXHgN3twyjLnQQQECa1LgdTyz6JuUHgEf8pjHz/rQ=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "b487b142b50bb70d4d1a86625e9de4eff645b4d1",
|
||||
"rev": "60121cd3a79a4490206e172cbf00160dbc22f503",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
@ -93,11 +93,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726592409,
|
||||
"narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=",
|
||||
"lastModified": 1726989464,
|
||||
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594",
|
||||
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -199,11 +199,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1726447378,
|
||||
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
|
||||
"lastModified": 1728193676,
|
||||
"narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
|
||||
"rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
Loading…
Reference in New Issue