writeScript* -> writeShellScript*
This commit is contained in:
parent
10d39faff4
commit
23b7c3f5a7
9 changed files with 12 additions and 38 deletions
|
@ -1,13 +1,7 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
passwordScript = pkgs.writeScript "get_mail_password" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
${pkgs.pass}/bin/pass show "$@" | head -n1 | tr -d "\n"
|
||||
'';
|
||||
notifyScript = name: pkgs.writeScript "notify_${name}_mail" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
passwordScript = pkgs.writeShellScript "get_mail_password" ''${pkgs.pass}/bin/pass show "$@" | head -n1 | tr -d "\n"'';
|
||||
notifyScript = name: pkgs.writeShellScript "notify_${name}_mail" ''
|
||||
unseen_count=$(${pkgs.mblaze}/bin/mlist -N ~/mail/*/INBOX | wc -l)
|
||||
|
||||
if [ "$unseen_count" = "1" ]
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
name = "openssh";
|
||||
paths = [
|
||||
(
|
||||
self.writeScriptBin "ssh" ''
|
||||
#!${self.zsh}/bin/zsh
|
||||
|
||||
self.writeShellScriptBin "ssh" ''
|
||||
export TERM=xterm-256color
|
||||
${super.openssh}/bin/ssh $@
|
||||
''
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeScriptBin "color_picker" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
pkgs.writeShellScriptBin "color_picker" ''
|
||||
color=$(${pkgs.grim}/bin/grim -t png -g "$(${pkgs.slurp}/bin/slurp -p)" - | ${pkgs.imagemagick}/bin/convert png:- -unique-colors txt:- | grep -o '#[A-F0-9]\+')
|
||||
|
||||
${pkgs.sway}/bin/swaymsg exec -- "echo -n '$color' | ${pkgs.wl-clipboard}/bin/wl-copy --foreground"
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeScriptBin "screenshot" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
pkgs.writeShellScriptBin "screenshot" ''
|
||||
while getopts ":rd" opt
|
||||
do
|
||||
case "''${opt}" in
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
mic-status = pkgs.writeScript "mic-status" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
mic-status = pkgs.writeShellScript "mic-status" ''
|
||||
if [ "$(${pkgs.pulseaudio}/bin/pactl list sources | grep -o 'Mute: yes')" = "Mute: yes" ]
|
||||
then
|
||||
echo -e '\uf131'
|
||||
|
@ -10,9 +8,7 @@ let
|
|||
echo -e '\uf130'
|
||||
fi
|
||||
'';
|
||||
mail-status = pkgs.writeScript "mail-status" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
mail-status = pkgs.writeShellScript "mail-status" ''
|
||||
mails=$(${pkgs.mblaze}/bin/mlist -N ~/mail/*/INBOX | wc -l)
|
||||
if [ "$mails" -gt 0 ]
|
||||
then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue