add some files
This commit is contained in:
parent
a8c59e69cb
commit
481612fd84
12 changed files with 133 additions and 6 deletions
24
private_dot_local/bin/executable_cglaunch
Normal file
24
private_dot_local/bin/executable_cglaunch
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# https://github.com/maximbaz/dotfiles/blob/61a40e111012dd589dad89ff0d31dcd1be8f8529/.local/bin/cglaunch
|
||||
|
||||
if [ "$1" = "--term" ]; then
|
||||
shift
|
||||
|
||||
kitty_args=()
|
||||
if [[ "$1" == "-"* ]]; then
|
||||
while [[ "$#" -gt 1 ]] && [[ "$1" != "--" ]]; do
|
||||
kitty_args+=("$1")
|
||||
shift
|
||||
done
|
||||
[[ "$1" != "--" ]] || shift
|
||||
fi
|
||||
|
||||
title="${1##*/}"
|
||||
title="${title:-kitty}"
|
||||
app="kitty ${kitty_args[@]} --class $title"
|
||||
else
|
||||
title="${1##*/}"
|
||||
args="--scope"
|
||||
fi
|
||||
|
||||
exec systemd-run --quiet --no-block --user --slice app.slice --unit "launch-$title-$(date '+%s%N')" $args -- $app "$@"
|
Loading…
Add table
Add a link
Reference in a new issue