From 2e776fbcee5efe30ca8eb0e0652b73b94464947c Mon Sep 17 00:00:00 2001 From: "Richard G. Riley" Date: Mon, 4 Jan 2021 15:21:01 +0100 Subject: [PATCH 1/2] reset github script clean --- README.md | 11 +++++------ directories/bin/resgithub | 6 +++--- linux-init-files.org | 11 +++++------ 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 607f79d4..d9d2e4a4 100644 --- a/README.md +++ b/README.md @@ -2035,15 +2035,14 @@ reset github as if it's newly born. ALL history will be lost. #!/bin/bash #Maintained in linux-init-files.org tfile=$(mktemp /tmp/config.XXXXXXXXX) -GITCONF=".git/config" -commitmsg=${1:-git repository initialised} -if [ -f $GITCONF ]; then - mv .git/config tfile +commitmsg=${1:-"git repository initialised"} +if [ -f .git/config ]; then + mv .git/config "$tfile" rm -rf .git git init . - mv tfile .git/config + mv "$tfile" .git/config git add . - git commit -a -m "${commitmsg}" + git commit -a -m "$commitmsg" git push -f else echo "Warning: No git config file found. Aborting.";exit; diff --git a/directories/bin/resgithub b/directories/bin/resgithub index 649eb6e0..6dfd2ddb 100755 --- a/directories/bin/resgithub +++ b/directories/bin/resgithub @@ -3,11 +3,11 @@ tfile=$(mktemp /tmp/config.XXXXXXXXX) GITCONF=".git/config" commitmsg=${1:-git repository initialised} -if [ -f $GITCONF ]; then - mv .git/config tfile +if [ -f "$GITCONF" ]; then + mv "$GITCONF" tfile rm -rf .git git init . - mv tfile .git/config + mv tfile "$GITCONF" git add . git commit -a -m "${commitmsg}" git push -f diff --git a/linux-init-files.org b/linux-init-files.org index b42e2f48..6b832984 100644 --- a/linux-init-files.org +++ b/linux-init-files.org @@ -1899,15 +1899,14 @@ #!/bin/bash #Maintained in linux-init-files.org tfile=$(mktemp /tmp/config.XXXXXXXXX) - GITCONF=".git/config" - commitmsg=${1:-git repository initialised} - if [ -f $GITCONF ]; then - mv .git/config tfile + commitmsg=${1:-"git repository initialised"} + if [ -f .git/config ]; then + mv .git/config "$tfile" rm -rf .git git init . - mv tfile .git/config + mv "$tfile" .git/config git add . - git commit -a -m "${commitmsg}" + git commit -a -m "$commitmsg" git push -f else echo "Warning: No git config file found. Aborting.";exit; From 13d4c2e4715418a8590a08436e0bad2b9b9ce629 Mon Sep 17 00:00:00 2001 From: "Richard G. Riley" Date: Mon, 4 Jan 2021 15:25:50 +0100 Subject: [PATCH 2/2] doesnt work --- README.md | 2 +- dot-config/i3/config | 2 +- linux-init-files.org | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 607f79d4..bda72314 100644 --- a/README.md +++ b/README.md @@ -1219,7 +1219,7 @@ modifier $mod #general user launch bindings bindsym $mod+Shift+e exec emacs-same-frame -bindsym $mod+Shift+f exec google-chrome +bindsym $mod+Shift+f exec google-chrome --disable-session-crashed-bubble bindsym $mod+Control+t exec "notify-send -t 2000 'Opening NEW Terminator instance' && terminator -e tmux" bindsym $mod+Control+l exec (sleep 1 && xset dpms force standby) #triggers xss-lock bindsym $mod+Control+o exec xmg-neo-rgb-kbd-lights toggle && x-backlight-persist restore diff --git a/dot-config/i3/config b/dot-config/i3/config index 7704db7f..08a8bca8 100644 --- a/dot-config/i3/config +++ b/dot-config/i3/config @@ -196,7 +196,7 @@ modifier $mod #general user launch bindings bindsym $mod+Shift+e exec emacs-same-frame -bindsym $mod+Shift+f exec google-chrome +bindsym $mod+Shift+f exec google-chrome --disable-session-crashed-bubble bindsym $mod+Control+t exec "notify-send -t 2000 'Opening NEW Terminator instance' && terminator -e tmux" bindsym $mod+Control+l exec (sleep 1 && xset dpms force standby) #triggers xss-lock bindsym $mod+Control+o exec xmg-neo-rgb-kbd-lights toggle && x-backlight-persist restore diff --git a/linux-init-files.org b/linux-init-files.org index b42e2f48..4d0387f8 100644 --- a/linux-init-files.org +++ b/linux-init-files.org @@ -1180,7 +1180,7 @@ #general user launch bindings bindsym $mod+Shift+e exec emacs-same-frame - bindsym $mod+Shift+f exec google-chrome + bindsym $mod+Shift+f exec google-chrome --disable-session-crashed-bubble bindsym $mod+Control+t exec "notify-send -t 2000 'Opening NEW Terminator instance' && terminator -e tmux" bindsym $mod+Control+l exec (sleep 1 && xset dpms force standby) #triggers xss-lock bindsym $mod+Control+o exec xmg-neo-rgb-kbd-lights toggle && x-backlight-persist restore