summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcellus <msimon_fr@hotmail.com>2023-05-10 20:34:08 +0200
committermarcellus <msimon_fr@hotmail.com>2023-05-10 20:34:08 +0200
commite3ac37b99035567aedbb6d44a1151049a572f9ee (patch)
treef2f752bea41ebd704db2e932152d913771aaa766
parent8ce30a9db3677de3f90c3f404bb6c93a4f64936a (diff)
fix: minor changes
-rw-r--r--.gitignore1
-rw-r--r--dwmblocks/config2
-rw-r--r--htop/htoprc8
-rw-r--r--mpv/mpv.conf1
-rwxr-xr-xscripts/dmenusearch100
-rw-r--r--sxhkd/sxhkdrc4
-rw-r--r--zsh/.zshenv2
-rw-r--r--zsh/.zshrc1
8 files changed, 112 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 6b195dd..436061f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ JetBrains/
discord/
github-copilot/
gtk-3.0/
+gtk-2.0/
procps/
dconf/
Tracktion/
diff --git a/dwmblocks/config b/dwmblocks/config
index 613e2de..ad869c2 100644
--- a/dwmblocks/config
+++ b/dwmblocks/config
@@ -1,6 +1,6 @@
/*Name State Update Signal + 34*/
music = true // 35
-cputemp = false // 36
+cputemp = true // 36
fanspeed = false // 37
memory = false // 38
battery = true // 39
diff --git a/htop/htoprc b/htop/htoprc
index d23d23f..21bd0a1 100644
--- a/htop/htoprc
+++ b/htop/htoprc
@@ -40,18 +40,18 @@ column_meters_1=Tasks LoadAverage Uptime
column_meter_modes_1=2 2 2
tree_view=1
sort_key=46
-tree_sort_key=49
+tree_sort_key=1
sort_direction=-1
-tree_sort_direction=-1
+tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
-.tree_sort_key=TIME
+.tree_sort_key=Command
.tree_view=1
.tree_view_always_by_pid=0
.sort_direction=-1
-.tree_sort_direction=-1
+.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
.sort_key=IO_RATE
diff --git a/mpv/mpv.conf b/mpv/mpv.conf
new file mode 100644
index 0000000..f7d945c
--- /dev/null
+++ b/mpv/mpv.conf
@@ -0,0 +1 @@
+stop-screensaver = "no" \ No newline at end of file
diff --git a/scripts/dmenusearch b/scripts/dmenusearch
new file mode 100755
index 0000000..b1ed9d6
--- /dev/null
+++ b/scripts/dmenusearch
@@ -0,0 +1,100 @@
+#!/bin/sh
+# search web, arch wiki, aur, youtube man pages or emoji with dmenu
+# websearch dependencies : shuf, curl, /tmp needs to be temporary
+# wiki dependency: arch-wiki-docs
+# youtube dependency: ytfzf
+# man dependencies: man-db, zathura
+# emoji dependency: xclip
+
+set -e
+
+web() {
+ NETWORK=clearnet # clearnet, tor or i2p
+ if [ ! -f "/tmp/instances" ]; then
+ curl -s "https://librex.ratakor.com/instances.json" > /tmp/instances.json ||
+ (notify-send "No internet connection"; exit 1)
+
+ strip() {
+ tmp="${1##" \"$NETWORK\": \""}"
+ printf '%s\n' "${tmp%%"\","}"
+ }
+
+ while IFS= read -r line || [ -n "$line" ]; do
+ case $line in
+ *"$NETWORK"*null,)
+ continue ;;
+ *"$NETWORK"*)
+ strip "$line" >> /tmp/instances ;;
+ esac
+ done < /tmp/instances.json
+ fi
+
+ instance="$(shuf -n 1 /tmp/instances)"
+ query="${instance}search.php?q=${1:-$(printf "" | dmenu -p "Search:" -l 0)}&t=0"
+}
+
+wiki() {
+ WIKIDIR="/usr/share/doc/arch-wiki/html/en"
+
+ strip() {
+ tmp="${1##"$WIKIDIR/"}"
+ printf '\n%s' "${tmp%%".html"}"
+ }
+
+ for file in "$WIKIDIR"/*.html; do
+ [ -f "$file" ] || continue
+ wikidocs="$wikidocs$(strip "$file")"
+ done
+
+ wikidocs="${wikidocs#*
+}" # remove a trailing newline
+
+ query="$WIKIDIR/$(printf '%s\n' "$wikidocs" | sed -e 's/_/ /g' | sort |\
+ dmenu -i -l 10 -p 'Search Wiki: ').html"
+ query="$(printf '%s\n' "$query" | sed 's/ /_/g')" # separate otherwise set -e fails
+}
+
+aur() {
+ AURSITE="https://aur.archlinux.org/packages?O=0&K="
+ query="$AURSITE$(printf "" | dmenu -p "AUR:" -l 0)"
+}
+
+manpdf() {
+ INPUT=${1:-$(/usr/bin/man -k . | dmenu -i -l 20 | awk '{print $1}')}
+ [ -n "$INPUT" ] && /usr/bin/man -Tpdf "$INPUT" | zathura -
+}
+
+emoji() {
+ CHOSEN=$(cut -d ';' -f1 "$XDG_DATA_HOME/emoji" | dmenu -i -l 30 | sed "s/ .*//")
+
+ [ -z "$CHOSEN" ] && return 1
+
+ printf '%s' "$CHOSEN" | xclip -selection clipboard
+ # notify-send "'$CHOSEN' copied to clipboard."
+}
+
+main() {
+ case ${1:-$(printf 'web\naur\nyoutube\nman\nemoji' | dmenu -i)} in
+ web)
+ web "$2" ;;
+ #wiki)
+ # wiki ;;
+ aur)
+ aur ;;
+ youtube)
+ ytfzf -D
+ return ;;
+ man)
+ manpdf "$2"
+ return ;;
+ emoji)
+ emoji
+ return ;;
+ *)
+ return 1 ;;
+ esac
+
+ "$BROWSER" "$query" 2> /dev/null
+}
+
+main "$@" \ No newline at end of file
diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc
index 199ad3c..97e3410 100644
--- a/sxhkd/sxhkdrc
+++ b/sxhkd/sxhkdrc
@@ -15,8 +15,8 @@ XF86AudioLowerVolume
pamixer -d 5; kill -44 $(pidof dwmblocks)
XF86AudioMute
pamixer -t; kill
-{F7,super + n,super + shift + n}
- $TERMINAL -e {dmenurecord,lfub "$XDG_DATA_HOME/notes",newsboat}
+{super + n,super + shift + n}
+ $TERMINAL -e {lfub "$XDG_DATA_HOME/notes",newsboat}
super + m
music
super + shift + m
diff --git a/zsh/.zshenv b/zsh/.zshenv
index c168554..d0d02ef 100644
--- a/zsh/.zshenv
+++ b/zsh/.zshenv
@@ -1,5 +1,7 @@
export PATH="$HOME/.config/scripts:$PATH"
export TERMINAL="st"
export EDITOR="emacs"
+export BROWSER="librewolf"
export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/data"
diff --git a/zsh/.zshrc b/zsh/.zshrc
index f8c830d..efbfb96 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -22,6 +22,7 @@ alias ascii="ascii -d"
alias cf="$HOME/.config/"
alias cspt="$HOME/.config/scripts"
alias cz="$HOME/.config/zsh"
+alias gs="git status"
autoload -U compinit
zstyle ':completion:*' menu select