summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rwxr-xr-x.config/mpd/mpd.conf12
-rw-r--r--.config/shell/aliasrc99
-rw-r--r--.config/shell/profile30
-rw-r--r--.config/starship/starship.toml48
-rw-r--r--.config/tmux/tmux.conf41
-rw-r--r--.config/wireplumber/main.lua.d/51-camera-microphone-input-rename.lua13
-rw-r--r--.config/wireplumber/main.lua.d/51-soundblaster-output-rename.lua14
-rw-r--r--.config/wireplumber/main.lua.d/51-starshipmatisse-output-rename.lua14
-rw-r--r--.config/wireplumber/main.lua.d/52-hdmi-card-disable.lua12
-rw-r--r--.config/wireplumber/main.lua.d/52-soundblaster-input-disable.lua12
-rw-r--r--.config/wireplumber/main.lua.d/52-starshipmatisse-input-disable.lua12
-rw-r--r--.config/x11/xinitrc26
-rw-r--r--.config/zathura/zathurarc15
-rw-r--r--.config/zsh/.zshrc112
14 files changed, 406 insertions, 54 deletions
diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf
index afdcb5a..1b10341 100755
--- a/.config/mpd/mpd.conf
+++ b/.config/mpd/mpd.conf
@@ -1,15 +1,15 @@
-bind_to_address "127.0.0.1"
+bind_to_address "0.0.0.0"
#bind_to_address "/run/mpd/socket"
music_directory "/hdd/music"
playlist_directory "~/.config/mpd/playlists"
-db_file "~/.config/mpd/database"
-log_file "~/.config/mpd/log"
-pid_file "~/.config/mpd/pid"
-state_file "~/.config/mpd/mpdstate"
+db_file "~/.config/mpd/database"
+log_file "~/.config/mpd/log"
+pid_file "~/.config/mpd/pid"
+state_file "~/.config/mpd/mpdstate"
audio_output {
- type "pulse"
+ type "pipewire"
name "Default"
# sink "alsa_output.pci-0000_29_00.0.analog-stereo"
}
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
new file mode 100644
index 0000000..63b4434
--- /dev/null
+++ b/.config/shell/aliasrc
@@ -0,0 +1,99 @@
+## MISCELLANEOUS
+
+# various shortcuts
+alias reboot='sudo openrc-shutdown -r'
+alias poweroff='sudo openrc-shutdown -p'
+alias pms='sudo pm-suspend'
+alias refresh='source $ZDOTDIR/.zshrc'
+alias fuck='sudo $(fc -Lln -1)'
+alias open='xdg-open'
+alias mutt='pushd ~/.mutt/attachments; mutt; popd'
+alias jpwine='LANG=ja_JP.UTF-8 WINEDEBUG=-all wine'
+alias emacsd='/usr/local/bin/emacs --daemon'
+alias e="$EDITOR"
+alias z='zathura'
+alias cn='clear;macchina'
+alias nnn='nnn -Hde'
+alias freyr='sudo docker run -it --rm -v /hdd/music:/data freyrcli/freyrjs'
+
+# cp mv and rm always verbose
+alias cp='cp -iv'
+alias mv='mv -iv'
+alias rm='rm -Iv'
+alias mkd='mkdir -pv'
+
+# Colorize grep output
+alias grep='grep --color=auto -i'
+
+# color ls, always full info and human readable; group dirs
+alias ls='ls -hl --color=always --group-directories-first'
+alias la='ls -a'
+
+# Control Audio
+alias headset="wpctl set-default $(wpctl status | grep 'Headphones' | cut -b11-12)"
+alias speakers="wpctl set-default $(wpctl status | grep 'Speakers' | cut -b11-12)"
+alias setvol='pactl set-sink-volume @DEFAULT_SINK@'
+
+# Monitor / Resolution settings, mainly for playing old-ass games
+alias setrmon-lowres='xrandr --auto --output HDMI-A-0 --mode 640x480 --primary'
+alias setrmon-midres='xrandr --auto --output HDMI-A-0 --mode 800x600 --primary'
+alias setrmon-default='xrandr --auto --output HDMI-A-0 --mode 1920x1080 --primary'
+alias setlmon-lowres='xrandr --auto --output DisplayPort-2 --mode 640x480 --left-of HDMI-A-0'
+alias setlmon-midres='xrandr --auto --output DisplayPort-2 --mode 800x600 --left-of HDMI-A-0'
+alias setlmon-default='xrandr --auto --output DisplayPort-2 --mode 1600x900 --left-of HDMI-A-0'
+
+## FUNCTIONS FOR CONVERTING DATE TO ISO 8601
+
+# convert date from YYYYMMDD to YYYY-MM-DD
+date-convert() {
+ for i in *; do
+ mv "${i}" "$(echo "${i}" |
+ sed 's/\([0-9][0-9][0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)/\1-\2-\3/')"
+ done;
+}
+
+# reverse date from DD-MM-YYYY to YYYY-MM-DD
+date-reverse() {
+ for i in *; do
+ mv "${i}" "$(echo "${i}" |
+ sed 's/\([0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9][0-9][0-9]\)/\3-\1-\2/')"
+ done;
+}
+
+## DOWNLOADING AND CONVERTING VIDEO
+
+# shortcuts for most used yt-dlp settings
+alias ytvid='yt-dlp -o "/hdd/vids/random/%(title)s.%(ext)s" --remux-video "mkv"'
+alias ytarchive='yt-dlp -o "/hdd/vids/archives/%(uploader)s/%(upload_date)s - %(title)s/%(title)s.%(ext)s" --remux-video "mkv"'
+
+# convert video files to webm
+mkwebm() {
+ ffmpeg -i "${1}" -crf 1 -b:v 1M -c:a libvorbis "${1%.*}".webm
+}
+
+## GIT
+
+# general shortcuts
+alias commit='git commit -m'
+alias fetch='git fetch'
+alias upstream='git push --set-upstream origin'
+alias remote='git remote add origin'
+alias pull='git pull origin'
+alias push='git push origin'
+
+# shortcut for dotfiles repo
+alias dfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
+alias dcomm='dfiles commit -m'
+alias dpush='dfiles push origin'
+
+## PACKAGE MANAGER
+
+alias aptin='sudo apt install'
+alias aptup='sudo apt update && sudo apt upgrade'
+alias aptupd='sudo apt update'
+alias aptupg='sudo apt upgrade'
+alias aptrm='sudo apt remove'
+alias aptsr='sudo apt search'
+alias aptsh='sudo apt show'
+alias listup='sudo apt list --upgradeable'
+alias listin='sudo apt list --installed'
diff --git a/.config/shell/profile b/.config/shell/profile
new file mode 100644
index 0000000..da7ff8f
--- /dev/null
+++ b/.config/shell/profile
@@ -0,0 +1,30 @@
+umask 0077
+
+export _JAVA_AWT_WM_NONREPARENTING=1
+export EDITOR="emacsclient -t"
+export TERMINAL="st"
+export BROWSER="firefox"
+
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_CACHE_HOME="$HOME/.cache"
+
+export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
+export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
+
+export LC_ALL=en_US.UTF-8
+
+export STARSHIP_CONFIG=~/.config/starship/starship.toml
+export MAIL=~/.mutt/Maildir
+export NO_AT_BRIDGE=1
+
+export GTK_IM_MODULE='ibus'
+export QT_IM_MODULE='ibus'
+export XMODIFIERS='@im=ibus'
+export XDG_SESSION_TYPE='x11'
+
+export PATH="$PATH:$HOME/.local/bin:$HOME/.fzf/bin:$HOME/.cargo/bin:/sbin:/usr/sbin"
+
+# if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
+# exec startx
+# fi
diff --git a/.config/starship/starship.toml b/.config/starship/starship.toml
deleted file mode 100644
index 63ba159..0000000
--- a/.config/starship/starship.toml
+++ /dev/null
@@ -1,48 +0,0 @@
-format = """
-[](#CA5FCA)\
-$username\
-[](fg:#CA5FCA bg:#A92BA9 )\
-$directory\
-[](fg:#A92BA9 bg:#DC317D)\
-$git_branch\
-$git_status\
-[ ](fg:#DC317D)\
-"""
-
-# Disable the blank line at the start of the prompt
-# add_newline = false
-
-# You can also replace your username with a neat symbol like  to save some space
-[username]
-show_always = true
-style_user = "fg:#FFFFFF bg:#CA5FCA"
-style_root = "bg:#9A348E"
-format = '[$user ]($style)'
-
-[directory]
-style = "fg:#FFFFFF bg:#A92BA9"
-format = "[ $path ]($style)"
-truncation_length = 3
-truncation_symbol = "…/"
-
-# Here is how you can shorten some long paths by text replacement
-# similar to mapped_locations in Oh My Posh:
-[directory.substitutions]
-"Documents" = " "
-"Downloads" = " "
-"Music" = " "
-"Pictures" = " "
-# Keep in mind that the order matters. For example:
-# "Important Documents" = "  "
-# will not be replaced, because "Documents" was already substituted before.
-# So either put "Important Documents" before "Documents" or use the substituted version:
-# "Important  " = "  "
-
-[git_branch]
-symbol = ""
-style = "fg:#FFFFFF bg:#DC317D"
-format = '[ $symbol $branch ]($style)'
-
-[git_status]
-style = "fg:#FFFFFF bg:#DC317D"
-format = '[$all_status$ahead_behind ]($style)'
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
new file mode 100644
index 0000000..1db3b54
--- /dev/null
+++ b/.config/tmux/tmux.conf
@@ -0,0 +1,41 @@
+# Status-bar settings
+set -g status-right "%H:%M"
+set -g window-status-current-style "underscore"
+set -g message-command-style 'fg=#000000,bg=#FFFF00'
+set -g message-style 'fg=#000000, bg=#FFFF00'
+set -g status-bg '#333333'
+set -g status-fg '#FFFFFF'
+set -g set-titles on
+set -g set-titles-string "#T"
+
+# Enable RGB colour if running in xterm(1)
+set-option -sa terminal-overrides ",xterm*:Tc"
+
+# Change the default $TERM to tmux-256color
+set -g default-terminal "tmux-256color"
+
+# Set history-limit
+set -g history-limit 30000
+
+## KEYBINDS
+
+# Change the prefix key to C-a
+set -g prefix C-a
+unbind C-b
+bind C-a send-prefix
+
+bind C-v split-window -v # split vertically
+bind C-h split-window -h # split horizontally
+bind C-w killp # kill pane
+bind C-q killw # kill window
+bind -n M-h select-pane -L
+bind -n M-l select-pane -R
+bind -n M-k select-pane -U
+bind -n M-j select-pane -D
+
+# Turn the mouse on, but without copy mode dragging
+set -g mouse off
+
+# Keys to toggle monitoring activity in a window and the synchronize-panes option
+bind m set monitor-activity
+bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
diff --git a/.config/wireplumber/main.lua.d/51-camera-microphone-input-rename.lua b/.config/wireplumber/main.lua.d/51-camera-microphone-input-rename.lua
new file mode 100644
index 0000000..c7db70e
--- /dev/null
+++ b/.config/wireplumber/main.lua.d/51-camera-microphone-input-rename.lua
@@ -0,0 +1,13 @@
+rule = {
+ matches = {
+ {
+ { "node.name", "equals", "alsa_input.usb-SunplusIT_Inc_FHD_Camera_Microphone_01.00.00-02.analog-stereo"},
+ },
+ },
+ apply_properties = {
+ ["node.description"] = "Camera Microphone",
+ ["node.nick"] = "Camera Microphone",
+ },
+}
+
+table.insert(alsa_monitor.rules,rule)
diff --git a/.config/wireplumber/main.lua.d/51-soundblaster-output-rename.lua b/.config/wireplumber/main.lua.d/51-soundblaster-output-rename.lua
new file mode 100644
index 0000000..cb5d4a3
--- /dev/null
+++ b/.config/wireplumber/main.lua.d/51-soundblaster-output-rename.lua
@@ -0,0 +1,14 @@
+rule = {
+ matches = {
+ {
+ { "node.name", "equals", "alsa_output.pci-0000_29_00.0.analog-stereo"},
+ },
+ },
+
+ apply_properties = {
+ ["node.description"] = "Headphones",
+ ["node.nick"] = "Headphones",
+ },
+}
+
+table.insert(alsa_monitor.rules,rule)
diff --git a/.config/wireplumber/main.lua.d/51-starshipmatisse-output-rename.lua b/.config/wireplumber/main.lua.d/51-starshipmatisse-output-rename.lua
new file mode 100644
index 0000000..0a3c278
--- /dev/null
+++ b/.config/wireplumber/main.lua.d/51-starshipmatisse-output-rename.lua
@@ -0,0 +1,14 @@
+rule = {
+ matches = {
+ {
+ { "node.name", "equals", "alsa_output.pci-0000_31_00.4.analog-stereo"},
+ },
+ },
+
+ apply_properties = {
+ ["node.description"] = "Speakers",
+ ["node.nick"] = "Speakers",
+ },
+}
+
+table.insert(alsa_monitor.rules,rule)
diff --git a/.config/wireplumber/main.lua.d/52-hdmi-card-disable.lua b/.config/wireplumber/main.lua.d/52-hdmi-card-disable.lua
new file mode 100644
index 0000000..63eb9e4
--- /dev/null
+++ b/.config/wireplumber/main.lua.d/52-hdmi-card-disable.lua
@@ -0,0 +1,12 @@
+rule = {
+ matches = {
+ {
+ { "device.name", "equals", "alsa_card.pci-0000_2f_00.1"},
+ },
+ },
+ apply_properties = {
+ ["device.disabled"] = true,
+ },
+}
+
+table.insert(alsa_monitor.rules,rule)
diff --git a/.config/wireplumber/main.lua.d/52-soundblaster-input-disable.lua b/.config/wireplumber/main.lua.d/52-soundblaster-input-disable.lua
new file mode 100644
index 0000000..825c7d9
--- /dev/null
+++ b/.config/wireplumber/main.lua.d/52-soundblaster-input-disable.lua
@@ -0,0 +1,12 @@
+rule = {
+ matches = {
+ {
+ { "node.name", "equals", "alsa_input.pci-0000_29_00.0.analog-stereo"},
+ },
+ },
+ apply_properties = {
+ ["node.disabled"] = true,
+ },
+}
+
+table.insert(alsa_monitor.rules,rule)
diff --git a/.config/wireplumber/main.lua.d/52-starshipmatisse-input-disable.lua b/.config/wireplumber/main.lua.d/52-starshipmatisse-input-disable.lua
new file mode 100644
index 0000000..51edd83
--- /dev/null
+++ b/.config/wireplumber/main.lua.d/52-starshipmatisse-input-disable.lua
@@ -0,0 +1,12 @@
+rule = {
+ matches = {
+ {
+ { "node.name", "equals", "alsa_input.pci-0000_31_00.4.analog-stereo"},
+ },
+ },
+ apply_properties = {
+ ["node.disabled"] = true,
+ },
+}
+
+table.insert(alsa_monitor.rules,rule)
diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc
new file mode 100644
index 0000000..cbaec52
--- /dev/null
+++ b/.config/x11/xinitrc
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+rfkill block all
+
+eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")"
+eval "$(ssh-agent)"
+
+xset r rate 300 30
+xset s off -dpms
+setxkbmap -option "ctrl:nocaps"
+
+xrandr --auto --output HDMI-A-0 --mode 1920x1080 --primary
+xrandr --auto --output DisplayPort-2 --mode 1600x900 --left-of HDMI-A-0
+
+dbus-launch --sh-syntax --exit-with-session
+
+ibus-daemon -dxrR
+statusbar &
+pipewire &
+mpd &
+/usr/local/bin/emacs --daemon &
+picom &
+set-wallpaper &
+
+exec dwm >/dev/null 2>&1
+
diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc
new file mode 100644
index 0000000..452e116
--- /dev/null
+++ b/.config/zathura/zathurarc
@@ -0,0 +1,15 @@
+set sandbox none
+set statusbar-h-padding 0
+set statusbar-v-padding 0
+set page-padding 1
+set selection-clipboard clipboard
+map u scroll half-up
+map d scroll half-down
+map D toggle_page_mode
+map r reload
+map R rotate
+map K zoom in
+map J zoom out
+map i recolor
+map p print
+map g goto top
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
new file mode 100644
index 0000000..ec2f9e0
--- /dev/null
+++ b/.config/zsh/.zshrc
@@ -0,0 +1,112 @@
+autoload -U colors && colors
+
+# PS1="%B%{$fg[red]%}[%{$fg[magenta]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[yellow]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
+
+stty stop undef
+
+autoload -U compinit
+zstyle ':completion:*' menu select
+zmodload zsh/complist
+compinit
+_comp_options+=(globdots)
+
+# vi mode
+setopt PROMPT_SUBST
+
+THEME_VI_INS_MODE_SYMBOL=${THEME_VI_INS_MODE_SYMBOL:-'λ'}
+THEME_VI_CMD_MODE_SYMBOL=${THEME_VI_CMD_MODE_SYMBOL:-'ᐅ'}
+
+THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
+
+bindkey -v
+export KEYTIMEOUT=1
+
+# Use vim keys in tab complete menu:
+bindkey -M menuselect 'h' vi-backward-char
+bindkey -M menuselect 'k' vi-up-line-or-history
+bindkey -M menuselect 'l' vi-forward-char
+bindkey -M menuselect 'j' vi-down-line-or-history
+bindkey -v '^?' backward-delete-char
+
+bindkey '^a' vi-beginning-of-line
+bindkey '^e' vi-end-of-line
+
+zle-keymap-select() {
+ if [ "${KEYMAP}" = 'vicmd' ]; then
+ THEME_VI_MODE_SYMBOL="${THEME_VI_CMD_MODE_SYMBOL}"
+ else
+ THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
+ fi
+ zle reset-prompt
+}
+zle -N zle-keymap-select
+
+# reset to default mode at the end of line input reading
+zle-line-finish() {
+ THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
+}
+zle -N zle-line-finish
+
+# Fix a bug when you C-c in CMD mode, you'd be prompted with CMD mode indicator
+# while in fact you would be in INS mode.
+# Fixed by catching SIGINT (C-c), set mode to INS and repropagate the SIGINT,
+# so if anything else depends on it, we will not break it.
+TRAPINT() {
+ THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
+ return $(( 128 + $1 ))
+}
+
+PROMPT='%B%{$fg[red]%}[%{$fg[magenta]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[yellow]%}%~%{$fg[red]%}]%{$reset_color%}%b %(?.%F{green}$THEME_VI_MODE_SYMBOL.%F{red}$THEME_VI_MODE_SYMBOL) '
+
+setopt extendedGlob
+
+HISTFILE=$ZDOTDIR/.zsh_history
+HISTSIZE='2000'
+SAVEHIST='1000'
+
+# ignore duplicate in history
+setopt hist_expire_dups_first
+setopt hist_ignore_dups
+setopt hist_ignore_all_dups
+setopt hist_find_no_dups
+setopt hist_save_no_dups
+
+DIRSTACKFILE="${XDG_CACHE_HOME/.cache}/zsh/dirs"
+if [[ -f "$DIRSTACKFILE" ]] && (( ${#dirstack} == 0 )); then
+ dirstack=("${(@f)"$(< "$DIRSTACKFILE")"}")
+ [[ -d "${dirstack[1]}" ]] && cd -- "${dirstack[1]}"
+fi
+
+DIRSTACKSIZE='20'
+
+setopt auto_pushd
+setopt pushd_silent
+setopt pushd_ignore_dups
+setopt pushd_minus
+
+macchina
+
+if [ -f $XDG_CONFIG_HOME/.dircolors ]; then
+ eval "$(dircolors -b $XDG_CONFIG_HOME/.dircolors)"
+fi
+
+if [ -f $XDG_CONFIG_HOME/shell/aliasrc ]; then
+ . $XDG_CONFIG_HOME/shell/aliasrc
+fi
+
+if [ -f $HOME/.fzf/fzf.zsh ]; then
+ . $HOME/.fzf/fzf.zsh
+fi
+
+export FZF_DEFAULT_OPS="--extended"
+export FZF_DEFAULT_COMMAND="fdfind --type f"
+export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
+
+# NNN
+if [ -f $XDG_CONFIG_HOME/nnn/nnn.bash ]; then
+ . $XDG_CONFIG_HOME/nnn/nnn.bash
+fi
+
+if [ -f $XDG_DATA_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
+ . $XDG_DATA_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+fi