This commit is contained in:
Dr. Amr Osman 2019-03-13 05:31:46 +02:00
commit 6bec08c858
17 changed files with 41 additions and 48 deletions

View File

@ -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 <https://lukesmith.xyz>
# 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

View File

@ -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

View File

@ -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 <C-n> :NERDTreeToggle<CR>
map <leader>n :NERDTreeToggle<CR>
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 <leader><leader> <Esc>/<++><Enter>"_c4l

View File

@ -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

View File

@ -1,4 +0,0 @@
[Desktop Entry]
Type=Application
Name=feh image viewer
Exec=/usr/bin/feh %u

View File

@ -1,4 +0,0 @@
[Desktop Entry]
Type=Application
Name=Animated gif handler
Exec=/usr/bin/mpv --loop %u

View File

@ -1,4 +1,4 @@
[Desktop Entry]
Type=Application
Name=sxiv image viewer
Name=Image viewer
Exec=/usr/bin/sxiv -a %u

View File

@ -1,4 +1,4 @@
[Desktop Entry]
Type=Application
Name=Neomutt Mail
Name=Mail
Exec=/usr/local/bin/st -e neomutt %u

View File

@ -1,4 +1,4 @@
[Desktop Entry]
Type=Application
Name=Zathura PDF reader
Name=PDF reader
Exec=/usr/bin/zathura %u

View File

@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=RSS feed addition
Exec=/usr/bin/env rssadd %U

View File

@ -1,4 +1,4 @@
[Desktop Entry]
Type=Application
Name=Neovim
Name=Text editor
Exec=/usr/local/bin/st -e nvim %u

View File

@ -1,4 +1,4 @@
[Desktop Entry]
Type=Application
Name=Transmission Addition
Name=Torrent
Exec=/usr/bin/env transadd %U

View File

@ -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.")

View File

@ -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

View File

@ -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 \
-

9
.scripts/tools/rssadd Executable file
View File

@ -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