From 22f84522b2c0a50a38de3323fcf7edf9fa702723 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Tue, 6 Aug 2024 00:32:35 -0400 Subject: wayland color picker --- .config/x11/xinitrc | 17 ----------------- .local/bin/colorhandler | 11 ----------- .local/bin/colorpicker | 11 +++++++++++ 3 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 .config/x11/xinitrc delete mode 100755 .local/bin/colorhandler create mode 100755 .local/bin/colorpicker diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc deleted file mode 100644 index 5e0df62..0000000 --- a/.config/x11/xinitrc +++ /dev/null @@ -1,17 +0,0 @@ -$XDG_CONFIG_HOME/startup/$(hostname) & -sxhkd & -dunst & -unclutter & -picom -b & -echo us >"$HOME/.cache/layout" -xrdb -load "$HOME/.Xresources" -flashfocus -n 30 -t 150 -l never -o 0.75 -v ERROR & -dwmblocks & -remaps & -while true; do - # Start dwm (loop restarts it if it crashes) - # dwm >/dev/null - # Trying to launch dwm with dbus-launch - dbus-launch --exit-with-session dwm -done -# vim:filetype=sh diff --git a/.local/bin/colorhandler b/.local/bin/colorhandler deleted file mode 100755 index 3f0f18f..0000000 --- a/.local/bin/colorhandler +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -[ -z "$1" ] && col=$(colorpicker --short --one-shot) || - col="$1" - - -sed "s/fill=.*>/fill=\"$col\">/g" $HOME/.local/share/circle.svg > /tmp/circle.svg - -echo "$col" | xsel -b - -notify-send -i "/tmp/circle.svg" -a "Colorpicker" "$col was successfully copied to your clipboard." diff --git a/.local/bin/colorpicker b/.local/bin/colorpicker new file mode 100755 index 0000000..5e37201 --- /dev/null +++ b/.local/bin/colorpicker @@ -0,0 +1,11 @@ +#!/bin/sh + +[ -z "$1" ] && col=$(hyprpicker -an ) || + col="$1" + + +sed "s/fill=.*>/fill=\"$col\">/g" $HOME/.local/share/circle.svg > /tmp/circle.svg + +echo "$col" | xsel -b + +notify-send -i "/tmp/circle.svg" -a "Colorpicker" "$col was successfully copied to your clipboard." -- cgit v1.2.3