dotfiles/.config/scripts/rofi-menus/clipboard-manager.sh
2026-04-25 16:39:11 +05:30

21 lines
1 KiB
Bash
Executable file

#!/bin/bash
# ┏━━━┳━━┳━┓┏━┳━━━┳┓╋╋┏━━┳━┓┏━┓
# ┗┓┏┓┣┫┣┫┃┗┛┃┃┏━━┫┃╋╋┗┫┣┻┓┗┛┏┛
# ╋┃┃┃┃┃┃┃┏┓┏┓┃┗━━┫┃╋╋╋┃┃╋┗┓┏┛
# ╋┃┃┃┃┃┃┃┃┃┃┃┃┏━━┫┃╋┏┓┃┃╋┏┛┗┓
# ┏┛┗┛┣┫┣┫┃┃┃┃┃┃╋╋┃┗━┛┣┫┣┳┛┏┓┗┓
# ┗━━━┻━━┻┛┗┛┗┻┛╋╋┗━━━┻━━┻━┛┗━┛
# The program was created by DIMFLIX
# Github: https://github.com/DIMFLIX-OFFICIAL
session_type=$XDG_SESSION_TYPE
if [ "$session_type" == "wayland" ]; then
cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy
elif [ "$session_type" == "x11" ]; then
cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | xclip -selection clipboard
else
echo "Тип сеанса не определен или не является Wayland/X11."
fi