diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-11 21:32:12 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-11 21:32:12 +0200 |
commit | a58ae56e98a8d9fcbe7fc7beaa976a4d164ee99a (patch) | |
tree | 0b2eb4aea4d26aa914646d211b8cd2be6442fe15 | |
parent | 38a8137b2c3e3d62919cfe105b50c2c361b68554 (diff) | |
parent | aa4bdbfc369db3174d39bacc6b26a593a9ec3376 (diff) |
Merge branch 'main' of https://git.kallipso.be/dotfiles
-rw-r--r-- | .gitignore | 7 | ||||
-rwxr-xr-x | bin/common/drop_cache | 8 | ||||
-rwxr-xr-x | bin/serverscripts/cfdnsreq | 13 | ||||
-rw-r--r-- | config/common/btop/btop.conf | 2 | ||||
-rw-r--r-- | config/common/newsboat/urls | 41 | ||||
-rw-r--r-- | config/essentials/nvim/after/plugin/luasnip.lua | 10 | ||||
-rw-r--r-- | config/essentials/nvim/after/plugin/treesitter.lua | 2 | ||||
-rw-r--r-- | config/essentials/zsh/.zshrc | 2 | ||||
-rw-r--r-- | config/essentials/zsh/aliases.zsh | 8 | ||||
-rw-r--r-- | config/essentials/zsh/functions.zsh | 25 | ||||
-rw-r--r-- | config/home/.zshenv | 19 | ||||
-rw-r--r-- | config/hyprland/foot/foot.ini | 2 | ||||
-rw-r--r-- | config/hyprland/hypr/binds.conf | 1 | ||||
-rw-r--r-- | config/hyprland/hypr/env.conf | 11 | ||||
-rw-r--r-- | config/hyprland/tofi/themes/nord | 48 |
15 files changed, 98 insertions, 101 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e42516 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +config/essentials/zsh/.zcompdump +config/essentials/zsh/histfile +config/essentials/gnupg/* +config/X/mpv/watch_later/* +config/common/mpd/database +config/essentials/nvim/plugin/ +config/common/newsboat/urls diff --git a/bin/common/drop_cache b/bin/common/drop_cache new file mode 100755 index 0000000..4833597 --- /dev/null +++ b/bin/common/drop_cache @@ -0,0 +1,8 @@ +#!/bin/sh +if [ "$(id -u)" -ne 0 ] +then + echo "Please run as root." + exit 1 +fi +echo 3 | tee /proc/sys/vm/drop_caches >/dev/null +echo "cache cleared." diff --git a/bin/serverscripts/cfdnsreq b/bin/serverscripts/cfdnsreq new file mode 100755 index 0000000..a380654 --- /dev/null +++ b/bin/serverscripts/cfdnsreq @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ $# -eq 0 ] +then + echo "no domain provided." + exit 1 +fi + +certbot certonly \ + --dns-cloudflare \ + --dns-cloudflare-credentials ~/.secrets/cloudflare.ini \ + -m raymaekers.luca@gmail.com \ + -d $1 diff --git a/config/common/btop/btop.conf b/config/common/btop/btop.conf index 225d657..81ab72c 100644 --- a/config/common/btop/btop.conf +++ b/config/common/btop/btop.conf @@ -60,7 +60,7 @@ proc_sorting = "memory" proc_reversed = False #* Show processes as a tree. -proc_tree = False +proc_tree = True #* Use the cpu graph colors in the process list. proc_colors = True diff --git a/config/common/newsboat/urls b/config/common/newsboat/urls deleted file mode 100644 index 4945a44..0000000 --- a/config/common/newsboat/urls +++ /dev/null @@ -1,41 +0,0 @@ -"---BLOGS---" -https://arthurmelton.com/blogs.rss -"---NEWS---" -https://rss.rtbf.be/article/rss/highlight_rtbf_info.xml?source=internal -"---LINUX---" -https://www.linuxjournal.com/node/feed -https://hackaday.com/blog/feed/ -https://thisweek.gnome.org/index.xml -https://itsfoss.com/rss -https://archlinux.org/feeds/news/ -https://www.hln.be/home/rss.xml -https://suckless.org/atom.xml -"---VIDEOS---" -https://www.youtube.com/feeds/videos.xml?channel_id=UCngn7SVujlvskHRvRKc1cTw # Bugswrite -https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg # Distrotube -https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA # Fireship -https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA # Luke Smith -https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA # Mental Outlaw -https://www.youtube.com/feeds/videos.xml?channel_id=UC5UAwBUum7CPN5buc-_N1Fw # The Linux Experiment -https://www.youtube.com/feeds/videos.xml?channel_id=UCbTp1BYjpuhDRG5OmgIT8iw # James Tomsaino -https://www.youtube.com/feeds/videos.xml?channel_id=UC_ML5xP23TOWKUcc-oAE_Eg # Hussein Nasser -https://www.youtube.com/feeds/videos.xml?channel_id=UCd3dNckv1Za2coSaHGHl5aA # TJ De vries -https://www.youtube.com/feeds/videos.xml?channel_id=UCaSCt8s_4nfkRglWCvNSDrg # Code Aesthetic -https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA # Brodie Robertson -http://vimcasts.org/feeds/ogg.rss -"---REDDIT---" -https://www.reddit.com/r/linux.rss -https://www.reddit.com/r/danklinuxusers.rss -# Missing github feed -"---MUSIC---" -https://mastodonmusic.social/@djomnimaga.rss -"---REPOS---" -https://code.cronyakatsuki.xyz/crony/UpFast.atom -https://github.com/vim/vim/releases.atom -https://github.com/neovim/neovim/releases.atom -https://github.com/yt-dlp/yt-dlp/releases.atom -https://github.com/hrsh7th/nvim-cmp/releases.atom -https://github.com/L3MON4D3/LuaSnip/releases.atom -https://github.com/alacritty/alacritty/releases.atom -https://github.com/umlaeute/v4l2loopback/releases.atom -https://github.com/MultiMC/Launcher/releases.atom diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index 2f3f620..75e139b 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -130,7 +130,15 @@ ls.add_snippets("java", { }) ls.add_snippets("sh", { - parse("fn", "function $1 {\n\t$2\n}$0", {}) + parse("fn", "$1 ()\n{\n\t$2\n}$0", {}), + parse("fdie", + [[ + die () + { + echo "\$1" >&2 + } + ]], {}), + parse("die", "die \"$1\"$0", {}), }) ls.add_snippets("javascript", { diff --git a/config/essentials/nvim/after/plugin/treesitter.lua b/config/essentials/nvim/after/plugin/treesitter.lua index 9b1a0a9..e18368e 100644 --- a/config/essentials/nvim/after/plugin/treesitter.lua +++ b/config/essentials/nvim/after/plugin/treesitter.lua @@ -1,5 +1,5 @@ require'nvim-treesitter.configs'.setup { - ensure_installed = { "c", "lua", "vim", "help", "diff"}, + ensure_installed = { "c", "lua", "vim", "diff"}, sync_install = false, auto_install = true, diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index ed9c8ec..279c07b 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -1,6 +1,6 @@ #!/bin/zsh -if [ "/dev/tty1" = "$TTY" ] || [ "/dev/tty2" = "$TTY" ] +if [[ "/dev/tty1" = "$TTY" || "/dev/tty2" = "$TTY" ]] && [[ "$(id -u)" -ne 0 ]] then clear eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D 2> /dev/null)" diff --git a/config/essentials/zsh/aliases.zsh b/config/essentials/zsh/aliases.zsh index e6a368f..a632089 100644 --- a/config/essentials/zsh/aliases.zsh +++ b/config/essentials/zsh/aliases.zsh @@ -38,6 +38,7 @@ if [ -x /usr/bin/dircolors ]; then alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias ip='ip -color=auto' + alias ipa='ip -br a' fi alias l='ls -l' @@ -106,7 +107,7 @@ alias sha='ssh-add' alias ssh-start='eval "$(ssh-agent)" && ssh-add' alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i' -alias whatsmyip='curl "ifconfig.me"' +alias whatsmyip='curl -s "ifconfig.co"' alias icognito='unset HISTFILE' alias webcam='v4l2-ctl --set-fmt-video=width=1280,height=720; mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 --profile=low-latency --untimed --no-resume-playback' alias wtip='wt ip -c -brief addr' @@ -146,7 +147,9 @@ alias esls='$EDITOR ~/src/slstatus/config.def.h' alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' # quick cd alias cfd='$EDITOR config.def.h' +alias cds='cd $HOME/src/' alias cdo='cd $HOME/src/dotfiles' +alias cdi='cd $HOME/src/installdrier' alias cdm='cd $HOME/music' alias cdd='cd $HOME/dl' alias cdrs='cd /srv/' @@ -157,8 +160,11 @@ alias o.='o .' alias go.='go .' alias ogo.='ogo .' alias o/='o /' +alias o/s='o /srv' alias go/='go /' +alias go/s='go /srv' alias ogo/='ogo /' +alias ogo/s='ogo /srv' alias fzps='ps aux | tail +2 | fzf --bind \ "1:execute(echo -n {} | awk '\''{print \$1}'\'' | xclip -sel c -r),\ diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index abc2639..f21ce9b 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -86,6 +86,7 @@ upfile () { } sgd () { + d="$PWD" for dir in ${1:-$HOME/src/*} do cd $dir @@ -98,6 +99,8 @@ sgd () { test "$(parse_git_remote)" && echo "$PWD \e[0;32m*push/pull\e[0m" done + cd "$d" + unset d } # Git functions @@ -153,3 +156,25 @@ gpg_import () gpg --import private.asc shred -uz {public,private,trust}.asc } + +ngenable () +{ + ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/ +} + +vbsr () +{ + vboxmanage snapshot "$1" restore "$2" && + vboxmanage startvm "$1" || + vboxmanage controlvm "$1" poweroff +} +vbsrr () +{ + vbsr "$1" "$2" + sleep 3 + vbsr "$1" "$2" +} +vbst () +{ + vboxmanage snapshot "$1" take "$2" +} diff --git a/config/home/.zshenv b/config/home/.zshenv index d48d982..9fd39fa 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -5,28 +5,32 @@ export PATH="$HOME/go/bin:$PATH" export EDITOR="nvim" export VISUAL="nvim" -export TERMINAL="st" + export BROWSER="firefox" -export MENUCMD="tofi" export XDG_CONFIG_HOME="$HOME"/.config export XDG_CACHE_HOME="$HOME"/.cache export XDG_DATA_HOME="$HOME"/.local/share export XDG_STATE_HOME="$HOME"/.local/state -test ! -d "$XDG_CONFIG_HOME"/x11 && - mkdir "$XDG_CONFIG_HOME"/x11 -export XINITRC="$XDG_CONFIG_HOME/x11"/xinitrc -export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export CARGO_HOME="$XDG_CONFIG_HOME"/cargo export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc-2.0 -export CUDA_CACHE_PATH="$XDG_CONFIG_HOME"/nv export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc export NVM_DIR="$XDG_DATA_HOME/nvm" export W3M_DIR="$XDG_STATE_HOME"/w3m +if [ -n "$WAYLAND_DISPLAY" ] +then + export TERMINAL="foot" + export MENUCMD="tofi" +else + export TERMINAL="dmenu" + export XINITRC="$XDG_CONFIG_HOME/x11"/xinitrc + export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority +fi + export ZDOTDIR="$XDG_CONFIG_HOME"/zsh export HISTFILE="$ZDOTDIR"/histfile export HISTSIZE=100000 @@ -46,3 +50,4 @@ export PASSWORD_STORE_CLIP_TIME=5 # export RANGER_LOAD_DEFAULT_RC=FALSE # export VIMINIT="source ~/.config/vim/vimrc" # export fpath=($XDG_CONFIG_HOME/zsh/completion/ $fpath) +# export CUDA_CACHE_PATH="$XDG_CONFIG_HOME"/nv diff --git a/config/hyprland/foot/foot.ini b/config/hyprland/foot/foot.ini index 671ede4..79cc804 100644 --- a/config/hyprland/foot/foot.ini +++ b/config/hyprland/foot/foot.ini @@ -9,7 +9,7 @@ term=xterm-256color # title=foot # locked-title=no -# font=monospace:size=8 +font=monospace:size=11 # font-bold=<bold variant of regular font> # font-italic=<italic variant of regular font> # font-bold-italic=<bold+italic variant of regular font> diff --git a/config/hyprland/hypr/binds.conf b/config/hyprland/hypr/binds.conf index 61e2971..05355ce 100644 --- a/config/hyprland/hypr/binds.conf +++ b/config/hyprland/hypr/binds.conf @@ -31,6 +31,7 @@ binde = $mainMod SHIFT, K, resizeactive, 0 -60 binde = $mainMod SHIFT, L, resizeactive, 60 0 bind = $mainMod SHIFT, F, fullscreen +bind = $mainMod CTRL, F, fakefullscreen bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 diff --git a/config/hyprland/hypr/env.conf b/config/hyprland/hypr/env.conf index 258ada5..162c911 100644 --- a/config/hyprland/hypr/env.conf +++ b/config/hyprland/hypr/env.conf @@ -26,8 +26,9 @@ env = SDL_IM_MODULE,fcitx env = SDL_VIDEODRIVER,wayland env = CLUTTER_BACKEND,wayland -env = LIBVA_DRIVER_NAME,nvidia -env = XDG_SESSION_TYPE,wayland -env = GBM_BACKEND,nvidia-drm -env = __GLX_VENDOR_LIBRARY_NAME,nvidia -env = WLR_NO_HARDWARE_CURSORS,1 +# # nvidia +# env = LIBVA_DRIVER_NAME,nvidia +# env = XDG_SESSION_TYPE,wayland +# env = GBM_BACKEND,nvidia-drm +# env = __GLX_VENDOR_LIBRARY_NAME,nvidia +# env = WLR_NO_HARDWARE_CURSORS,1 diff --git a/config/hyprland/tofi/themes/nord b/config/hyprland/tofi/themes/nord index 1b2ba53..dae003b 100644 --- a/config/hyprland/tofi/themes/nord +++ b/config/hyprland/tofi/themes/nord @@ -1,12 +1,7 @@ ### Font -font = /usr/share/fonts/TTF/JetBrainsMono-Bold.ttf +font = monospace bold font-size = 12 -font-features = "" -font-variations = "" -hint-font = true - -### Colors text-color = #d8dee9 prompt-color = #81a1c1 placeholder-color = #4c566a @@ -15,16 +10,10 @@ default-result-color = #88c0d0 selection-color = #5e81ac selection-match-color = #ffffff -### Matching prompt-text = "" prompt-padding = 0 -placeholder-text = "cmd" -num-results = 0 -result-spacing = 0 -horizontal = false -min-input-width = 0 +placeholder-text = "..." -### Window theming width = 20% height = 20% background-color = #2e3440f0 @@ -33,38 +22,13 @@ outline-color = #81a1c1 border-width = 2 border-color = #88c0d0 corner-radius = 26 -# Padding + padding-top = 0 padding-bottom = 0 -padding-left = 7% +padding-left = 0 +# padding-left = 7% padding-right = 0 -clip-to-padding = true -scale = true -output = "" -anchor = center -# -1 means ignore exclusive zones completely. -# 0 will move tofi out of the way of other windows' zones. -# > 0 will set that much space as an exclusive zone. -exclusive-zone = -1 - -# Window offset from edge of screen. Only has an effect when anchored -margin-top = 0 -margin-bottom = 0 -margin-left = 0 -margin-right = 0 - -### Behaviour -hide-cursor = false -history = true -# history-file = /path/to/histfile -fuzzy-match = false require-match = false -hide-input = false +auto-accept-single = true hidden-character = "" -drun-launch = true -# terminal = foot -late-keyboard-init = false -multi-instance = false -ascii-input = false -# include = /path/to/config |