Screenshot : Use swappy for screenshot selection.

This commit is contained in:
Dmitry Voronin 2024-09-14 04:11:08 +03:00
parent 673a7ff83c
commit 6a77918b32
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
5 changed files with 59 additions and 38 deletions

View file

@ -12,13 +12,14 @@
mangohud = import ./mangohud args;
nvim = import ./nvim args;
ssh = import ./ssh args;
swappy = import ./swappy args;
sway = import ./sway args;
tmux = import ./tmux args;
waybar = import ./waybar args;
yazi = import ./yazi args;
in {
".config/MangoHud/MangoHud.conf".text = mangohud.config;
".config/MangoHud/presets.conf".text = mangohud.presets;
".config/MangoHud/MangoHud.conf".source = mangohud.config;
".config/MangoHud/presets.conf".source = mangohud.presets;
".config/btop/btop.conf".text = btop.text;
".config/foot/foot.ini".source = foot.file;
".config/fuzzel/fuzzel.ini".source = fuzzel.file;
@ -27,6 +28,7 @@ in {
".config/keyd/app.conf".text = keyd.text;
".config/mako/config".source = mako.file;
".config/nvim/init.vim".text = nvim.text;
".config/swappy/config".source = swappy.config;
".config/sway/config".text = sway.text;
".config/tmux/tmux.conf".text = tmux.text;
".config/waybar/config".source = waybar.config;

View file

@ -1,39 +1,44 @@
{ util, ... }: {
config = util.trimTabs ''
blacklist=example
fps_sampling_period=1000
frame_timing=0
preset=0,1,2
toggle_preset=F1
toggle_logging=F2
'';
{ pkgs, ... }: {
config = (pkgs.formats.iniWithGlobalSection {}).generate "MangoConfig" {
globalSection = {
blacklist = "example";
fps_sampling_period = 1000;
frame_timing = 0;
preset = "0,1,2";
toggle_logging = "F2";
toggle_preset = "F1";
};
};
presets = util.trimTabs ''
[preset 0]
no_display=1
presets = (pkgs.formats.ini {}).generate "MangoPresets" {
"preset 0" = {
no_display = 1;
};
[preset 1]
alpha=1.0
arch=0
background_alpha=0.5
battery=1
battery_time=1
benchmark_percentiles=0
cpu_temp=1
device_battery=gamepad,mouse
font_size=12
fps_sampling_period=1000
gpu_junction_temp=0
gpu_mem_temp=1
gpu_temp=1
hud_no_margin=1
ram=1
swap=1
throttling_status=1
time=1
vram=1
"preset 1" = {
alpha = 1.0;
arch = 0;
background_alpha = 0.5;
battery = 1;
battery_time = 1;
benchmark_percentiles = 0;
cpu_temp = 1;
device_battery = "gamepad,mouse";
font_size = 12;
fps_sampling_period = 1000;
gpu_junction_temp = 0;
gpu_mem_temp = 1;
gpu_temp = 1;
hud_no_margin = 1;
ram = 1;
swap = 1;
throttling_status = 1;
time = 1;
vram = 1;
};
[preset 2]
full=1
'';
"preset 2" = {
full = 1;
};
};
}

View file

@ -0,0 +1,13 @@
{ pkgs, config, ... }: {
config = (pkgs.formats.ini {}).generate "SwappyConfig" {
Default = {
early_exit = true;
fill_shape = false;
line_size = 4;
paint_mode = "arrow";
show_panel = true;
text_font = config.style.font.serif.name;
text_size = config.style.font.size.popup;
};
};
}

View file

@ -26,6 +26,7 @@ in {
grim \
-g "''${scrSelection}" - \
| swappy -f - -o - \
| tee "''${scrFile}" \
| wl-copy -t image/png
'';

View file

@ -61,7 +61,7 @@
adwaita-icon-theme # GTK icons.
foot # Terminal emulator.
fuzzel # Application launcher.
grim slurp wf-recorder # Screenshot.
grim slurp wf-recorder swappy # Screenshot.
mako # Notification system.
networkmanagerapplet # Internet configuration.
pamixer pavucontrol pulseaudio # Audio.