-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolor
More file actions
executable file
·37 lines (35 loc) · 1.01 KB
/
Copy pathcolor
File metadata and controls
executable file
·37 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
# ______ __
# / ____/___ / /___ _____
# / / / __ \/ / __ \/ ___/
# / /___/ /_/ / / /_/ / /
# \____/\____/_/\____/_/
# Author: Ayush Jayaswal
# Website: ayusjayaswal.github.io
# Github: github.com/ayusjayaswal/scripts/blob/main/color
#
declare -A colpick
colpick[Black]="#282828"
colpick[Grey]="#928374"
colpick[Dark Red]="#cc241d"
colpick[Light Red]="#fb4934"
colpick[Dark Green]="#98971a"
colpick[Light Green]="#b8bb26"
colpick[Dark Aqua]="#689d6a"
colpick[Light Aqua]="#8ec07c"
colpick[Lemon Yellow]="#fabd2f"
colpick[Yellow Ochre]="#b57614"
colpick[Blue]="#488588"
colpick[Magenta]="#b16286"
colpick[Sky Blue]="#83a598"
colpick[White]="#f9f5d7"
colpick[Orange]="#fe8019"
colpick[Purple]="#d3869b"
setcol=$(printf '%s\n' "${!colpick[@]}" | sort | dmenu -i -l 30)
if [ "$setcol" ]; then
chosen=$(printf '%s\n' "${colpick["${setcol}"]}")
printf "$chosen" | xclip -selection clipboard
notify-send "Color code '$chosen' copied to clipboard." &
else
echo "Program Terminated" && exit 0
fi