-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
home-desktop: move script and wallpaper to _pkgs
- Loading branch information
Showing
8 changed files
with
116 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ lib | ||
, pkgs | ||
}: | ||
with pkgs; | ||
pkgs.writeShellScriptBin "macshot" '' | ||
file=/tmp/xxx.png | ||
${lib.getExe sway-contrib.grimshot} --notify save area /tmp/src.png >> /dev/null 2>&1 | ||
${imagemagick}/bin/convert /tmp/src.png \ | ||
\( +clone -alpha extract \ | ||
-draw 'fill black polygon 0,0 0,8 8,0 fill white circle 8,8 8,0' \ | ||
\( +clone -flip \) -compose Multiply -composite \ | ||
\( +clone -flop \) -compose Multiply -composite \ | ||
\) -alpha off -compose CopyOpacity -composite /tmp/output.png | ||
${imagemagick}/bin/convert /tmp/output.png -bordercolor none -border 20 \ | ||
\( +clone -background black -shadow 80x8+15+15 \) \ | ||
+swap -background transparent -layers merge +repage $file | ||
${wl-clipboard}/bin/wl-copy -t image/png < $file | ||
${libnotify}/bin/notify-send "macshot copied" | ||
rm /tmp/src.png /tmp/output.png | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ lib | ||
, pkgs | ||
}: | ||
pkgs.writeShellScriptBin "powermenu" '' | ||
options="shutdown\nreboot\nsuspend" | ||
selection="$(${pkgs.coreutils}/bin/echo -e $options | \ | ||
${lib.getExe pkgs.bemenu} -i -l 4 -c -W 0.3)" | ||
case $selection in | ||
shutdown) ${pkgs.systemd}/bin/systemctl poweroff | ||
exit 0 | ||
;; | ||
reboot) ${pkgs.systemd}/bin/systemctl reboot | ||
exit 0 | ||
;; | ||
suspend) ${pkgs.systemd}/bin/systemctl suspend | ||
exit 0 | ||
;; | ||
esac | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ pkgs }: | ||
pkgs.writeShellScriptBin "record-status" '' | ||
pid=`${pkgs.procps}/bin/pgrep wf-recorder` | ||
status=$? | ||
if [ $status != 0 ] | ||
then | ||
echo ''; | ||
else | ||
echo ''; | ||
fi; | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ lib | ||
, pkgs | ||
}: | ||
pkgs.writeShellScriptBin "screen-recorder-toggle" '' | ||
pid=`${pkgs.procps}/bin/pgrep wf-recorder` | ||
status=$? | ||
if [ $status != 0 ] | ||
then | ||
${lib.getExe pkgs.wf-recorder} -g "$(${lib.getExe pkgs.slurp})" -f $HOME/Videos/record/$(date +'recording_%Y-%m-%d-%H%M%S.mp4'); | ||
else | ||
${pkgs.procps}/bin/pkill --signal SIGINT wf-recorder | ||
fi; | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ lib, pkgs }: | ||
{ | ||
door = pkgs.fetchurl { | ||
url = "https://pastb.in/door.jpg"; | ||
name = "door.jpg"; | ||
hash = "sha256-4Gf2IvehQ9JXD1kzgYRNFZZi17UWx++09tU05U7Q7To="; | ||
}; | ||
|
||
cowboyBebop = { | ||
op = pkgs.fetchurl { | ||
url = "https://pastb.in/cowboybebop-op.jpg"; | ||
name = "cowboybebop-op.jpg"; | ||
hash = "sha256-Re6bEdMwQae+E2JNq/5Ah+9iuaJIgFHxg8UqJ36itA8="; | ||
}; | ||
|
||
sky = pkgs.fetchurl { | ||
url = "https://pastb.in/cowboybebop-sky.jpg"; | ||
name = "cowboybebop-sky.jpg"; | ||
hash = "sha256-2fhkMXkNCvkmuA7yTOzTa/3AQxgu2QsSKGqHAxOB7K4="; | ||
}; | ||
|
||
bebop = pkgs.fetchurl { | ||
url = "https://pastb.in/cowboybebop-bebop.jpg"; | ||
name = "cowboybebop-bebop.jpg"; | ||
hash = "sha256-nWw1gnXq526ykBl31or5DBYUVDmEshqs5Jz2mQlKSMQ="; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters