From 0f1df0db903ba576fd17b08197d3066af7a61e5f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Nov 2023 23:23:40 +0100 Subject: A lot of changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- caja/Makefile | 15 ++++++++++----- caja/c | 6 +++--- caja/c-Zenith | 1 + caja/thunar | 18 ++++++++++++++++++ 4 files changed, 32 insertions(+), 8 deletions(-) create mode 120000 caja/c-Zenith create mode 100755 caja/thunar (limited to 'caja') diff --git a/caja/Makefile b/caja/Makefile index b0c08a5..3b36437 100644 --- a/caja/Makefile +++ b/caja/Makefile @@ -1,12 +1,17 @@ .POSIX: -include ../common.mk install: - $(CHECK_INSTALLED) dash + ../check-installed-shebang c mkdir -p -- ~/.local/bin - ln -sf -- ~/.dotfiles/caja/c ~/.local/bin/ + test ! -e ~/.local/bin/c || test -L ~/.local/bin/c + if test -e "c-$$(hostname)"; then \ + ../check-in-path "$$(readlink -- "c-$$(hostname)")" && \ + ln -sf -- ~/.dotfiles/caja/"c-$$(hostname)" ~/.local/bin/c; \ + else \ + ln -sf -- ~/.dotfiles/caja/c ~/.local/bin/c; \ + fi uninstall: + +! ../check-installed caja + +! ../check-installed caja-gtk2 -unlink -- ~/.local/bin/c - -.PHONY: install uninstall diff --git a/caja/c b/caja/c index 88f50b4..fc1f550 100755 --- a/caja/c +++ b/caja/c @@ -1,7 +1,7 @@ #!/bin/dash for i in $(ls /dev/fd/); do - eval "exec $i>&-" + eval "exec $i>&-" done exec 0/dev/null @@ -10,7 +10,7 @@ exec 2>/dev/null if test $# = 0; then exec caja --no-desktop & else - p="$(realpath -- "$*" || printf '%s\n' "$*")" + p="$(realpath -- "$*" || printf '%s\n' "$*")" cd / - exec caja --no-desktop -- "$p" & + exec caja --no-desktop -- "$p" & fi diff --git a/caja/c-Zenith b/caja/c-Zenith new file mode 120000 index 0000000..af8fd0e --- /dev/null +++ b/caja/c-Zenith @@ -0,0 +1 @@ +thunar \ No newline at end of file diff --git a/caja/thunar b/caja/thunar new file mode 100755 index 0000000..b21c2dd --- /dev/null +++ b/caja/thunar @@ -0,0 +1,18 @@ +#!/bin/dash + +for i in $(ls /dev/fd/); do + eval "exec $i>&-" +done +exec 0/dev/null +exec 2>/dev/null + +if test $# = 0; then + #exec caja --no-desktop & + exec thunar & +else + p="$(realpath -- "$*" || printf '%s\n' "$*")" + cd / + #exec caja --no-desktop -- "$p" & + exec thunar -- "$p" & +fi -- cgit v1.2.3-70-g09d2