diff --git a/.config/evremap/orchestrator b/.config/evremap/orchestrator index 4b64d25..9fbdd5e 100755 --- a/.config/evremap/orchestrator +++ b/.config/evremap/orchestrator @@ -392,7 +392,7 @@ class Orchestrator { this.#actFiles() if (this.#support.isValid) { - this.#support.update(this.#fileMap.values().toArray()); + this.#support.update([...this.#fileMap.values()]); } await new Promise(resolve => setTimeout(resolve, 1000)); @@ -439,7 +439,7 @@ class Orchestrator { } await directory.close(); - this.#fileMap.values() + [...this.#fileMap.values()] .filter(fileContainer => !availableFiles.includes(fileContainer.filepath)) .forEach(value => { this.#fileMap.set(value.filepath, { @@ -473,7 +473,7 @@ class Orchestrator { /** * @type {Device} */ - const selectedDevice = this.#devices.values().find((device) => device.name === deviceName) ?? { name: deviceName } + const selectedDevice = [...this.#devices.values()].find((device) => device.name === deviceName) ?? { name: deviceName } return { filepath: path, @@ -499,7 +499,7 @@ class Orchestrator { deviceMap.get(value.device.name).push(value); } - const duplicates = deviceMap.values().filter(devices => devices.some(device => device.state !== 'invalid') && devices.length > 1); + const duplicates = [...deviceMap.values()].filter(devices => devices.some(device => device.state !== 'invalid') && devices.length > 1); for (let duplicate of duplicates) { const container = duplicate[0]; this.#notifications.sendNotification( @@ -530,7 +530,7 @@ ${duplicate.map((file) => `- ${file.filepath}`).join('\n')}\` ); } - const previousDuplicates = deviceMap.values().filter(devices => devices[0].state === 'invalid' && devices.length < 2); + const previousDuplicates = [...deviceMap.values()].filter(devices => devices[0].state === 'invalid' && devices.length < 2); previousDuplicates.forEach((previousDuplicate) => { const duplicate = previousDuplicate[0]; this.#fileMap.set(duplicate.filepath, { @@ -539,7 +539,7 @@ ${duplicate.map((file) => `- ${file.filepath}`).join('\n')}\` }) this.#logger.log( - `==> Marking device ${duplicate.device} as valid, due to having only one file`, + `==> Marking device ${duplicate.device.name} as valid, due to having only one file`, 'ORCHESTRATOR', 'INFO' ); @@ -618,7 +618,7 @@ s const message = this.#notifications.sendReplaceableNotification({ summary: "Please wait...", - message: Orchestrator.NOTIFICATION_STARTING.replace('{device}', file.device), + message: Orchestrator.NOTIFICATION_STARTING.replace('{device}', file.device.name), urgency: "critical", }); this.#logger.log( @@ -709,15 +709,15 @@ s switch (reason) { default: case "GENERIC": - notificationMessage = Orchestrator.NOTIFICATION_GENERIC_PROCESS_STOP.replace('{device}', file.device) + notificationMessage = Orchestrator.NOTIFICATION_GENERIC_PROCESS_STOP.replace('{device}', file.device.name) logMessage = `Removing process for device '${file.device.name}' from file '${file.filepath}', due to unknown reason` break; case "REMOVED_FILE": - notificationMessage = Orchestrator.NOTIFICATION_MISSING_FILE_PROCESS_STOP.replace('{device}', file.device) + notificationMessage = Orchestrator.NOTIFICATION_MISSING_FILE_PROCESS_STOP.replace('{device}', file.device.name) logMessage = `Removing process for device '${file.device.name}' from file '${file.filepath}', due to a removed file` break; case "INVALID_FILE": - notificationMessage = Orchestrator.NOTIFICATION_INVALID_FILE_PROCESS_STOP.replace('{device}', file.device) + notificationMessage = Orchestrator.NOTIFICATION_INVALID_FILE_PROCESS_STOP.replace('{device}', file.device.name) logMessage = `Removing process for device '${file.device.name}' from file '${file.filepath}', due to a invalid file` break; diff --git a/.config/hypr/config/Keybinds.conf b/.config/hypr/config/Keybinds.conf index acef7fc..db40333 100644 --- a/.config/hypr/config/Keybinds.conf +++ b/.config/hypr/config/Keybinds.conf @@ -97,7 +97,7 @@ bind = $mainMod, N, exec, $scriptsDir/LockScreen.sh # screen lock bind = , Print, exec, $scriptsDir/ScreenShot.sh --area # screenshot (area) bind = , F12, exec, $scriptsDir/ScreenShot.sh --active # screenshot (active window only) -bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC notification panel +bind = $mainMod SHIFT, N, exec, $scriptsDir/Toolkit.sh # swayNC notification panel bind = $mainMod SHIFT, L, movecurrentworkspacetomonitor, r @@ -118,6 +118,7 @@ bind = $mainMod Shift, Return, exec, hyprdrop ghostty --identifier term_hyprdrop bind = $mainMod, T, exec, $files bind = $mainMod, R, focusurgentorlast +bind = $mainMod, P, exec, $scriptsDir/Bitwarden.sh # Master Layout Keybinds bind = $mainMod, A, layoutmsg,swapwithmaster master diff --git a/.config/hypr/config/Startup_Apps.conf b/.config/hypr/config/Startup_Apps.conf index 4c37e5f..24256ee 100644 --- a/.config/hypr/config/Startup_Apps.conf +++ b/.config/hypr/config/Startup_Apps.conf @@ -43,4 +43,4 @@ exec-once = hyprswitch init --show-title --size-factor 5.5 --workspaces-per-row exec-once = hyprsunset & exec-once = hyprshade auto exec-once = sleep 1 && darkman run & - +exec-once = bitwarden-daemon & diff --git a/.config/hypr/scripts/Bitwarden.sh b/.config/hypr/scripts/Bitwarden.sh new file mode 100755 index 0000000..2ff5cd9 --- /dev/null +++ b/.config/hypr/scripts/Bitwarden.sh @@ -0,0 +1,42 @@ +#!/bin/env sh + +declare -A actions +actions['Sync']="sync" +actions["Logout"]="logout" +actions["Lock"]="lock" + +printSelection() { + echo "$1" + for key in "${!fruits[@]}" + do + echo "Action: $key" + done +} + +formattedIDs=$(echo "format:[NAME] ([USERNAME])" | nc -U /tmp/bitwarden-daemon.sock) + +selectionList=$(echo "$formattedIDs" | jq 'keys | map("\(.)\n") | add' -r) +actionSelectionList=$(printf "Actions: %s\n" ${!actions[@]}) +selection=$(printf "%s\n" "$selectionList" "$actionSelectionList" | anyrun --plugins libstdin.so) + +echo "$selection" + +if [[ $selection == '' ]]; then + exit 0 +fi + +if [[ $selection == Actions:* ]]; then + actionKey="${selection:9}" + action="${actions[$actionKey]}" + echo "Performing: $action" + + echo "$action:" | nc -U /tmp/bitwarden-daemon.sock +else + id=$(echo "$formattedIDs" | jq ".[\"${selection}\"]" -r) + echo "lookupPassword:$id" | nc -U /tmp/bitwarden-daemon.sock | wl-copy + + notify-send "Password copied" "Copied password for '$selection' to clipboard." +fi + +exit 0; + diff --git a/.config/hypr/scripts/Toolkit.sh b/.config/hypr/scripts/Toolkit.sh new file mode 100755 index 0000000..51f3cdd --- /dev/null +++ b/.config/hypr/scripts/Toolkit.sh @@ -0,0 +1,15 @@ +#!/bin/env sh + +SCRIPTS_DIR="$HOME/.config/hypr/scripts" + +declare -A scripts +scripts["Shutdown"]="systemctl poweroff" +scripts["Reboot"]="systemctl reboot" +scripts["Logout"]="logout terminate-user $USER" +scripts["Lock"]="$SCRIPTS_DIR/LockScreen.sh" +scripts["Notification Center (SwayNC)"]="swaync-client -t -sw" + +selected=$(printf "%s\n" "${!scripts[@]}" | anyrun --plugins libstdin.so) + +command="${scripts[$selected]}" +$command diff --git a/.config/theming/applications/anyrun/entry.scss b/.config/theming/applications/anyrun/entry.scss index d1779c4..5c2e862 100644 --- a/.config/theming/applications/anyrun/entry.scss +++ b/.config/theming/applications/anyrun/entry.scss @@ -20,12 +20,11 @@ entry { padding: $input-padding; border: none; box-shadow: none; - color: $foreground + color: $foreground; } list#main { background-color: rgba(0, 0, 0, 0); - //padding: 0.5rem; } list#plugin { diff --git a/.config/yadm/bootstrap.v2/applications/01-Dependencies.sh b/.config/yadm/bootstrap.v2/applications/01-Dependencies.sh index 0455b4e..76888d2 100755 --- a/.config/yadm/bootstrap.v2/applications/01-Dependencies.sh +++ b/.config/yadm/bootstrap.v2/applications/01-Dependencies.sh @@ -6,4 +6,5 @@ addApplications neovim \ btop \ zoxide fzf \ wifi-qr neovim \ - brightnessctl + brightnessctl \ + nodejs-lts-iron diff --git a/.config/yadm/bootstrap.v2/applications/40-Bitwarden.sh b/.config/yadm/bootstrap.v2/applications/40-Bitwarden.sh new file mode 100755 index 0000000..bcd272c --- /dev/null +++ b/.config/yadm/bootstrap.v2/applications/40-Bitwarden.sh @@ -0,0 +1,11 @@ +#!/bin/env sh + +addApplications bitwarden-cli zenity + +addGitInstall "bitwarden-daemon" "ssh://git@git.php.fail:2222/neintonine/bitwarden-daemon.git" setupBitwardenDaemon + +setupBitwardenDaemon() { + npm install + npm run build + sudo npm install -g . +}