Skip to content

Commit

Permalink
up(bash_environment): add PYTHONSTARTUP for the ~/.pythonrc file
Browse files Browse the repository at this point in the history
up(xsession): disable the `xsetroot` call from every window manager
up(find/jap-dict.sh): up doc
up(diff/diff.sh): add the `-d` option which allows `diff.sh` to use stock diff
  • Loading branch information
matthmr committed Jan 3, 2023
1 parent ec8691c commit 26db387
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
11 changes: 7 additions & 4 deletions diff/diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

case $1 in
'-h'|'--help')
echo "Usage: diff.sh [-] [file] [+] [file] -- [diff-opts]"
echo "Usage: diff.sh [-d] [-] [file] [+] [file] -- [diff-opts]"
echo "Description: Verbose diff"
echo "Options:
-: take [file] as the file with the missing lines
+: take [file] as the file with the added lines"
-: take [file] as the file with the missing lines
+: take [file] as the file with the added lines
-d: use default diff"
echo "Variables:
DIFF=\`diff'-like command"
exit 1;;
Expand Down Expand Up @@ -53,6 +54,8 @@ for arg in $@; do
fi

case $arg in
'-d')
DIFF=diff;;
'-')
lock_minus=true;;
'+')
Expand All @@ -76,5 +79,5 @@ if [[ -z $MINUS_FILE ]] || [[ -z $PLUS_FILE ]]; then
die
fi

echo "[ == ] Running as: $DIFF $DIFF_OPT $MINUS_FILE $PLUS_FILE"
echo "[ == ] Running as: $DIFF $DIFF_OPT $MINUS_FILE $PLUS_FILE" 1>&2
$DIFF $DIFF_OPT $MINUS_FILE $PLUS_FILE
6 changes: 3 additions & 3 deletions find/jap-dict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

case $1 in
'-h'|'--help')
echo "Usage: jap-dict.sh -jr [word]"
echo "Description: Searches the default japanese dictionary for [word"
echo "Usage: jap-dict.sh -jre [word]"
echo "Description: Searches the default japanese dictionary for [word]"
echo "Options:
DEFAULT: -j
Expand All @@ -23,7 +23,7 @@ case $1 in
'-j'|'-e')
$GREP --color=auto -F "${@:2}" $JAPDICT;;
'-r')
$GREP --color=auto -F "$(romaji ${@:2})" $JAPDICT;;
$GREP --color=auto -F "$(romaji "${@:2}")" $JAPDICT;;
*)
$GREP --color=auto -F "${@:1}" $JAPDICT;;
esac
3 changes: 3 additions & 0 deletions sh/bash_environment
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ export XDG_RUNTIME_DIR=/run/user/1000

# X
export XAUTHORITY=/home/mh/.Xauthority

## Python
export PYTHONSTARTUP=/home/mh/.pythonrc
3 changes: 1 addition & 2 deletions x/xsession
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ done

# start WM-specific programs
case $WM in
*)
#'dwm'|'dwm-git')
'DISABLED')
# See (20221106)
#/tmp/dbus-launch /mnt/ssd/root/usr/bin/dunst < /dev/null >& /dev/null &
xsetroot -xcf /home/mh/.icons/McMojave-cursors/cursors/default 32 &;;
Expand Down

0 comments on commit 26db387

Please sign in to comment.