mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2025-01-21 02:51:02 +01:00
broken laptop backup
This commit is contained in:
parent
08585df3ac
commit
5aac22cb6d
@ -14,3 +14,5 @@ alias reactserver='docker run --rm -p 8080:8080 -v "$PWD":/app mastermindzh/gene
|
||||
alias mongoserver='docker run -d --rm -p 27017:27017 --name mongo-server -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=123 -v ~/.db/mongo:/data/db mongo'
|
||||
alias sqlserver='docker run --rm --name sql-server -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Your_Password123" -p 1433:1433 -v ~/.db/mssql:/var/opt/mssql mcr.microsoft.com/mssql/server'
|
||||
alias mailcatcher='docker run -d -p 1080:1080 -p 1025:1025 --name mailcatcher schickling/mailcatcher'
|
||||
alias openwebui='docker run --rm -d -p 3004:8080 -v ~/.ollama:/root/.ollama -v ~/.open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:ollama'
|
||||
alias postgresdb='docker run --rm -d -v ~/.db/postgres:/var/lib/postgresql/data -e POSTGRES_PASSWORD=admin -e POSTGRES_USER=admin -e POSTGRES_DB=postgres --name="postgres" -p 5432:5432 postgres'
|
||||
|
@ -9,7 +9,6 @@ fi
|
||||
# declare variables
|
||||
MY_SERVER_LOCATION="//10.10.1.11"
|
||||
MOUNT_PREFIX="/mnt"
|
||||
USERNAME="mastermindzh"
|
||||
|
||||
# check whether array contains a key
|
||||
containsElement() {
|
||||
@ -86,6 +85,11 @@ declare -A MOUNTS12=(
|
||||
[share]="data"
|
||||
[mount]="data"
|
||||
)
|
||||
declare -A MOUNTS13=(
|
||||
[server]="$MY_SERVER_LOCATION"
|
||||
[share]="vault"
|
||||
[mount]="vault"
|
||||
)
|
||||
# declare array with "objects"
|
||||
declare -n MOUNTS
|
||||
|
||||
@ -139,7 +143,7 @@ for MOUNTS in ${!MOUNTS@}; do
|
||||
mount.cifs "$SERVER_LOCATION" "$MOUNT_LOCATION" -o user=mastermindzh,noperm,rw,vers=2.0
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Succesfully mounted $MOUNT_LOCATION"
|
||||
echo "Successfully mounted $MOUNT_LOCATION"
|
||||
else
|
||||
echo "Failed mounting $SERVER_LOCATION on $MOUNT_LOCATION"
|
||||
fi
|
||||
|
51
bash/rofi/docker.sh
Normal file
51
bash/rofi/docker.sh
Normal file
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
#Set default terminal emulator
|
||||
TERMINAL_APP=xfce4-terminal
|
||||
CUSTOM_SCRIPTS_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)/custom"
|
||||
|
||||
function execInTerminal {
|
||||
$TERMINAL_APP -H -e "$1"
|
||||
}
|
||||
|
||||
function getExtraActions {
|
||||
local custom_scripts=""
|
||||
if [ -d "$CUSTOM_SCRIPTS_DIR" ]; then
|
||||
for file in "$CUSTOM_SCRIPTS_DIR"/*; do
|
||||
custom_scripts="$custom_scripts\n$(basename "$file")"
|
||||
done
|
||||
fi
|
||||
echo "$custom_scripts"
|
||||
}
|
||||
|
||||
selected_container=$(docker ps --format "table {{.Names}}\t{{.Image}}\t{{.ID}}" | sed '1d' | rofi -p "🥡 Running containers " -dmenu)
|
||||
container_options_attach="Attach"
|
||||
container_options_stop="Stop"
|
||||
container_options_logs="Logs"
|
||||
container_options_restart="Restart"
|
||||
|
||||
if [[ ! -z $selected_container ]]; then
|
||||
container_id=$(echo "$selected_container" | awk '{ print $3}')
|
||||
container_name=$(echo "$selected_container" | awk '{ print $1}')
|
||||
|
||||
selected_action=$(echo -e "$container_options_attach\n$container_options_logs\n$container_options_restart\n$container_options_stop$(getExtraActions)" | rofi -dmenu -selected-row 0)
|
||||
case $selected_action in
|
||||
"$container_options_attach")
|
||||
execInTerminal "docker exec -it ${container_id} /bin/sh"
|
||||
;;
|
||||
"$container_options_restart")
|
||||
msg=$(docker restart "$container_id")
|
||||
rofi -e "Message from the docker: $msg"
|
||||
;;
|
||||
"$container_options_logs")
|
||||
execInTerminal "docker logs -f ${container_id}"
|
||||
;;
|
||||
"$container_options_stop")
|
||||
msg=$(docker stop "$container_id")
|
||||
rofi -e "Message from the docker: $msg"
|
||||
;;
|
||||
*)
|
||||
bash "$CUSTOM_SCRIPTS_DIR/$selected_action" "$container_name"
|
||||
;;
|
||||
esac
|
||||
fi
|
@ -4,6 +4,6 @@
|
||||
#/bin/bash
|
||||
displays=($(xrandr | awk '/ connected /{print $1}'))
|
||||
selected_display="${displays[0]}"
|
||||
xrandr --output "$selected_display" --brightness 0.75
|
||||
xrandr --output "$selected_display" --brightness 0.60
|
||||
|
||||
# power savings
|
||||
|
@ -169,7 +169,7 @@ exec = "~/.config/i3/scripts/tidal-cli.sh info"
|
||||
click-left = "~/.config/i3/scripts/tidal-cli.sh playpause"
|
||||
scroll-up = "~/.config/i3/scripts/tidal-cli.sh next"
|
||||
scrolldown = "~/.config/i3/scripts/tidal-cli.sh previous"
|
||||
click-right = "~/.config/i3/scripts/tidal-cli.sh songwhip | xclip -selection clipboard"
|
||||
click-right = "~/.config/i3/scripts/tidal-cli.sh getLink | xclip -selection clipboard"
|
||||
|
||||
[module/pulseaudio-microphone]
|
||||
type = custom/script
|
||||
|
@ -1,61 +1,49 @@
|
||||
version: 2
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||
|
||||
blocks:
|
||||
# prompt on the right
|
||||
- type: rprompt
|
||||
overflow: hidden
|
||||
segments:
|
||||
- background: transparent
|
||||
foreground: yellow
|
||||
style: plain
|
||||
template: "{{ .FormattedMs }}"
|
||||
type: executiontime
|
||||
properties:
|
||||
threshold: 1
|
||||
|
||||
# prompt segment
|
||||
- type: prompt
|
||||
alignment: left
|
||||
newline: true
|
||||
segments:
|
||||
- foreground: "#77E4F7"
|
||||
template: "{{ .Path }} "
|
||||
type: path
|
||||
properties:
|
||||
home_icon: " "
|
||||
style: agnoster_short
|
||||
|
||||
# git segment
|
||||
- type: git
|
||||
foreground: "#C678DD"
|
||||
properties:
|
||||
fetch_status: true
|
||||
style: plain
|
||||
# template:
|
||||
# "<#ffffff>on</> {{ .HEAD }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed)
|
||||
# (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} {{ .Staging.String
|
||||
# }}{{ end }}"
|
||||
template: "<#ffffff>on</> {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }} {{end}} "
|
||||
|
||||
# current language info
|
||||
- type: node
|
||||
foreground: "#98C379"
|
||||
properties:
|
||||
fetch_version: true
|
||||
style: plain
|
||||
template: " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }} {{ .Full }} "
|
||||
|
||||
- alignment: left
|
||||
segments:
|
||||
- foreground: "#63F08C"
|
||||
style: plain
|
||||
template: "➜ "
|
||||
type: text
|
||||
type: prompt
|
||||
# bash won't play along :)
|
||||
# transient_prompt:
|
||||
# background: transparent
|
||||
# foreground_templates:
|
||||
# - "{{if gt .Code 0}}red{{end}}"
|
||||
# - "{{if eq .Code 0}}magenta{{end}}"
|
||||
# template: "❯ "
|
||||
|
||||
- type: rprompt
|
||||
overflow: hidden
|
||||
segments:
|
||||
- properties:
|
||||
cache_duration: none
|
||||
threshold: 1
|
||||
template: "{{ .FormattedMs }}"
|
||||
foreground: yellow
|
||||
background: transparent
|
||||
type: executiontime
|
||||
style: plain
|
||||
- type: prompt
|
||||
alignment: left
|
||||
segments:
|
||||
- properties:
|
||||
cache_duration: none
|
||||
home_icon: "\uf015 "
|
||||
style: agnoster_short
|
||||
template: "{{ .Path }} "
|
||||
foreground: "#77E4F7"
|
||||
type: path
|
||||
- properties:
|
||||
cache_duration: none
|
||||
fetch_status: true
|
||||
template: "<#ffffff>on</> {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }} \uf044 {{end}} "
|
||||
foreground: "#C678DD"
|
||||
type: git
|
||||
style: plain
|
||||
- properties:
|
||||
cache_duration: none
|
||||
fetch_version: true
|
||||
template: " \uf3d3 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }} {{ .Full }} "
|
||||
foreground: "#98C379"
|
||||
type: node
|
||||
style: plain
|
||||
newline: true
|
||||
- type: prompt
|
||||
alignment: left
|
||||
segments:
|
||||
- properties:
|
||||
cache_duration: none
|
||||
template: "➜ "
|
||||
foreground: "#63F08C"
|
||||
type: text
|
||||
style: plain
|
||||
version: 3
|
||||
|
61
config/poshthemes/mastermindzh.yaml.bak
Normal file
61
config/poshthemes/mastermindzh.yaml.bak
Normal file
@ -0,0 +1,61 @@
|
||||
version: 2
|
||||
blocks:
|
||||
# prompt on the right
|
||||
- type: rprompt
|
||||
overflow: hidden
|
||||
segments:
|
||||
- background: transparent
|
||||
foreground: yellow
|
||||
style: plain
|
||||
template: "{{ .FormattedMs }}"
|
||||
type: executiontime
|
||||
properties:
|
||||
threshold: 1
|
||||
|
||||
# prompt segment
|
||||
- type: prompt
|
||||
alignment: left
|
||||
newline: true
|
||||
segments:
|
||||
- foreground: "#77E4F7"
|
||||
template: "{{ .Path }} "
|
||||
type: path
|
||||
properties:
|
||||
home_icon: " "
|
||||
style: agnoster_short
|
||||
|
||||
# git segment
|
||||
- type: git
|
||||
foreground: "#C678DD"
|
||||
properties:
|
||||
fetch_status: true
|
||||
style: plain
|
||||
# template:
|
||||
# "<#ffffff>on</> {{ .HEAD }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if and (.Working.Changed)
|
||||
# (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} {{ .Staging.String
|
||||
# }}{{ end }}"
|
||||
template: "<#ffffff>on</> {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }} {{end}} "
|
||||
|
||||
# current language info
|
||||
- type: node
|
||||
foreground: "#98C379"
|
||||
properties:
|
||||
fetch_version: true
|
||||
style: plain
|
||||
template: " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }} {{ .Full }} "
|
||||
|
||||
- alignment: left
|
||||
segments:
|
||||
- foreground: "#63F08C"
|
||||
style: plain
|
||||
template: "➜ "
|
||||
type: text
|
||||
type: prompt
|
||||
# bash won't play along :)
|
||||
# transient_prompt:
|
||||
# background: transparent
|
||||
# foreground_templates:
|
||||
# - "{{if gt .Code 0}}red{{end}}"
|
||||
# - "{{if eq .Code 0}}magenta{{end}}"
|
||||
# template: "❯ "
|
||||
|
23
dependencies/aur.txt
vendored
23
dependencies/aur.txt
vendored
@ -2,27 +2,24 @@ visual-studio-code-bin
|
||||
i3blocks-contrib
|
||||
insync
|
||||
awesome-terminal-fonts-git
|
||||
otf-droid-sans-mono-powerline-git
|
||||
dracula-gtk-theme-full
|
||||
downgrade
|
||||
oh-my-posh
|
||||
dive
|
||||
xorg-xev
|
||||
gnome-text-editor
|
||||
chili-sddm-theme
|
||||
greenclip
|
||||
seafile
|
||||
seafile-client
|
||||
awf-gtk4
|
||||
networkmanager-l2tp
|
||||
xorg-xev
|
||||
notify-osd-customizable
|
||||
notifyconf
|
||||
dotnet-host-bin
|
||||
keychain
|
||||
nomachine
|
||||
chili-sddm-theme
|
||||
dive
|
||||
gnome-text-editor
|
||||
greenclip
|
||||
pulseaudio-ctl
|
||||
seafile
|
||||
seafile-client
|
||||
awf-gtk4
|
||||
|
||||
azure-cli
|
||||
sysmontask
|
||||
kind
|
||||
dracula-gtk-theme-full
|
||||
otf-droid-sans-mono-powerline-git
|
||||
azure-cli
|
||||
|
2
dependencies/pacman.txt
vendored
2
dependencies/pacman.txt
vendored
@ -88,7 +88,7 @@ docker
|
||||
docker-compose
|
||||
duf
|
||||
engrampa
|
||||
eog
|
||||
loupe
|
||||
feh
|
||||
firefox
|
||||
flameshot
|
||||
|
@ -201,7 +201,7 @@ bindsym $mod+Shift+g move container to workspace $workspace13
|
||||
############################################
|
||||
# Set the default font
|
||||
font pango:Ubuntu regular 12
|
||||
new_window 1pixel
|
||||
#new_window 1pixel
|
||||
hide_edge_borders both
|
||||
|
||||
# Window Colours
|
||||
@ -319,3 +319,6 @@ exec --no-startup-id seafile-applet
|
||||
exec --no-startup-id obsidian
|
||||
exec /usr/bin/compton
|
||||
exec /bin/bash ~/.config/i3/scripts/startup.sh
|
||||
|
||||
# don't blank the screen please :)
|
||||
exec --no-startup-id xset s off && xset -dpms && xset s noblank
|
||||
|
@ -38,12 +38,10 @@ case $1 in
|
||||
fi
|
||||
;;
|
||||
|
||||
"songwhip")
|
||||
"getLink")
|
||||
JSON=$(httpGet current)
|
||||
URL=$(echo "$JSON" | jq -r '.url')
|
||||
|
||||
WHIPPED_URL="https://songwhip.com$(curl -s -X POST 'https://songwhip.com/api/songwhip/create' -H 'Content-Type: application/json' --data-raw '{"url":"'"$URL"'","country":"NL"}' | jq -r '.data.item.url')"
|
||||
echo "$WHIPPED_URL"
|
||||
echo "$URL"
|
||||
;;
|
||||
"status")
|
||||
if httpGet current | grep "paused" >/dev/null; then
|
||||
|
15
install.sh
15
install.sh
@ -75,15 +75,15 @@ function install_fonts {
|
||||
cp -rf ./fonts/* /usr/local/share/fonts
|
||||
}
|
||||
|
||||
# install trizen, a aur helper
|
||||
# install trizen, an aur helper
|
||||
function install_trizen {
|
||||
git clone https://aur.archlinux.org/trizen.git
|
||||
pushd trizen || return
|
||||
mkdir /tmp/trizen-install
|
||||
git clone https://aur.archlinux.org/trizen.git /tmp/trizen-install
|
||||
pushd /tmp/trizen-install || return
|
||||
makepkg -si
|
||||
popd || return
|
||||
sudo rm -dRf trizen/
|
||||
sudo rm -dRf /tmp/trizen-install
|
||||
}
|
||||
|
||||
# Sets up time and date related stuff
|
||||
function setDateTimeConfig {
|
||||
systemctl enable ntpd
|
||||
@ -112,7 +112,7 @@ function install_config {
|
||||
linkDir "$PWD"/config/polybar ~/.config/polybar
|
||||
linkDir "$PWD"/config/poshthemes ~/.config/poshthemes
|
||||
linkDir "$PWD"/config/xfce4 ~/.config/xfce4/xfconf/xfce-perchannel-xml
|
||||
linkdir "$PWD"/config/rofi ~/.config/rofi
|
||||
linkDir "$PWD"/config/rofi ~/.config/rofi
|
||||
|
||||
# link user files
|
||||
ln -sf "$PWD"/bash/.aliases ~/
|
||||
@ -167,7 +167,10 @@ function install_dependencies {
|
||||
fileToList dependencies/pacman.txt | xargs sudo pacman --noconfirm -S
|
||||
|
||||
install_trizen
|
||||
set +e
|
||||
fileToList dependencies/aur.txt | xargs trizen -S --noconfirm
|
||||
set -e
|
||||
|
||||
fileToList dependencies/npm.txt | xargs sudo npm install -g
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user