oops thats a lot of stuff

This commit is contained in:
Mars 2024-05-16 02:40:39 -04:00
parent 8e44992e00
commit 87e6a239d5
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
23 changed files with 2012 additions and 390 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="#cdd6f4" viewBox="0 0 256 256"><path d="M208,48V216a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H96a39.83,39.83,0,0,0-8,24v8h80V64a39.83,39.83,0,0,0-8-24h40A8,8,0,0,1,208,48Z" opacity="0.2"></path><path d="M200,32H163.74a47.92,47.92,0,0,0-71.48,0H56A16,16,0,0,0,40,48V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm-72,0a32,32,0,0,1,32,32H96A32,32,0,0,1,128,32Zm72,184H56V48H82.75A47.93,47.93,0,0,0,80,64v8a8,8,0,0,0,8,8h80a8,8,0,0,0,8-8V64a47.93,47.93,0,0,0-2.75-16H200Z"></path></svg>

After

Width:  |  Height:  |  Size: 578 B

View file

@ -0,0 +1,80 @@
{pkgs, ...}:
with pkgs; {
home.packages = [
(writeScriptBin "screenshot" ''
notify_user() {
${pulseaudio}/bin/paplay ${sound-theme-freedesktop}/share/sounds/freedesktop/stereo/screen-capture.oga 2>/dev/null &
${libnotify}/bin/notify-send \
-a Clipboard \
-i ${builtins.toString ./clipboard.svg} \
-u low \
-r 699 "Clipboard" "Screenshot saved on clipboard"
}
screen() {
${maim}/bin/maim -u -f png | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
notify_user
}
window() {
${maim}/bin/maim -u -f png -i "$(${xdotool}/bin/xdotool getactivewindow)" | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
notify_user
}
area() {
${maim}/bin/maim -u -f png -s -b 2 -c 0.35,0.55,0.85,0.25 -l | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
notify_user
}
menu() {
screen="󰍹"
area="󰒉"
window=""
chosen="$(printf "%s\n%s\n%s\n%s\n" "$screen" "$area" "$window" | rofi -theme ${builtins.toString ./screenshot.rasi} -p 'Take Screenshot' -dmenu -selected-row 0 -theme-str 'listview {lines: 3;}')"
case $chosen in
"$screen")
screen
;;
"$area")
area
;;
"$window")
window
;;
esac
}
docs() {
echo "
Usage: screenshot [Options]
--help - Prints this message
Options:
--screen - Take screenshot of the screen
--window - Take screenshot of the focused window
--area - Take screenshot of the selected area
--menu - Opens a gui selector
"
}
case $1 in
--screen)
screen
;;
--window)
window
;;
--area)
area
;;
--menu)
menu
;;
--help | *)
docs
;;
esac
'')
];
}

View file

@ -0,0 +1,67 @@
* {
font: "Maple Mono NF 12";
accent: #a6e3a1;
base: #1e1e2e;
mantle: #181825;
text: #cdd6f4;
}
configuration {
location: 4;
show-icons: false;
click-to-exit: true;
}
window {
transparency: "real";
background-color: @base;
text-color: @text;
border: 2px solid;
border-color: @mantle;
border-radius: 12px;
width: 100px;
x-offset: -10;
}
mainbox {
background-color: @base;
spacing: 10px;
padding: 20px;
children: [ listview ];
}
listview {
background-color: @mantle;
border-radius: 100%;
columns: 1;
cycle: true;
dynamic: true;
fixed-height: true;
fixed-columns: true;
layout: vertical;
}
element {
background-color: transparent;
text-color: @text;
orientation: horizontal;
border-radius: 100%;
padding: 14px;
cursor: pointer;
}
element-text {
background-color: inherit;
text-color: inherit;
font: "Phosphor 16";
horizontal-align: 0.25;
vertical-align: 0.5;
margin: 0px;
cursor: inherit;
}
element selected.normal {
background-color: @accent;
text-color: @mantle;
}