first of all, you need super account, for example user postgres and password insecret-pass.
Use super account to connect postgres server and create database app-name and user app, then grant app to app-name.
docker run --rm \| #!/bin/bash | |
| operation=$1 | |
| workspace=$2 | |
| monitor_id=$(hyprctl activeworkspace | grep "monitorID" | awk '{print $2}') | |
| workspace_id=$(($monitor_id * 10 + $workspace)) | |
| echo "Final Operation: $operation to $workspace_id" | |
| if [[ $operation == "switch" ]]; then | 
| set -x | |
| function bw_download_and_import_gpg_key() { | |
| # 登录并解锁 Bitwarden,如果没有已存在的会话 | |
| if [[ -z "$BW_SESSION" ]]; then | |
| echo "Logging in to Bitwarden..." | |
| export BW_SESSION=$(bw unlock --raw) || { echo "Failed to unlock Bitwarden."; return 1; } | |
| fi | |
| local name=$1 | 
This is based on offically cli tool built-in subcommand calls migrate-storage.
Last updated March 28, 2021
There are now two ways to approach this:
This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions
More detail to visit my blog: https://icyleaf.com <-- Not publish yet.