summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorMike Vink <ivi@vinkies.net>2025-06-17 10:09:46 +0200
committerMike Vink <ivi@vinkies.net>2025-06-17 10:09:46 +0200
commite196f039670d8fb4087d47899eed5a1f0f9128aa (patch)
tree241089fbfffd4a7c3e799c3a2ff2cbd630c8bb1a /.config
parent4c9ba1cd0cf3e0fc3653c5e0588a0a4e54f5524f (diff)
using linux again
Diffstat (limited to '.config')
-rw-r--r--.config/bash/bashrc19
-rw-r--r--.config/dunst/dunstrc27
-rw-r--r--.config/kak/autoload/files.kak63
-rw-r--r--.config/kak/kakrc2
-rw-r--r--.config/khal/config11
-rw-r--r--.config/ksh/ksh.kshrc2
-rw-r--r--.config/mimeapps.list20
-rw-r--r--.config/newsboat/urls1
-rw-r--r--.config/shell/aliasrc2
-rw-r--r--.config/shell/inputrc3
-rw-r--r--.config/shell/profile13
-rw-r--r--.config/x11/xprofile7
12 files changed, 154 insertions, 16 deletions
diff --git a/.config/bash/bashrc b/.config/bash/bashrc
index 81af60d..e520f97 100644
--- a/.config/bash/bashrc
+++ b/.config/bash/bashrc
@@ -1,7 +1,18 @@
if [ -f ~/.local.bashrc ]; then
. ~/.local.bashrc
fi
-# clear screen and save scrollback
-clear() {
- printf "\e[H\e[22J"
-}
+if [ "$TERM" != "st-256color" ]; then
+ # clear screen and save scrollback
+ clear() {
+ printf "\e[H\e[22J"
+ }
+fi
+
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc"
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
+
+export PS1='\[\e]0;\w $(test "$IN_KAKOUNE_CONNECT" && printf '%s' "- $KAKOUNE_CLIENT@[$KAKOUNE_SESSION]")$(test "$TERM" && printf '%s' "- $TERM")\a\]\n\[\e[32m\]\u@\h \e[34m$(test "$IN_KAKOUNE_CONNECT" && printf '%s' "¶$KAKOUNE_SESSION") \[\e[33m\]\w\[\e[0m\]\n\[\e[1;36;1m\]λ\[\e[0m\] '
+export PROMPT_DIRTRIM=3
+export PROMPT_COMMAND='history -a'
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc
new file mode 100644
index 0000000..f78e4d8
--- /dev/null
+++ b/.config/dunst/dunstrc
@@ -0,0 +1,27 @@
+[global]
+ monitor = 0
+ follow = keyboard
+ width = 370
+ height = (0,350)
+ offset = (0,19)
+ padding = 2
+ horizontal_padding = 2
+ transparency = 0
+ font = Monospace 12
+ format = "<b>%s</b>\n%b"
+
+[urgency_low]
+ background = "#1d2021"
+ foreground = "#928374"
+ timeout = 3
+
+[urgency_normal]
+ foreground = "#ebdbb2"
+ background = "#458588"
+ timeout = 5
+
+[urgency_critical]
+ background = "#1cc24d"
+ foreground = "#ebdbb2"
+ frame_color = "#fabd2f"
+ timeout = 10
diff --git a/.config/kak/autoload/files.kak b/.config/kak/autoload/files.kak
new file mode 100644
index 0000000..bb786e4
--- /dev/null
+++ b/.config/kak/autoload/files.kak
@@ -0,0 +1,63 @@
+map -docstring "file (default)" global goto '<a-f>' '<esc>gf'
+map -docstring "file (expanded)" global goto 'f' '<esc>: search-file %val{selection}<ret>'
+
+define-command -docstring \
+"search-file <filename>: search for file recusively under path option: %opt{path}" \
+search-file -params 1 -override %{ evaluate-commands %sh{
+ if [ -n "$(command -v fd)" ]; then # create find command template
+ find='fd -L --type f "${file}" "${path}"' # if `fd' is installed it will
+ else # be used because it is faster
+ find='find -L "${path}" -mount -type f -name "${file}"' # if not, we fallback to find.
+ fi
+
+ file=$(eval echo "$1")
+
+ eval "set -- ${kak_quoted_buflist}"
+ while [ $# -gt 0 ]; do # Check if buffer with this
+ if [ "${file}" = "$1" ]; then # file already exists. Basically
+ printf "%s\n" "buffer $1" # emulating what edit command does
+ exit
+ fi
+ shift
+ done
+
+ if [ -e "${file}" ]; then # Test if file exists under
+ printf "%s\n" "edit -existing %{${file}}" # servers' working directory
+ exit # this is last resort until
+ fi # we start recursive searchimg
+
+ # if everthing above fails - search for file under `path'
+ eval "set -- ${kak_quoted_opt_path}"
+ while [ $# -gt 0 ]; do # Since we want to check fewer places,
+ case $1 in # I've swapped ./ and %/ because
+ (./) path=${kak_buffile%/*} ;; # %/ usually has smaller scope. So
+ (%/) path=${PWD} ;; # this trick is a speedi-up hack.
+ (*) path=$1 ;; # This means that `path' option should
+ esac # first contain `./' and then `%/'
+
+ if [ -z "${file##*/*}" ] && [ -e "${path}/${file}" ]; then
+ printf "%s\n" "edit -existing %{${path}/${file}}"
+ exit
+ else
+ # build list of candidates or automatically select if only one found
+ # this doesn't support files with newlines in them unfortunately
+ IFS='
+'
+ for candidate in $(eval "${find}"); do
+ [ -n "${candidate}" ] && candidates="${candidates} %{${candidate}} %{evaluate-commands %{edit -existing %{${candidate}}}}"
+ done
+
+ # we want to get out as early as possible
+ # so if any candidate found in current cycle
+ # we prompt it in menu and exit
+ if [ -n "${candidates}" ]; then
+ printf "%s\n" "menu -auto-single ${candidates}"
+ exit
+ fi
+ fi
+
+ shift
+ done
+
+ printf "%s\n" "echo -markup %{{Error}unable to find file '${file}'}"
+}}
diff --git a/.config/kak/kakrc b/.config/kak/kakrc
index e3ba67f..9f5a6cc 100644
--- a/.config/kak/kakrc
+++ b/.config/kak/kakrc
@@ -1,6 +1,8 @@
colorscheme gruber-darker
add-highlighter global/ number-lines -relative
+hook -once global KakBegin .* %{ require-module connect }
+
set-option global toolsclient t
set-option global jumpclient j
set-option global docsclient d
diff --git a/.config/khal/config b/.config/khal/config
new file mode 100644
index 0000000..28b3b46
--- /dev/null
+++ b/.config/khal/config
@@ -0,0 +1,11 @@
+[default]
+ default_calendar = home
+[calendars]
+ [[home]]
+ path = ~/Sync/pim/home
+ color = dark green
+ priority = 20
+ [[work]]
+ path = ~/Sync/pim/work
+ color = dark cyan
+ priority = 30
diff --git a/.config/ksh/ksh.kshrc b/.config/ksh/ksh.kshrc
index c65df65..d7e9c8e 100644
--- a/.config/ksh/ksh.kshrc
+++ b/.config/ksh/ksh.kshrc
@@ -15,7 +15,7 @@ lfcd () {
fi
}
clear-screen-saving-contents-in-scrollback() {
- sh -c 'printf "\e[H\e[22J"'
+ oksh -c 'printf "\e[H\e[22J"'
}
# Loses kill buffer which is a bit sad.
bind -m ^L="^E ^A^K clear-screen-saving-contents-in-scrollback^J^Y^B^D"
diff --git a/.config/mimeapps.list b/.config/mimeapps.list
new file mode 100644
index 0000000..9124fce
--- /dev/null
+++ b/.config/mimeapps.list
@@ -0,0 +1,20 @@
+[Default Applications]
+
+# xdg-open will use these settings to determine how to open filetypes.
+# These .desktop entries can also be seen and changed in ~/.local/share/applications/
+
+text/x-shellscript=text.desktop;
+x-scheme-handler/magnet=torrent.desktop;
+application/x-bittorrent=torrent.desktop;
+x-scheme-handler/mailto=mail.desktop;
+text/plain=text.desktop;
+application/postscript=pdf.desktop;
+application/pdf=pdf.desktop;
+image/png=img.desktop;
+image/jpeg=img.desktop;
+image/gif=img.desktop;
+application/rss+xml=rss.desktop
+video/x-matroska=video.desktop
+video/mp4=video.desktop
+x-scheme-handler/lbry=lbry.desktop
+inode/directory=file.desktop
diff --git a/.config/newsboat/urls b/.config/newsboat/urls
index e69de29..c869c39 100644
--- a/.config/newsboat/urls
+++ b/.config/newsboat/urls
@@ -0,0 +1 @@
+https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
index 480d532..db026ab 100644
--- a/.config/shell/aliasrc
+++ b/.config/shell/aliasrc
@@ -5,8 +5,6 @@ alias s="{ git status --short ; git log --oneline @{push}.. ; }"
alias ga="git add "
alias gc="git commit "
alias d="docker "
-# alias k="kak "
alias d=' echo cd $PWD | kak -p s; eval "[ -n \"$(jobs)\" ] && fg" '
alias b=' eval "$(cd-kak-buf)"'
-alias e='$EDITOR '
alias z='zathura '
diff --git a/.config/shell/inputrc b/.config/shell/inputrc
index 9119437..e13e65f 100644
--- a/.config/shell/inputrc
+++ b/.config/shell/inputrc
@@ -1,8 +1,9 @@
+$include /etc/inputrc
set bind-tty-special-chars off
set show-all-if-ambiguous on
set menu-complete-display-prefix on
set colored-completion-prefix on
-set colored-stats on
+set colored-stats off
# next tab(s) will cycle through matches
TAB: menu-complete
diff --git a/.config/shell/profile b/.config/shell/profile
index 39f2ebd..ad92573 100644
--- a/.config/shell/profile
+++ b/.config/shell/profile
@@ -3,19 +3,22 @@ export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
export PASSWORD_STORE_DIR=$HOME/.local/share/password-store
+export PASSWORD_STORE_GPG_OPTS="--no-throw-keyids"
if ! [ -d "${XDG_RUNTIME_DIR}" ] && [ "$(uname -s)" = "Linux" ]
then d="/run/user/$(id -u)"
if command -v sudo >/dev/null 2>&1; then
- mkdir -p "$d"
- chown -R "$USER:$USER" "$d"
- chmod 700 "$d"
+ sudo mkdir -p "$d"
+ sudo chown -R "$USER:$USER" "$d"
+ sudo chmod 700 "$d"
export XDG_RUNTIME_DIR="$d"
fi
fi
-export EDITOR="cs"
-export GIT_EDITOR="kak "
+export TERMINAL="st"
+export EDITOR="e"
+export GIT_EDITOR="kak"
+export BROWSER="firefox"
export PATH="$PATH:$HOME/go/bin:/usr/local/go/bin"
export PATH="$HOME/.local/bin:$PATH"
diff --git a/.config/x11/xprofile b/.config/x11/xprofile
index 588f9dd..ec24fe3 100644
--- a/.config/x11/xprofile
+++ b/.config/x11/xprofile
@@ -7,19 +7,20 @@ xrandr --dpi 96 # Set DPI. User may want to use a larger number for larger scre
# setbg & # set the background with the `setbg` script
#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
-autostart="mpd xcompmgr dunst pipewire" # remapd, doesn't work that well with usb hubs.
+autostart="mpd xcompmgr dunst pipewire remaps" # remapd, doesn't work that well with usb hubs.
for program in $autostart; do
pidof -sx "$program" || "$program" &
done >/dev/null 2>&1
+pidof -sx "redshift" || redshift -x -l 52.30487057853634:4.764923605516801 -b 1.0:0.8 &
pidof -sx "unclutter" || unclutter -noevents &
# Starts a gpg-agents and configures it as ssh-agent.
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
-gpgconf --launch gpg-agent
-gpg-connect-agent updatestartuptty /bye > /dev/null
+gpgconf --launch gpg-agent &
+gpg-connect-agent updatestartuptty /bye > /dev/null &
# Ensure that xrdb has finished running before moving on to start the WM/DE.
[ -n "$xrdbpid" ] && wait "$xrdbpid"