From 6b4617fcd1e8f0ca37e7464b29a8e79d88a4d5d7 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 6 Oct 2023 12:03:58 +0800 Subject: [PATCH 1/5] modified install shell to install to xdg-config-dirs to comply with xdg standards --- install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 0785700c..99a92ecf 100755 --- a/install.sh +++ b/install.sh @@ -6,11 +6,12 @@ if [ ! "$(command -v unzip)" ]; then exit 1 fi + _fetch_sources(){ wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip - mkdir -p ~/.nano/ + mkdir -p ~/.config/nano/ - cd ~/.nano/ || exit + cd ~/.config/nano/ || exit unzip -o "/tmp/nanorc.zip" mv nanorc-master/* ./ rm -rf nanorc-master @@ -18,21 +19,21 @@ _fetch_sources(){ } _update_nanorc(){ - touch ~/.nanorc + touch ~/.config/nano/nanorc - # add all includes from ~/.nano/nanorc if they're not already there + # add all includes from ~/.config/nano/nanorc if they're not already there while read -r inc; do if ! grep -q "$inc" "${NANORC_FILE}"; then echo "$inc" >> "$NANORC_FILE" fi - done < ~/.nano/nanorc + done < ~/.config/nano/nanorc } _update_nanorc_lite(){ - sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.nano\/*.nanorc"' "${NANORC_FILE}" + sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.conig.\/nano\/*.nanorc"' "${NANORC_FILE}" } -NANORC_FILE=~/.nanorc +NANORC_FILE=~/.config\/nano\/nanorc case "$1" in -l|--lite) From 5e8edb961e656dfd8496ae006d01f61ec49dda65 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 6 Oct 2023 12:08:21 +0800 Subject: [PATCH 2/5] Revert "modified install shell to install to xdg-config-dirs to comply with xdg standards" This reverts commit 6b4617fcd1e8f0ca37e7464b29a8e79d88a4d5d7. --- install.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 99a92ecf..0785700c 100755 --- a/install.sh +++ b/install.sh @@ -6,12 +6,11 @@ if [ ! "$(command -v unzip)" ]; then exit 1 fi - _fetch_sources(){ wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip - mkdir -p ~/.config/nano/ + mkdir -p ~/.nano/ - cd ~/.config/nano/ || exit + cd ~/.nano/ || exit unzip -o "/tmp/nanorc.zip" mv nanorc-master/* ./ rm -rf nanorc-master @@ -19,21 +18,21 @@ _fetch_sources(){ } _update_nanorc(){ - touch ~/.config/nano/nanorc + touch ~/.nanorc - # add all includes from ~/.config/nano/nanorc if they're not already there + # add all includes from ~/.nano/nanorc if they're not already there while read -r inc; do if ! grep -q "$inc" "${NANORC_FILE}"; then echo "$inc" >> "$NANORC_FILE" fi - done < ~/.config/nano/nanorc + done < ~/.nano/nanorc } _update_nanorc_lite(){ - sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.conig.\/nano\/*.nanorc"' "${NANORC_FILE}" + sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.nano\/*.nanorc"' "${NANORC_FILE}" } -NANORC_FILE=~/.config\/nano\/nanorc +NANORC_FILE=~/.nanorc case "$1" in -l|--lite) From f153f03ed1209f8f0cb88875a6a2f0ced4ef07cf Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 6 Oct 2023 12:09:36 +0800 Subject: [PATCH 3/5] edited nanorc paths to .config/nano/*.nanorc to comply with xdg standards --- nanorc | 180 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/nanorc b/nanorc index 03009574..a89cc956 100644 --- a/nanorc +++ b/nanorc @@ -1,90 +1,90 @@ -include "~/.nano/apacheconf.nanorc" -include "~/.nano/arduino.nanorc" -include "~/.nano/asciidoc.nanorc" -include "~/.nano/asm.nanorc" -include "~/.nano/awk.nanorc" -include "~/.nano/c.nanorc" -include "~/.nano/clojure.nanorc" -include "~/.nano/cmake.nanorc" -include "~/.nano/coffeescript.nanorc" -include "~/.nano/colortest.nanorc" -include "~/.nano/conf.nanorc" -include "~/.nano/csharp.nanorc" -include "~/.nano/css.nanorc" -include "~/.nano/cython.nanorc" -include "~/.nano/dot.nanorc" -include "~/.nano/dotenv.nanorc" -include "~/.nano/email.nanorc" -include "~/.nano/Dockerfile.nanorc" -include "~/.nano/etc-hosts.nanorc" -include "~/.nano/fish.nanorc" -include "~/.nano/fortran.nanorc" -include "~/.nano/gentoo.nanorc" -include "~/.nano/git.nanorc" -include "~/.nano/gitcommit.nanorc" -include "~/.nano/glsl.nanorc" -include "~/.nano/go.nanorc" -include "~/.nano/gradle.nanorc" -include "~/.nano/groff.nanorc" -include "~/.nano/haml.nanorc" -include "~/.nano/haskell.nanorc" -include "~/.nano/html.nanorc" -include "~/.nano/html.j2.nanorc" -include "~/.nano/ical.nanorc" -include "~/.nano/ini.nanorc" -include "~/.nano/inputrc.nanorc" -include "~/.nano/jade.nanorc" -include "~/.nano/java.nanorc" -include "~/.nano/javascript.nanorc" -include "~/.nano/js.nanorc" -include "~/.nano/json.nanorc" -include "~/.nano/keymap.nanorc" -include "~/.nano/kickstart.nanorc" -include "~/.nano/kotlin.nanorc" -include "~/.nano/ledger.nanorc" -include "~/.nano/lisp.nanorc" -include "~/.nano/lua.nanorc" -include "~/.nano/makefile.nanorc" -include "~/.nano/man.nanorc" -include "~/.nano/markdown.nanorc" -include "~/.nano/mpdconf.nanorc" -include "~/.nano/mutt.nanorc" -include "~/.nano/nanorc.nanorc" -include "~/.nano/nginx.nanorc" -include "~/.nano/nmap.nanorc" -include "~/.nano/ocaml.nanorc" -include "~/.nano/patch.nanorc" -include "~/.nano/peg.nanorc" -include "~/.nano/perl.nanorc" -include "~/.nano/perl6.nanorc" -include "~/.nano/php.nanorc" -include "~/.nano/pkg-config.nanorc" -include "~/.nano/pkgbuild.nanorc" -include "~/.nano/po.nanorc" -include "~/.nano/pov.nanorc" -include "~/.nano/privoxy.nanorc" -include "~/.nano/puppet.nanorc" -include "~/.nano/pug.nanorc" -include "~/.nano/python.nanorc" -include "~/.nano/reST.nanorc" -include "~/.nano/rpmspec.nanorc" -include "~/.nano/ruby.nanorc" -include "~/.nano/rust.nanorc" -include "~/.nano/scala.nanorc" -include "~/.nano/sed.nanorc" -include "~/.nano/sh.nanorc" -include "~/.nano/sls.nanorc" -include "~/.nano/sql.nanorc" -include "~/.nano/svn.nanorc" -include "~/.nano/swift.nanorc" -include "~/.nano/systemd.nanorc" -include "~/.nano/tcl.nanorc" -include "~/.nano/tex.nanorc" -include "~/.nano/vala.nanorc" -include "~/.nano/verilog.nanorc" -include "~/.nano/vi.nanorc" -include "~/.nano/xml.nanorc" -include "~/.nano/xresources.nanorc" -include "~/.nano/yaml.nanorc" -include "~/.nano/yum.nanorc" -include "~/.nano/zsh.nanorc" +include "~/.config/nano/apacheconf.nanorc" +include "~/.config/nano/arduino.nanorc" +include "~/.config/nano/asciidoc.nanorc" +include "~/.config/nano/asm.nanorc" +include "~/.config/nano/awk.nanorc" +include "~/.config/nano/c.nanorc" +include "~/.config/nano/clojure.nanorc" +include "~/.config/nano/cmake.nanorc" +include "~/.config/nano/coffeescript.nanorc" +include "~/.config/nano/colortest.nanorc" +include "~/.config/nano/conf.nanorc" +include "~/.config/nano/csharp.nanorc" +include "~/.config/nano/css.nanorc" +include "~/.config/nano/cython.nanorc" +include "~/.config/nano/dot.nanorc" +include "~/.config/nano/dotenv.nanorc" +include "~/.config/nano/email.nanorc" +include "~/.config/nano/Dockerfile.nanorc" +include "~/.config/nano/etc-hosts.nanorc" +include "~/.config/nano/fish.nanorc" +include "~/.config/nano/fortran.nanorc" +include "~/.config/nano/gentoo.nanorc" +include "~/.config/nano/git.nanorc" +include "~/.config/nano/gitcommit.nanorc" +include "~/.config/nano/glsl.nanorc" +include "~/.config/nano/go.nanorc" +include "~/.config/nano/gradle.nanorc" +include "~/.config/nano/groff.nanorc" +include "~/.config/nano/haml.nanorc" +include "~/.config/nano/haskell.nanorc" +include "~/.config/nano/html.nanorc" +include "~/.config/nano/html.j2.nanorc" +include "~/.config/nano/ical.nanorc" +include "~/.config/nano/ini.nanorc" +include "~/.config/nano/inputrc.nanorc" +include "~/.config/nano/jade.nanorc" +include "~/.config/nano/java.nanorc" +include "~/.config/nano/javascript.nanorc" +include "~/.config/nano/js.nanorc" +include "~/.config/nano/json.nanorc" +include "~/.config/nano/keymap.nanorc" +include "~/.config/nano/kickstart.nanorc" +include "~/.config/nano/kotlin.nanorc" +include "~/.config/nano/ledger.nanorc" +include "~/.config/nano/lisp.nanorc" +include "~/.config/nano/lua.nanorc" +include "~/.config/nano/makefile.nanorc" +include "~/.config/nano/man.nanorc" +include "~/.config/nano/markdown.nanorc" +include "~/.config/nano/mpdconf.nanorc" +include "~/.config/nano/mutt.nanorc" +include "~/.config/nano/nanorc.nanorc" +include "~/.config/nano/nginx.nanorc" +include "~/.config/nano/nmap.nanorc" +include "~/.config/nano/ocaml.nanorc" +include "~/.config/nano/patch.nanorc" +include "~/.config/nano/peg.nanorc" +include "~/.config/nano/perl.nanorc" +include "~/.config/nano/perl6.nanorc" +include "~/.config/nano/php.nanorc" +include "~/.config/nano/pkg-config.nanorc" +include "~/.config/nano/pkgbuild.nanorc" +include "~/.config/nano/po.nanorc" +include "~/.config/nano/pov.nanorc" +include "~/.config/nano/privoxy.nanorc" +include "~/.config/nano/puppet.nanorc" +include "~/.config/nano/pug.nanorc" +include "~/.config/nano/python.nanorc" +include "~/.config/nano/reST.nanorc" +include "~/.config/nano/rpmspec.nanorc" +include "~/.config/nano/ruby.nanorc" +include "~/.config/nano/rust.nanorc" +include "~/.config/nano/scala.nanorc" +include "~/.config/nano/sed.nanorc" +include "~/.config/nano/sh.nanorc" +include "~/.config/nano/sls.nanorc" +include "~/.config/nano/sql.nanorc" +include "~/.config/nano/svn.nanorc" +include "~/.config/nano/swift.nanorc" +include "~/.config/nano/systemd.nanorc" +include "~/.config/nano/tcl.nanorc" +include "~/.config/nano/tex.nanorc" +include "~/.config/nano/vala.nanorc" +include "~/.config/nano/verilog.nanorc" +include "~/.config/nano/vi.nanorc" +include "~/.config/nano/xml.nanorc" +include "~/.config/nano/xresources.nanorc" +include "~/.config/nano/yaml.nanorc" +include "~/.config/nano/yum.nanorc" +include "~/.config/nano/zsh.nanorc" From 93ca2fb077d0da23a4f656da5824fa94beb6662d Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 6 Oct 2023 12:13:17 +0800 Subject: [PATCH 4/5] Revert "Revert "modified install shell to install to xdg-config-dirs to comply with xdg standards"" This reverts the reverted commit because I am literally figuring out how to use git right now. --- install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 0785700c..99a92ecf 100755 --- a/install.sh +++ b/install.sh @@ -6,11 +6,12 @@ if [ ! "$(command -v unzip)" ]; then exit 1 fi + _fetch_sources(){ wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip - mkdir -p ~/.nano/ + mkdir -p ~/.config/nano/ - cd ~/.nano/ || exit + cd ~/.config/nano/ || exit unzip -o "/tmp/nanorc.zip" mv nanorc-master/* ./ rm -rf nanorc-master @@ -18,21 +19,21 @@ _fetch_sources(){ } _update_nanorc(){ - touch ~/.nanorc + touch ~/.config/nano/nanorc - # add all includes from ~/.nano/nanorc if they're not already there + # add all includes from ~/.config/nano/nanorc if they're not already there while read -r inc; do if ! grep -q "$inc" "${NANORC_FILE}"; then echo "$inc" >> "$NANORC_FILE" fi - done < ~/.nano/nanorc + done < ~/.config/nano/nanorc } _update_nanorc_lite(){ - sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.nano\/*.nanorc"' "${NANORC_FILE}" + sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.conig.\/nano\/*.nanorc"' "${NANORC_FILE}" } -NANORC_FILE=~/.nanorc +NANORC_FILE=~/.config\/nano\/nanorc case "$1" in -l|--lite) From 1338340a9d8a11e4452151d17c2410f7194174fd Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 6 Oct 2023 12:15:54 +0800 Subject: [PATCH 5/5] I am sorry for the number of commits. Anyway, this removes a line because nano kept spitting an error saying "Normal has no prefix" or something --- nanorc.nanorc | 1 - 1 file changed, 1 deletion(-) diff --git a/nanorc.nanorc b/nanorc.nanorc index dd889fd9..211878ce 100644 --- a/nanorc.nanorc +++ b/nanorc.nanorc @@ -23,7 +23,6 @@ icolor brightblue " brightblue" icolor brightmagenta " brightmagenta" icolor brightcyan " brightcyan" icolor brightwhite " brightwhite" -icolor brightnormal " brightnormal" icolor ,black ",black " icolor ,red ",red " icolor ,green ",green "