diff --git a/.emoji b/.config/emoji similarity index 100% rename from .emoji rename to .config/emoji diff --git a/.config/i3/config b/.config/i3/config index 08a00eb6..05f514dc 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -1,15 +1,5 @@ # vim: filetype=i3 -# _ _ ____ ____ ____ -# | | / \ | _ \| __ ) ___| -# | | / _ \ | |_) | _ \___ \ -# | |___ / ___ \| _ <| |_) |__) | -# |_____/_/ \_\_| \_\____/____/ -# -# File originally by Luke Smith -# Website: http://lukesmith.xyz -# Email: luke@lukesmith.xyz -# YouTube: https://youtube.com/c/LukeSmithxyz -# Github: https://github.com/LukeSmithxyz +# File originally by Luke Smith # This config file will use environmental variables such as $BROWSER and $TERMINAL. # You can set these variables in ~/.profile or ~/.bash_profile if you have it as below: @@ -24,6 +14,7 @@ for_window [class="^.*"] border pixel 3 for_window [class="mpv"] floating enable gaps inner 5 gaps outer 5 + set $term --no-startup-id $TERMINAL set $mod Mod4 set $stoprec --no-startup-id dmenurecord kill @@ -34,7 +25,6 @@ set $hibernate sudo -A systemctl suspend floating_modifier $mod # #---Dropdown Windows---# # - # General dropdown window traits. The order can matter. for_window [instance="dropdown_*"] floating enable for_window [instance="dropdown_*"] move scratchpad @@ -332,7 +322,6 @@ bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # #---Media Keys---# # - # Volume keys bindsym $mod+plus exec --no-startup-id lmc up 5 bindsym $mod+Shift+plus exec --no-startup-id lmc up 15 @@ -360,7 +349,6 @@ bindsym $mod+Shift+BackSpace exec --no-startup-id systemctl suspend # #---Extra XF86 Keys---# # -# These are the extra media keys that some keyboards have. bindsym XF86AudioMute exec --no-startup-id lmc mute bindsym XF86AudioLowerVolume exec --no-startup-id lmc down 5 bindsym Shift+XF86AudioLowerVolume exec --no-startup-id lmc down 10 diff --git a/.config/mimeapps.list b/.config/mimeapps.list index 85224313..84bf43bf 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -1,8 +1,10 @@ [Default Applications] -x-scheme-handler/magnet=transmission-remote.desktop; -x-scheme-handler/mailto=mutt.desktop; -text/plain=vim.desktop; -application/pdf=zathura.desktop; -image/png=sxiv.desktop; -image/jpeg=sxiv.desktop; -image/gif=sxiv.desktop; +x-scheme-handler/magnet=torrent.desktop; +x-scheme-handler/mailto=mail.desktop; +text/plain=text.desktop; +text/x-shellscript=text.desktop; +application/pdf=pdf.desktop; +image/png=img.desktop; +image/jpeg=img.desktop; +image/gif=img.desktop; +application/rss+xml=rss.desktop diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 28339844..d282fbf9 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -10,13 +10,16 @@ Plug 'LukeSmithxyz/vimling' Plug 'vimwiki/vimwiki' Plug 'bling/vim-airline' Plug 'tpope/vim-commentary' +Plug 'vifm/vifm.vim' call plug#end() set bg=light set mouse=a set nohlsearch set clipboard=unnamedplus + " Some basics: + nnoremap c "_c set nocompatible filetype plugin on syntax on @@ -37,7 +40,7 @@ set clipboard=unnamedplus set splitbelow splitright " Nerd tree - map :NERDTreeToggle + map n :NERDTreeToggle autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " vimling: @@ -92,10 +95,10 @@ set clipboard=unnamedplus autocmd BufWritePre * %s/\s\+$//e " When shortcut files are updated, renew bash and ranger configs with new material: - autocmd BufWritePost ~/.bmdirs,~/.bmfiles !shortcuts + autocmd BufWritePost ~/.config/bmdirs,~/.config/bmfiles !shortcuts " Run xrdb whenever Xdefaults or Xresources are updated. - autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb % + autocmd BufWritePost *Xresources,*Xdefaults !xrdb % " Navigating with guides inoremap /<++>"_c4l diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index 56cc48f1..7a6e8d33 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -25,6 +25,9 @@ set vicmd=vim " standard utilities like `cp`. While using `cp` and alike is a more universal " solution, it's also much slower when processing large amounts of files and " doesn't support progress measuring. +" vim: filetype=vifm + +source ~/.config/vifm/vifmshortcuts set syscalls diff --git a/.local/share/applications/feh.desktop b/.local/share/applications/feh.desktop deleted file mode 100644 index be3de36a..00000000 --- a/.local/share/applications/feh.desktop +++ /dev/null @@ -1,4 +0,0 @@ -[Desktop Entry] -Type=Application -Name=feh image viewer -Exec=/usr/bin/feh %u diff --git a/.local/share/applications/gif.desktop b/.local/share/applications/gif.desktop deleted file mode 100644 index 366fd948..00000000 --- a/.local/share/applications/gif.desktop +++ /dev/null @@ -1,4 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Animated gif handler -Exec=/usr/bin/mpv --loop %u diff --git a/.local/share/applications/sxiv.desktop b/.local/share/applications/img.desktop similarity index 71% rename from .local/share/applications/sxiv.desktop rename to .local/share/applications/img.desktop index a9ae0b69..d1582a5e 100644 --- a/.local/share/applications/sxiv.desktop +++ b/.local/share/applications/img.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application -Name=sxiv image viewer +Name=Image viewer Exec=/usr/bin/sxiv -a %u diff --git a/.local/share/applications/mutt.desktop b/.local/share/applications/mail.desktop similarity index 79% rename from .local/share/applications/mutt.desktop rename to .local/share/applications/mail.desktop index b30466e3..d24aea20 100644 --- a/.local/share/applications/mutt.desktop +++ b/.local/share/applications/mail.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application -Name=Neomutt Mail +Name=Mail Exec=/usr/local/bin/st -e neomutt %u diff --git a/.local/share/applications/zathura.desktop b/.local/share/applications/pdf.desktop similarity index 70% rename from .local/share/applications/zathura.desktop rename to .local/share/applications/pdf.desktop index 21e8c2bf..8c386774 100644 --- a/.local/share/applications/zathura.desktop +++ b/.local/share/applications/pdf.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application -Name=Zathura PDF reader +Name=PDF reader Exec=/usr/bin/zathura %u diff --git a/.local/share/applications/rss.desktop b/.local/share/applications/rss.desktop new file mode 100644 index 00000000..6fafc4f4 --- /dev/null +++ b/.local/share/applications/rss.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=RSS feed addition +Exec=/usr/bin/env rssadd %U diff --git a/.local/share/applications/vim.desktop b/.local/share/applications/text.desktop similarity index 79% rename from .local/share/applications/vim.desktop rename to .local/share/applications/text.desktop index aa2284e2..41ee05f8 100644 --- a/.local/share/applications/vim.desktop +++ b/.local/share/applications/text.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application -Name=Neovim +Name=Text editor Exec=/usr/local/bin/st -e nvim %u diff --git a/.local/share/applications/transmission-remote.desktop b/.local/share/applications/torrent.desktop similarity index 70% rename from .local/share/applications/transmission-remote.desktop rename to .local/share/applications/torrent.desktop index b48e73be..f6d28d9b 100644 --- a/.local/share/applications/transmission-remote.desktop +++ b/.local/share/applications/torrent.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application -Name=Transmission Addition +Name=Torrent Exec=/usr/bin/env transadd %U diff --git a/.scripts/cron/crontog b/.scripts/cron/crontog index e6ffd6a2..b5694b31 100755 --- a/.scripts/cron/crontog +++ b/.scripts/cron/crontog @@ -2,4 +2,4 @@ # Toggles all cronjobs off/on. # Stores disabled crontabs in ~/.consaved until restored. -([ -f ~/.cronsaved ] && crontab - < ~/.cronsaved && rm ~/.cronsaved && note "Cronjobs re-enabled." "$PIX/clock.gif" ) || ( crontab -l > ~/.cronsaved && crontab -r && note "Cronjobs saved and disabled." "$PIX/clock.gif") +([ -f ~/.cronsaved ] && crontab - < ~/.cronsaved && rm ~/.cronsaved && notify-send "🕓 Cronjobs re-enabled.") || ( crontab -l > ~/.cronsaved && crontab -r && notify-send "🕓 Cronjobs saved and disabled.") diff --git a/.scripts/i3cmds/dmenuunicode b/.scripts/i3cmds/dmenuunicode index 32e550ad..37c65343 100755 --- a/.scripts/i3cmds/dmenuunicode +++ b/.scripts/i3cmds/dmenuunicode @@ -5,7 +5,8 @@ # Must have xclip installed to even show menu. xclip -h >/dev/null || exit -chosen=$(grep -v "#" ~/.emoji | rofi -dmenu -i -l 20 -fn 'Twitter Color Font-18') +#chosen=$(grep -v "#" ~/.emoji | rofi -dmenu -i -l 20 -fn 'Twitter Color Font-18') +chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20 -fn Monospace-18) [ "$chosen" != "" ] || exit diff --git a/.scripts/i3cmds/xcqr b/.scripts/i3cmds/xcqr deleted file mode 100755 index 23525997..00000000 --- a/.scripts/i3cmds/xcqr +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Credit to Maddison Hellstrom (@b0o on Github) -ifinstalled feh && qrencode -o - -s 1 \ - "$(xclip -out -selection clipboard)" | - feh --zoom max \ - -F \ - --force-aliasing \ - --image-bg white \ - - diff --git a/.scripts/tools/rssadd b/.scripts/tools/rssadd new file mode 100755 index 00000000..e90dcf2a --- /dev/null +++ b/.scripts/tools/rssadd @@ -0,0 +1,9 @@ +#!/bin/sh +! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null && + notify-send -i "$PIX/rss.svg" "That doesn't look like a full URL." && exit +RSSFILE="$HOME/.config/newsboat/urls" +if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then + notify-send -i "$PIX/rss.svg" "You already have this RSS feed." +else + echo "$1" >> "$RSSFILE" && notify-send -i "$PIX/rss.svg" "RSS feed added." +fi