summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
author2024-01-29 14:32:38 +0530
committer2024-01-29 14:32:38 +0530
commitf390f01c67b92b4c4f520e8c64fc518beb235f90 (patch)
tree30cd2cf2ae4dac5a56a8342ac851539d059fb2bc /.local
parentInitial Commit (diff)
downloaddotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.gz
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.bz2
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.lz
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.xz
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.tar.zst
dotfiles-f390f01c67b92b4c4f520e8c64fc518beb235f90.zip
Probally Should update more often
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/dedup2
-rwxr-xr-x.local/bin/e2
-rwxr-xr-x.local/bin/http-dir29
-rwxr-xr-x.local/bin/p4
-rwxr-xr-x.local/bin/sh-prompt23
-rwxr-xr-x.local/bin/v5
-rw-r--r--.local/share/flatpak/overrides/org.mozilla.firefox5
7 files changed, 28 insertions, 42 deletions
diff --git a/.local/bin/dedup b/.local/bin/dedup
index 912cb95..69913ce 100755
--- a/.local/bin/dedup
+++ b/.local/bin/dedup
@@ -1,3 +1,3 @@
#!/usr/bin/awk -f
-!a[$0]++
+!seen[$0]++
diff --git a/.local/bin/e b/.local/bin/e
index e341837..cab6db4 100755
--- a/.local/bin/e
+++ b/.local/bin/e
@@ -1,3 +1,3 @@
#!/bin/sh --
-exec "${EDITOR:-ed}" "$@"
+"${EDITOR:-ed}" "$@"
diff --git a/.local/bin/http-dir b/.local/bin/http-dir
deleted file mode 100755
index a1dd19d..0000000
--- a/.local/bin/http-dir
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python3
-
-import argparse
-import http.server
-import os
-import sys
-
-def main():
- parser = argparse.ArgumentParser()
- parser.add_argument('--bind', '-b', metavar='ADDRESS',default='', help='specify alternate bind address (default: all interfaces)')
- parser.add_argument('--directory', '-d', default=os.getcwd(), help='specify alternate directory (default: current directory)')
- parser.add_argument('port', action='store', default=8000, type=int,
- nargs='?', help='specify alternate port (default: 8000)')
- args = parser.parse_args()
-
- class app(http.server.SimpleHTTPRequestHandler):
- def __init__(self, request, client_address, server):
- super().__init__(request, client_address, server, directory=args.directory)
-
- with http.server.ThreadingHTTPServer((args.bind, args.port), app) as httpd:
- try:
- httpd.serve_forever()
- except KeyboardInterrupt:
- sys.exit()
-
-
-
-if __name__ == '__main__':
- main()
diff --git a/.local/bin/p b/.local/bin/p
index 3b2aef1..7951699 100755
--- a/.local/bin/p
+++ b/.local/bin/p
@@ -1,3 +1,3 @@
-#!/bin/sh --
+#!/bin/sh --
-exec "${PAGER:-less}" "$@"
+"${PAGER:-more}" "$@"
diff --git a/.local/bin/sh-prompt b/.local/bin/sh-prompt
index ebc1057..389dd3c 100755
--- a/.local/bin/sh-prompt
+++ b/.local/bin/sh-prompt
@@ -1,3 +1,24 @@
#!/bin/sh --
-printf "%u %s@%s %s $ " "$1" "$(id -un)" "$(uname -n)" "$(pwd|sed 's|'"$HOME"'|~|g')"
+(
+ save="$(stty -g)"
+ stty sane
+ tput sgr0
+# tput rmcup
+ if test "${VTE_VERSION:-0}" -ge 3405
+ then
+ printf "\x1b]7;file://%s%s\x1b\\" "$(uname)" "$(pwd)"
+ fi
+ set-title "$(printf "%s@%s:%s" "$(id -un)" "$(uname -n)" "$(pwd|sed 's|'"$HOME"'|~|g')")"
+ stty "$save"
+) > /dev/tty
+
+case "$(id -u)" in
+ 0)
+ PS='#'
+ ;;
+ *)
+ PS='$'
+esac
+
+printf "%u %s@%s:%s %c " "$1" "$(id -un)" "$(uname -n)" "$(pwd -L|sed 's|'"$HOME"'|~|g')" "$PS"
diff --git a/.local/bin/v b/.local/bin/v
index 9a5f35f..0d79e15 100755
--- a/.local/bin/v
+++ b/.local/bin/v
@@ -1,4 +1,3 @@
-#!/bin/sh --
-
-"${VISUAL:-${EDITOR:-vi}}" "$@"
+#!/bin/sh
+"${VISUAL:-vi}" "$@"
diff --git a/.local/share/flatpak/overrides/org.mozilla.firefox b/.local/share/flatpak/overrides/org.mozilla.firefox
deleted file mode 100644
index 3f5fa93..0000000
--- a/.local/share/flatpak/overrides/org.mozilla.firefox
+++ /dev/null
@@ -1,5 +0,0 @@
-[Context]
-sockets=fallback-x11;!x11
-
-[Environment]
-MOZ_ENABLE_WAYLAND=1