Add some more to setup
This commit is contained in:
@@ -8,6 +8,8 @@ enpass &
|
||||
|
||||
dwmc toggleview 32
|
||||
|
||||
clear
|
||||
|
||||
read -n 1 -r -s -p $'Press enter for next clip...\n'
|
||||
|
||||
echo "$MASTERPW" | xclip -selection clipboard -i
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo "Creating development directories"
|
||||
|
||||
mkdir "$HOME/Code"
|
||||
mkdir "$HOME/Code/DevOps" # For server and computer admin
|
||||
mkdir "$HOME/Code/FSharp"
|
||||
|
||||
30
.local/bin/setup/setupfirefox
Executable file
30
.local/bin/setup/setupfirefox
Executable file
@@ -0,0 +1,30 @@
|
||||
#! /usr/bin/zsh
|
||||
|
||||
FIREFOX=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Firefox" 2>&1)
|
||||
FIREFOXUN=$(echo "$FIREFOX" | grep -Po "(?<=login: )[^\s]+")
|
||||
FIREFOXPW=$(echo "$FIREFOX" | grep -Po "(?<=pass : ).+(?=\")")
|
||||
|
||||
firefox "https://ffprofile.com/"
|
||||
|
||||
read -s -k $'?Press enter when you have downloaded the profile...\n'
|
||||
|
||||
profile="$(find "$HOME/.mozilla/firefox" -type d -name '*.default-release')"
|
||||
|
||||
rm -rf "$profile"
|
||||
|
||||
unzip -o -qq "$HOME/Downloads/profile.zip" -d "$profile"
|
||||
|
||||
echo "$FIREFOXUN" | xclip -selection clipboard -i
|
||||
|
||||
setsid "$TERMINAL" -e firefox "https://accounts.firefox.com/signin?context=fx_desktop_v3&entrypoint=fxa_app_menu&action=email&service=sync" &
|
||||
|
||||
clipnotify
|
||||
|
||||
echo "$FIREFOXPW" | xclip -selection clipboard -i
|
||||
|
||||
read -s -k $'?Press enter when you have synced Firefox...\n'
|
||||
|
||||
echo "" | xclip -selection clipboard -i
|
||||
|
||||
firefox "https://www.enpass.io/downloads/"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo "Setting up keyring to start at login"
|
||||
|
||||
# Start gnome keyring at login
|
||||
sudo -A sed -i '/auth include system-local-login/a auth optional pam_gnome_keyring.so' /etc/pam.d/login
|
||||
sudo -A sed -i '/session include system-local-login/a session optional pam_gnome_keyring.so auto_start' /etc/pam.d/login
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo "Configuring MapTool"
|
||||
|
||||
# Scale up the GUI by 2 times for HiDPI screens
|
||||
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/.DPI" ]; then
|
||||
DPI="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/x11/.DPI")"
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
#! /bin/bash
|
||||
#! /usr/bin/zsh
|
||||
|
||||
TOWER=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Tower" 2>&1)
|
||||
TOWERUN=$(echo "$TOWER" | grep -Po "(?<=login: )\w+")
|
||||
TOWERPW=$(echo "$TOWER" | grep -Po "(?<=pass : ).+(?=\")")
|
||||
|
||||
nextcloud
|
||||
echo "https://tower.scarif.space" | xclip -selection clipboard -i
|
||||
|
||||
mkdir -p "$HOME/Tower"
|
||||
|
||||
nextcloud &
|
||||
|
||||
dwmc toggleview 32
|
||||
|
||||
clipnotify
|
||||
|
||||
echo "$TOWERUN" | xclip -selection clipboard -i
|
||||
|
||||
clipnotify
|
||||
|
||||
echo "$TOWERPW" | xclip -selection clipboard -i
|
||||
|
||||
read -s -k $'?Press enter when you have synced Nextcloud... \n'
|
||||
|
||||
echo "" | xclip -selection clipboard -i
|
||||
|
||||
dwmc toggleview 0
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Setting up SSH"
|
||||
|
||||
# Extract the login details from enpass
|
||||
LABS=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Labs" 2>&1)
|
||||
LABSUN=$(echo "$LABS" | grep -Po "(?<=login: )\w+")
|
||||
@@ -28,7 +30,7 @@ CREDENTIALS="$LABSUN:$LABSPW" # The credentials to pass to the API
|
||||
KEYS_URL="https://$CREDENTIALS@labs.scarif.space/api/v1/user/keys"
|
||||
|
||||
# Get all the existing keys
|
||||
KEYS=$(curl -X GET -s --url "$KEYS_URL")
|
||||
KEYS=$(curl -X GET -s -S --url "$KEYS_URL")
|
||||
|
||||
KEY_EXISTS=$(echo $KEYS | jq --arg TITLE "$TITLE" 'map(.title)|contains([$TITLE])')
|
||||
|
||||
@@ -41,10 +43,10 @@ if [[ $KEY_EXISTS == true ]]; then
|
||||
for ID in $IDS; do
|
||||
echo "Deleting key with ID $ID"
|
||||
curl -X DELETE \
|
||||
-s \
|
||||
-s -S \
|
||||
-H "Accept: application/json" \
|
||||
-H "Content-Type:application/json" \
|
||||
--url "$KEYS_URL/$ID"
|
||||
--url "$KEYS_URL/$ID" > /dev/null
|
||||
done
|
||||
fi
|
||||
fi
|
||||
@@ -52,11 +54,11 @@ fi
|
||||
|
||||
# Save the new key in gitea
|
||||
curl -X POST \
|
||||
-s \
|
||||
-s -S \
|
||||
-H "Accept: application/json" \
|
||||
-H "Content-Type:application/json" \
|
||||
--data "$(generate_post_data)" \
|
||||
--url "$KEYS_URL"
|
||||
--url "$KEYS_URL" > /dev/null
|
||||
|
||||
HTTP_REPLACE="s/https:\/\/labs\.scarif\.space\//git@labs.scarif.space:/"
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#! /bin/bash
|
||||
|
||||
tee /etc/udev/rules.d/99-wacom.rules <<EOF
|
||||
echo "Initialising Wacom settings"
|
||||
|
||||
sudo tee /etc/udev/rules.d/99-wacom.rules <<HRD
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", TAG+="systemd". ENV{SYSTEMD_USER_WANTS}+="wacom.service"
|
||||
EOF
|
||||
HRD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user