(desktop) Gen 494: reformatted several files using alejandra
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "compress" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "compress" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (( $# == 1 )) then
|
||||
# echo -ne "Archive name: "
|
||||
# read name
|
||||
# tar -cvzf "$name.tar.gz" $1
|
||||
tar -cvzf "$1.tar.gz" $1
|
||||
else
|
||||
echo "Wrong number of arguments..."
|
||||
fi
|
||||
'')
|
||||
if (( $# == 1 )) then
|
||||
# echo -ne "Archive name: "
|
||||
# read name
|
||||
# tar -cvzf "$name.tar.gz" $1
|
||||
tar -cvzf "$1.tar.gz" $1
|
||||
else
|
||||
echo "Wrong number of arguments..."
|
||||
fi
|
||||
''
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "crs" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "crs" (''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
cargo test && \
|
||||
cargo run
|
||||
'')
|
||||
cargo test && \
|
||||
cargo run
|
||||
''
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "extract" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "extract" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
for i in "$@" ; do
|
||||
tar -xvzf $i
|
||||
break
|
||||
done
|
||||
'')
|
||||
for i in "$@" ; do
|
||||
tar -xvzf $i
|
||||
break
|
||||
done
|
||||
''
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "invoke" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "invoke" (''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
nix run nixpkgs#$"@"
|
||||
'')
|
||||
nix run nixpkgs#$"@"
|
||||
''
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "keybinds" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "keybinds" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
config_file=~/.config/hypr/hyprland.conf
|
||||
keybinds=$(grep -oP '(?<=bind=).*' $config_file)
|
||||
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
||||
rofi -dmenu -theme-str 'window {width: 50%;}' <<< "$keybinds"
|
||||
'')
|
||||
config_file=~/.config/hypr/hyprland.conf
|
||||
keybinds=$(grep -oP '(?<=bind=).*' $config_file)
|
||||
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
||||
rofi -dmenu -theme-str 'window {width: 50%;}' <<< "$keybinds"
|
||||
''
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "mcd" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "mcd" (''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
|
||||
mkdir -p "$1"
|
||||
cd "$1" || exit
|
||||
'')
|
||||
mkdir -p "$1"
|
||||
cd "$1" || exit
|
||||
''
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "runbg" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "runbg" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[ $# -eq 0 ] && { # $# is number of args
|
||||
echo "$(basename $0): missing command" >&2
|
||||
exit 1
|
||||
}
|
||||
prog="$(which "$1")" # see below
|
||||
[ -z "$prog" ] && {
|
||||
echo "$(basename $0): unknown command: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
shift # remove $1, now $prog, from args
|
||||
tty -s && exec </dev/null # if stdin is a terminal, redirect from null
|
||||
tty -s <&1 && exec >/dev/null # if stdout is a terminal, redirect to null
|
||||
tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
|
||||
"$prog" "$@" & # $@ is all args
|
||||
'')
|
||||
[ $# -eq 0 ] && { # $# is number of args
|
||||
echo "$(basename $0): missing command" >&2
|
||||
exit 1
|
||||
}
|
||||
prog="$(which "$1")" # see below
|
||||
[ -z "$prog" ] && {
|
||||
echo "$(basename $0): unknown command: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
shift # remove $1, now $prog, from args
|
||||
tty -s && exec </dev/null # if stdin is a terminal, redirect from null
|
||||
tty -s <&1 && exec >/dev/null # if stdout is a terminal, redirect to null
|
||||
tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
|
||||
"$prog" "$@" & # $@ is all args
|
||||
''
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{ self, pkgs }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "scheck" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "scheck" (''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
[ "$SOUNDS_ENABLED" -eq 1 ]
|
||||
'')
|
||||
[ "$SOUNDS_ENABLED" -eq 1 ]
|
||||
''
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "splash" (''
|
||||
#!/bin/bash
|
||||
|
||||
echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux"
|
||||
date +"%A %B %-d %Y"
|
||||
echo -e "\033[38;2;0;180;205m$(toilet -t -f Slant.flf glasshouse)\033[0m"
|
||||
echo
|
||||
'')
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
}:
|
||||
pkgs.writeShellScriptBin "splash" ''
|
||||
#!/bin/bash
|
||||
|
||||
echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux"
|
||||
date +"%A %B %-d %Y"
|
||||
echo -e "\033[38;2;0;180;205m$(toilet -t -f Slant.flf glasshouse)\033[0m"
|
||||
echo
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user