mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add flameshot auth
This commit is contained in:
parent
162061ddd3
commit
6ed9e76165
7 changed files with 82 additions and 10 deletions
|
|
@ -1,7 +1,21 @@
|
|||
{ pkgs, lib, config, osConfig, ... }: {
|
||||
options.mods.i3.enable = lib.mkEnableOption "enables i3";
|
||||
{ pkgs, lib, config, osConfig, ... }:
|
||||
let
|
||||
fsss = with pkgs;
|
||||
writeShellApplication {
|
||||
name = "fsss";
|
||||
runtimeInputs = [ flameshot curl xsel ];
|
||||
text = ''
|
||||
flameshot gui -r -s > /tmp/ss.png;if [ ! -s /tmp/ss.png ]; then
|
||||
exit 1
|
||||
fi
|
||||
AUTH=$(cat ${config.sops.secrets.zipline-auth.path})
|
||||
curl -H "authorization: $AUTH" https://share.muon.host/api/upload -F file=@/tmp/ss.png -H "Content-Type: multipart/form-data" -H "Format: date" -H "Image-Compression-Percent: 90" -H "No-JSON: true" | tr -d '\n' | xsel -ib;
|
||||
'';
|
||||
};
|
||||
in with lib; {
|
||||
options.mods.i3.enable = mkEnableOption "enables i3";
|
||||
|
||||
config = lib.mkIf config.mods.i3.enable {
|
||||
config = mkIf config.mods.i3.enable {
|
||||
services.unclutter.enable = true;
|
||||
programs.rofi.enable = true;
|
||||
|
||||
|
|
@ -68,7 +82,7 @@
|
|||
# -> keys: [string] -> values: [string]
|
||||
# -> keybindings: attrSet { string -> string }
|
||||
zipBinds = comb: action: keys: values:
|
||||
(builtins.listToAttrs (lib.zipListsWith (k: v: {
|
||||
(builtins.listToAttrs (zipListsWith (k: v: {
|
||||
name = "${modifier}${comb}${k}";
|
||||
value = "${action} ${v}";
|
||||
}) keys values));
|
||||
|
|
@ -76,9 +90,9 @@
|
|||
moveKeys = [ "h" "j" "k" "l" ];
|
||||
moveDirs = [ "left" "down" "up" "right" ];
|
||||
|
||||
workspKeys = genSpaces (x: lib.mod (x + 1) wsAmount);
|
||||
workspKeys = genSpaces (x: mod (x + 1) wsAmount);
|
||||
|
||||
in lib.mkOptionDefault ((zipBinds "+" "focus" moveKeys moveDirs)
|
||||
in mkOptionDefault ((zipBinds "+" "focus" moveKeys moveDirs)
|
||||
// (zipBinds "+Shift+" "move" moveKeys moveDirs)
|
||||
// (zipBinds "+" "workspace number" workspKeys workspaces)
|
||||
// (zipBinds "+Shift+" "move container to workspace number" workspKeys
|
||||
|
|
@ -87,6 +101,7 @@
|
|||
"exec --no-startup-id pactl set-sink-volume 0 +2%";
|
||||
"XF86AudioLowerVolume" =
|
||||
"exec --no-startup-id pactl set-sink-volume 0 -2%";
|
||||
"Print" = "exec ${getExe fsss}";
|
||||
});
|
||||
|
||||
bars = let
|
||||
|
|
@ -96,7 +111,7 @@
|
|||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
statusCommand = "${lib.getExe pkgs.i3status-rust} ${status_conf}";
|
||||
statusCommand = "${getExe pkgs.i3status-rust} ${status_conf}";
|
||||
command = "${pkgs.i3}/bin/i3bar";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = true;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ in with lib; {
|
|||
programs.zsh.sessionVariables.BROWSER = "librewolf";
|
||||
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
settings = {
|
||||
General = {
|
||||
disabledTrayIcon = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue