added permaclip and made macros more reproducable n stuff
This commit is contained in:
parent
bd39e7bd6f
commit
88d91caaac
5 changed files with 50 additions and 1 deletions
|
@ -5,6 +5,7 @@ let
|
||||||
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../scripts/desktop/window-screenshot.sh);
|
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../scripts/desktop/window-screenshot.sh);
|
||||||
# desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
|
# desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
|
||||||
desktop-ctl = import ../scripts/desktop/desktopctl.nix { pkgs = pkgs; };
|
desktop-ctl = import ../scripts/desktop/desktopctl.nix { pkgs = pkgs; };
|
||||||
|
permaclip = import ../scripts/desktop/permaclip { pkgs = pkgs; };
|
||||||
em-record = pkgs.writeShellScriptBin "em-record.sh" (builtins.readFile ../scripts/desktop/macros/record.sh);
|
em-record = pkgs.writeShellScriptBin "em-record.sh" (builtins.readFile ../scripts/desktop/macros/record.sh);
|
||||||
em-play = pkgs.writeShellScriptBin "em-play.sh" (builtins.readFile ../scripts/desktop/macros/play.sh);
|
em-play = pkgs.writeShellScriptBin "em-play.sh" (builtins.readFile ../scripts/desktop/macros/play.sh);
|
||||||
em-play-loop = pkgs.writeShellScriptBin "em-play-loop.sh" (builtins.readFile ../scripts/desktop/macros/play-loop.sh);
|
em-play-loop = pkgs.writeShellScriptBin "em-play-loop.sh" (builtins.readFile ../scripts/desktop/macros/play-loop.sh);
|
||||||
|
@ -28,6 +29,7 @@ in with lib; {
|
||||||
libqalculate # needed by menu-qalc
|
libqalculate # needed by menu-qalc
|
||||||
# custom scripts
|
# custom scripts
|
||||||
window-screenshot desktop-ctl em-record em-play em-play-loop ocr-screenshot menu-qalc
|
window-screenshot desktop-ctl em-record em-play em-play-loop ocr-screenshot menu-qalc
|
||||||
|
permaclip
|
||||||
|
|
||||||
# themes
|
# themes
|
||||||
gruvbox-dark-gtk gruvbox-dark-icons-gtk
|
gruvbox-dark-gtk gruvbox-dark-icons-gtk
|
||||||
|
@ -103,7 +105,7 @@ in with lib; {
|
||||||
"${mod}+Shift+space" = "floating toggle";
|
"${mod}+Shift+space" = "floating toggle";
|
||||||
# focus parents/children
|
# focus parents/children
|
||||||
"${mod}+Shift+a" = "focus parent";
|
"${mod}+Shift+a" = "focus parent";
|
||||||
"${mod}+c" = "focus child";
|
"${mod}+Shift+c" = "focus child";
|
||||||
# screenshot
|
# screenshot
|
||||||
"${mod}+w" = "exec window-screenshot.sh";
|
"${mod}+w" = "exec window-screenshot.sh";
|
||||||
"${mod}+s" = "exec flameshot gui -c -p $HOME/Pictures/screenshots";
|
"${mod}+s" = "exec flameshot gui -c -p $HOME/Pictures/screenshots";
|
||||||
|
@ -135,6 +137,10 @@ in with lib; {
|
||||||
"${mod}+q" = "exec em-record.sh";
|
"${mod}+q" = "exec em-record.sh";
|
||||||
"${mod}+p" = "exec em-play.sh";
|
"${mod}+p" = "exec em-play.sh";
|
||||||
"${mod}+Shift+p" = "exec em-play-loop.sh";
|
"${mod}+Shift+p" = "exec em-play-loop.sh";
|
||||||
|
|
||||||
|
# permaclip
|
||||||
|
"${mod}+c" = "rofi -show permaclip -modes \"permaclip:${permaclip.outPath}/bin/pc-set\" -theme gruvbox-dark";
|
||||||
|
"${mod}+v" = "rofi -show permaclip -modes \"permaclip:${permaclip.outPath}/bin/pc-get\" -theme gruvbox-dark";
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# Visuals {{{
|
# Visuals {{{
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
mkdir -p $HOME/xmacros
|
||||||
|
|
||||||
register=$(ls $HOME/xmacros | rofi -dmenu)
|
register=$(ls $HOME/xmacros | rofi -dmenu)
|
||||||
count=$(echo "2;5;10;20;50;100" | rofi -dmenu -sep ";" -l 5)
|
count=$(echo "2;5;10;20;50;100" | rofi -dmenu -sep ";" -l 5)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
mkdir -p $HOME/xmacros
|
||||||
|
|
||||||
register=$(ls $HOME/xmacros | rofi -dmenu)
|
register=$(ls $HOME/xmacros | rofi -dmenu)
|
||||||
|
|
||||||
xmacroplay "$DISPLAY" < $HOME/xmacros/$register
|
xmacroplay "$DISPLAY" < $HOME/xmacros/$register
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
mkdir -p $HOME/xmacros
|
||||||
|
|
||||||
register=$(ls $HOME/xmacros | rofi -dmenu)
|
register=$(ls $HOME/xmacros | rofi -dmenu)
|
||||||
count=$(echo "2;5;10;20;50;100" | rofi -dmenu -sep ";" -l 5)
|
count=$(echo "2;5;10;20;50;100" | rofi -dmenu -sep ";" -l 5)
|
||||||
|
|
||||||
|
|
37
scripts/desktop/permaclip/default.nix
Normal file
37
scripts/desktop/permaclip/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
pkgs.writeShellScriptBin "pc-set" ''
|
||||||
|
# create ~/permaclip if it doesnt exist already
|
||||||
|
mkdir -p $HOME/permaclip
|
||||||
|
|
||||||
|
tr_name=$(echo $@ | xargs)
|
||||||
|
if [ x"$tr_name" != x"" ]; then
|
||||||
|
tr_name="''${tr_name% (*}"
|
||||||
|
clipdata=$(xclip -selection c -o)
|
||||||
|
echo $clipdata > $HOME/permaclip/$tr_name
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "\0markup-rows\x1ftrue"
|
||||||
|
|
||||||
|
for reg in $(ls ~/permaclip); do
|
||||||
|
content=$(cat ~/permaclip/$reg)
|
||||||
|
echo -e "$reg (<i>''${content:0:30}</i>)"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
pkgs.writeShellScriptBin "pc-get" ''
|
||||||
|
# create ~/permaclip if it doesnt exist already
|
||||||
|
mkdir -p $HOME/permaclip
|
||||||
|
|
||||||
|
tr_name=$(echo ''${@% (*} | xargs)
|
||||||
|
if [ x"$tr_name" != x"" ]; then
|
||||||
|
xclip -selection c -i $HOME/permaclip/''${tr_name% (*} &> /dev/null
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "\0markup-rows\x1ftrue"
|
||||||
|
|
||||||
|
for reg in $(ls ~/permaclip); do
|
||||||
|
content=$(cat ~/permaclip/$reg)
|
||||||
|
echo -e "$reg (<i>''${content:0:50}...</i>)"
|
||||||
|
done
|
||||||
|
'';
|
Loading…
Reference in a new issue