[flameshot] feat: flameshot > grimblast hacky script
This commit is contained in:
parent
021a05bf0e
commit
0b26225806
@ -1,61 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# commands
|
|
||||||
wofi_command="wofi -l 5"
|
|
||||||
grimblast="grimblast --notify"
|
|
||||||
satty="satty --filename - --fullscreen --output-filename /home/simon/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png"
|
|
||||||
|
|
||||||
|
|
||||||
# buttons
|
|
||||||
area="🖥️ Capture area"
|
|
||||||
area_5="🖥️ Capture area in 5 seconds"
|
|
||||||
screen="🖥️ Capture whole screen"
|
|
||||||
screen_5="🖥️ Capture whole screen in 10 seconds"
|
|
||||||
window="🖥️ Capture active window"
|
|
||||||
|
|
||||||
|
|
||||||
# take shots
|
|
||||||
screenshot_area() {
|
|
||||||
$grimblast save area - | $satty
|
|
||||||
}
|
|
||||||
|
|
||||||
screenshot_area_5() {
|
|
||||||
sleep 5
|
|
||||||
$grimblast save area - | $satty
|
|
||||||
}
|
|
||||||
|
|
||||||
screenshot_full() {
|
|
||||||
$grimblast save screen - | $satty
|
|
||||||
}
|
|
||||||
|
|
||||||
screenshot_full_5() {
|
|
||||||
sleep 5
|
|
||||||
$grimblast save screen - | $satty
|
|
||||||
}
|
|
||||||
|
|
||||||
screenshot_window() {
|
|
||||||
$grimblast save active - | $satty
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# start wofi
|
|
||||||
options="$area\n$area_5\n$screen\n$screen_5\n$window"
|
|
||||||
chosen="$(echo -e "$options" | $wofi_command -p 'Say cheese ...' -dmenu --no-action --width=400 --height=302 -selected-row 0 --style=/home/simon/.dotfiles/apps/wofi/style.css)"
|
|
||||||
sleep 1
|
|
||||||
case $chosen in
|
|
||||||
$area)
|
|
||||||
screenshot_area
|
|
||||||
;;
|
|
||||||
$area_5)
|
|
||||||
screenshot_area_5
|
|
||||||
;;
|
|
||||||
$screen)
|
|
||||||
screenshot_full
|
|
||||||
;;
|
|
||||||
$screen_5)
|
|
||||||
screenshot_full_5
|
|
||||||
;;
|
|
||||||
$window)
|
|
||||||
screenshot_window
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -5,6 +5,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./alacritty
|
./alacritty
|
||||||
./clipse
|
./clipse
|
||||||
|
./flameshot
|
||||||
./git
|
./git
|
||||||
./hyprland
|
./hyprland
|
||||||
./mako
|
./mako
|
||||||
|
1
nix/home/flameshot/default.nix
Normal file
1
nix/home/flameshot/default.nix
Normal file
@ -0,0 +1 @@
|
|||||||
|
{ ... }: { imports = [ ./flameshot.nix ]; }
|
19
nix/home/flameshot/flameshot.nix
Normal file
19
nix/home/flameshot/flameshot.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
# include flameshot configs
|
||||||
|
home.file.".config/flameshot/flameshot.ini".text = ''
|
||||||
|
|
||||||
|
[General]
|
||||||
|
contrastOpacity=188
|
||||||
|
contrastUiColor=#528bff
|
||||||
|
checkForUpdates=false
|
||||||
|
drawFontSize=8
|
||||||
|
drawThickness=3
|
||||||
|
uiColor=#043a8b
|
||||||
|
savePath=/home/simon/Pictures/Screenshots/
|
||||||
|
showHelp=false
|
||||||
|
showStartupLaunchMessage=false
|
||||||
|
|
||||||
|
'';
|
||||||
|
}
|
@ -27,8 +27,7 @@
|
|||||||
"$mainMod, N, exec, alacritty --class nmtui --command ~/.dotfiles/apps/hyprland/nmtui.sh"
|
"$mainMod, N, exec, alacritty --class nmtui --command ~/.dotfiles/apps/hyprland/nmtui.sh"
|
||||||
"$mainMod, P, exec, ~/.dotfiles/apps/hyprland/hypridle.sh toggle"
|
"$mainMod, P, exec, ~/.dotfiles/apps/hyprland/hypridle.sh toggle"
|
||||||
"$mainMod, Q, killactive"
|
"$mainMod, Q, killactive"
|
||||||
"$mainMod, S, exec, ~/.dotfiles/apps/screenshot/screenshot.sh area"
|
"$mainMod, S, exec, XDG_CURRENT_DESKTOP=sway flameshot gui -c -p /home/simon/Pictures/Screenshots"
|
||||||
"ALT SHIFT, S, exec, ~/.dotfiles/apps/screenshot/screenshot.sh screen"
|
|
||||||
"$mainMod, T, exec, alacritty --class nostt --command nostt"
|
"$mainMod, T, exec, alacritty --class nostt --command nostt"
|
||||||
"$mainMod, V, togglefloating"
|
"$mainMod, V, togglefloating"
|
||||||
|
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
# nextcloud desktop
|
# nextcloud desktop
|
||||||
"~/.dotfiles/apps/hyprland/startup/nextcloud_desktop.sh"
|
"~/.dotfiles/apps/hyprland/startup/nextcloud_desktop.sh"
|
||||||
|
|
||||||
|
# flameshot
|
||||||
|
"XDG_CURRENT_DESKTOP=sway flameshot"
|
||||||
|
|
||||||
# start default apps
|
# start default apps
|
||||||
"[workspace 1 silent] bitwarden"
|
"[workspace 1 silent] bitwarden"
|
||||||
"[workspace 2 silent] firefox"
|
"[workspace 2 silent] firefox"
|
||||||
|
@ -37,6 +37,10 @@
|
|||||||
"size 1000 800, class:(clipse)"
|
"size 1000 800, class:(clipse)"
|
||||||
"move center, class:(clipse)"
|
"move center, class:(clipse)"
|
||||||
|
|
||||||
|
# flameshot
|
||||||
|
"float, class:^(flameshot)$"
|
||||||
|
"noanim, class:^(flameshot)$"
|
||||||
|
|
||||||
# save as
|
# save as
|
||||||
"float, title:(Save As)"
|
"float, title:(Save As)"
|
||||||
"size 1000 800, title:(Save As)"
|
"size 1000 800, title:(Save As)"
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
# hyprland
|
# hyprland
|
||||||
adwaita-qt
|
adwaita-qt
|
||||||
brightnessctl
|
brightnessctl
|
||||||
|
flameshot
|
||||||
grim
|
grim
|
||||||
grimblast
|
grimblast
|
||||||
hyprlock
|
hyprlock
|
||||||
|
Reference in New Issue
Block a user