From c770882ca51f12eb2d0d113b8ea7ecb9d0054c1f Mon Sep 17 00:00:00 2001 From: Marley Rae Date: Fri, 2 Feb 2024 18:43:42 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20OS=20aliases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fish/aliases.config.fish | 16 ++++------------ os/aliases.config.fish | 9 +++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 os/aliases.config.fish diff --git a/fish/aliases.config.fish b/fish/aliases.config.fish index 1f843f9..9be14a0 100644 --- a/fish/aliases.config.fish +++ b/fish/aliases.config.fish @@ -4,9 +4,9 @@ # Shell aliases. abbr -a rl --position command "source ~/.config/fish/config.fish" -abbr -a c --position command "clear" -abbr -a e --position command "$EDITOR" -abbr -a v --position command "$EDITOR" +abbr -a c --position command clear +abbr -a e --position command "$EDITOR" +abbr -a v --position command "$EDITOR" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -34,14 +34,6 @@ abbr -a rm --position command "rm -rf" # └─ recursively remove directories and files # Colored grep output. -abbr -a grep --position command "grep --color=auto" +abbr -a grep --position command "grep --color=auto" abbr -a fgrep --position command "fgrep --color=auto" abbr -a egrep --position command "egrep --color=auto" - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -if [ "$(uname)" = "Darwin" ] - abbr -a o --position command "open" -else if [ "$(uname)" = "Linux" ] - abbr -a o --position command "xdg-open" -end diff --git a/os/aliases.config.fish b/os/aliases.config.fish new file mode 100644 index 0000000..653d665 --- /dev/null +++ b/os/aliases.config.fish @@ -0,0 +1,9 @@ +#!/usr/bin/env fish + +if [ "$(uname)" = Darwin ] + abbr -a afk --position command "osascript -e 'tell application \"System Events\" to sleep'" + abbr -a o --position command open + +else if [ "$(uname)" = Linux ] + abbr -a o --position command xdg-open +end