diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..a726322 --- /dev/null +++ b/.Xresources @@ -0,0 +1,21 @@ +! __ __ +! \ \/ /_ _ ___ ___ ___ _ _ _ _ __ ___ ___ +! _ > <| '_/ -_|_- or element, using `xdg-open` +local open_editor = require "open_editor" + +-- NoScript plugin, toggle scripts and or plugins on a per-domain basis. +-- `,ts` to toggle scripts, `,tp` to toggle plugins, `,tr` to reset. +-- Remove all "enable_scripts" & "enable_plugins" lines from your +-- domain_props table (in config/globals.lua) as this module will conflict. +--require "noscript" + +local follow_selected = require "follow_selected" +local go_input = require "go_input" +local go_next_prev = require "go_next_prev" +local go_up = require "go_up" + +-- Filter Referer HTTP header if page domain does not match Referer domain +require_web_module("referer_control_wm") + +local error_page = require "error_page" + +-- Add userstyles loader +local styles = require "styles" + +-- Hide scrollbars on all pages +local hide_scrollbars = require "hide_scrollbars" + +-- Automatically apply per-domain webview properties +local domain_props = require "domain_props" + +-- Add a stylesheet when showing images +local image_css = require "image_css" + +-- Add a new tab page +local newtab_chrome = require "newtab_chrome" + +-- Add tab favicons mod +local tab_favicons = require "tab_favicons" + +-- Add :view-source command +local view_source = require "view_source" + +----------------------------- +-- End user script loading -- +----------------------------- + +-- Restore last saved session +local w = (not luakit.nounique) and (session and session.restore()) +if w then + for i, uri in ipairs(uris) do + w:new_tab(uri, { switch = i == 1 }) + end +else + -- Or open new window + window.new(uris) +end + +------------------------------------------- +-- Open URIs from other luakit instances -- +------------------------------------------- + +if unique then + unique.add_signal("message", function (msg, screen) + local cmd, arg = string.match(msg, "^(%S+)%s*(.*)") + local ww = lousy.util.table.values(window.bywidget)[1] + if cmd == "tabopen" then + ww:new_tab(arg) + elseif cmd == "winopen" then + ww = window.new((arg ~= "") and { arg } or {}) + end + ww.win.screen = screen + ww.win.urgency_hint = true + end) +end + +-- Adblock +require "adblock" +require "adblock-chrome" + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/.config/luakit/theme.lua b/.config/luakit/theme.lua new file mode 100644 index 0000000..27fb096 --- /dev/null +++ b/.config/luakit/theme.lua @@ -0,0 +1,88 @@ +-- _ _ _ +-- | |_| |_ ___ _ __ ___ | |_ _ __ _ +-- | _| ' \/ -_) ' \/ -_)_| | || / _` | +-- \__|_||_\___|_|_|_\___(_)_|\_,_\__,_| + +local theme = {} + +-- Default settings +theme.font = "12px scientifica" +theme.fg = "#b9bdcf" +theme.bg = "#0f0f0f" + +-- Genaral colours +theme.success_fg = "#b9bdcf" +theme.loaded_fg = "#0f0f0f" +theme.error_fg = "#b9bdcf" +theme.error_bg = "#0f0f0f" + +-- Warning colours +theme.warning_fg = "#2B4A72" +theme.warning_bg = "#b9bdcf" + +-- Notification colours +theme.notif_fg = "#818490" +theme.notif_bg = "#b9bdcf" + +-- Menu colours +theme.menu_fg = "#0f0f0f" +theme.menu_bg = "#b9bdcf" +theme.menu_selected_fg = "#b9bdcf" +theme.menu_selected_bg = "#8F5073" +theme.menu_title_bg = "#b9bdcf" +theme.menu_primary_title_fg = "#2B4A72" +theme.menu_secondary_title_fg = "#b9bdcf" + +theme.menu_disabled_fg = "#b9bdcf" +theme.menu_disabled_bg = theme.menu_bg +theme.menu_enabled_fg = theme.menu_fg +theme.menu_enabled_bg = theme.menu_bg +theme.menu_active_fg = "#6E4568" +theme.menu_active_bg = theme.menu_bg + +-- Proxy manager +theme.proxy_active_menu_fg = '#0f0f0f' +theme.proxy_active_menu_bg = '#b9bdcf' +theme.proxy_inactive_menu_fg = '#b9bdcf' +theme.proxy_inactive_menu_bg = '#b9bdcf' + +-- Statusbar specific +theme.sbar_fg = "#b9bdcf" +theme.sbar_bg = "#0f0f0f" + +-- Downloadbar specific +theme.dbar_fg = "#b9bdcf" +theme.dbar_bg = "#0f0f0f" +theme.dbar_error_fg = "#2B4A72" + +-- Input bar specific +theme.ibar_fg = "#0f0f0f" +theme.ibar_bg = "#b9bdcf" + +-- Tab label +theme.tab_fg = "#b9bdcf" +theme.tab_bg = "#0f0f0f" +theme.tab_hover_bg = "#b9bdcf" +theme.tab_hover_fg = "#0f0f0f" +theme.tab_ntheme = "#b9bdcf" +theme.selected_fg = "#0f0f0f" +theme.selected_bg = "#b9bdcf" +theme.selected_ntheme = "#b9bdcf" +theme.loading_fg = "#AE5B6E" +theme.loading_bg = "#0f0f0f" + +theme.selected_private_tab_bg = "#AE5B6E" +theme.private_tab_bg = "#4B64A3" + +-- Trusted/untrusted ssl colours +theme.trust_fg = "#6E4568" +theme.notrust_fg = "#2B4A72" + +-- General colour pairings +theme.ok = { fg = "#b9bdcf", bg = "#0f0f0f" } +theme.warn = { fg = "#0f0f0f", bg = "#b9bdcf" } +theme.error = { fg = "#b9bdcf", bg = "#2B4A72" } + +return theme + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc new file mode 100644 index 0000000..2e31066 --- /dev/null +++ b/.config/sxhkd/sxhkdrc @@ -0,0 +1,23 @@ +# increase / decrease volume +XF86Audio{Raise,Lower}Volume + amixer -q sset Master {2%+,2%-} unmute + +# Mute volume +XF86AudioMute + amixer -q sset Master toggle + +# brightness +XF86MonBrightness{Up,Down} + xbacklight -time 1 -steps 1 -{inc,dec} 5 + +super + r + rofi -show run + +super + Return + urxvtc + +super + p + rofi-pass + +super + control + q + pkill xwait diff --git a/.config/wal/templates/colors-luakit.lua b/.config/wal/templates/colors-luakit.lua new file mode 100644 index 0000000..38fe4d4 --- /dev/null +++ b/.config/wal/templates/colors-luakit.lua @@ -0,0 +1,88 @@ +-- _ _ _ +-- | |_| |_ ___ _ __ ___ | |_ _ __ _ +-- | _| ' \/ -_) ' \/ -_)_| | || / _` | +-- \__|_||_\___|_|_|_\___(_)_|\_,_\__,_| + +local theme = {{}} + +-- Default settings +theme.font = "12px scientifica" +theme.fg = "{foreground}" +theme.bg = "{background}" + +-- Genaral colours +theme.success_fg = "{foreground}" +theme.loaded_fg = "{background}" +theme.error_fg = "{foreground}" +theme.error_bg = "{background}" + +-- Warning colours +theme.warning_fg = "{color1}" +theme.warning_bg = "{foreground}" + +-- Notification colours +theme.notif_fg = "{color8}" +theme.notif_bg = "{foreground}" + +-- Menu colours +theme.menu_fg = "{color0}" +theme.menu_bg = "{foreground}" +theme.menu_selected_fg = "{foreground}" +theme.menu_selected_bg = "{color11}" +theme.menu_title_bg = "{foreground}" +theme.menu_primary_title_fg = "{color9}" +theme.menu_secondary_title_fg = "{color7}" + +theme.menu_disabled_fg = "{color15}" +theme.menu_disabled_bg = theme.menu_bg +theme.menu_enabled_fg = theme.menu_fg +theme.menu_enabled_bg = theme.menu_bg +theme.menu_active_fg = "{color2}" +theme.menu_active_bg = theme.menu_bg + +-- Proxy manager +theme.proxy_active_menu_fg = '{background}' +theme.proxy_active_menu_bg = '{foreground}' +theme.proxy_inactive_menu_fg = '{color7}' +theme.proxy_inactive_menu_bg = '{foreground}' + +-- Statusbar specific +theme.sbar_fg = "{foreground}" +theme.sbar_bg = "{background}" + +-- Downloadbar specific +theme.dbar_fg = "{foreground}" +theme.dbar_bg = "{background}" +theme.dbar_error_fg = "{color9}" + +-- Input bar specific +theme.ibar_fg = "{background}" +theme.ibar_bg = "{foreground}" + +-- Tab label +theme.tab_fg = "{color15}" +theme.tab_bg = "{background}" +theme.tab_hover_bg = "{color7}" +theme.tab_hover_fg = "{background}" +theme.tab_ntheme = "{foreground}" +theme.selected_fg = "{background}" +theme.selected_bg = "{color7}" +theme.selected_ntheme = "{color15}" +theme.loading_fg = "{color12}" +theme.loading_bg = "{background}" + +theme.selected_private_tab_bg = "{color4}" +theme.private_tab_bg = "{color5}" + +-- Trusted/untrusted ssl colours +theme.trust_fg = "{color10}" +theme.notrust_fg = "{color9}" + +-- General colour pairings +theme.ok = {{ fg = "{foreground}", bg = "{background}" }} +theme.warn = {{ fg = "{color0}", bg = "{foreground}" }} +theme.error = {{ fg = "{foreground}", bg = "{color9}" }} + +return theme + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/.config/wal/templates/colors-zathura b/.config/wal/templates/colors-zathura new file mode 100644 index 0000000..2334ad0 --- /dev/null +++ b/.config/wal/templates/colors-zathura @@ -0,0 +1,10 @@ +set font "scientifica normal 12" + +set default-fg "{foreground}" +set default-bg "{background}" +set completion-highlight-bg "{color5}" +set completion-highlight-fg "{background}" +set inputbar-bg "{background}" +set inputbar-fg "{color5}" +set statusbar-bg "{background}" +set statusbar-fg "{foreground}" diff --git a/.config/wal/templates/colors.Xresources b/.config/wal/templates/colors.Xresources new file mode 100644 index 0000000..763bfdc --- /dev/null +++ b/.config/wal/templates/colors.Xresources @@ -0,0 +1,75 @@ +! X colors. +! Generated by 'wal' +*foreground: {foreground} +*background: {background} +*.foreground: {foreground} +*.background: {background} +emacs*foreground: {foreground} +emacs*background: {background} +URxvt*foreground: {foreground} +XTerm*foreground: {foreground} +UXTerm*foreground: {foreground} +URxvt*background: {background.alpha} +XTerm*background: {background} +UXTerm*background: {background} +URxvt*cursorColor: {cursor} +XTerm*cursorColor: {cursor} +UXTerm*cursorColor: {cursor} +URxvt*borderColor: {background.alpha} + +! Colors 0-15. +*.color0: {color0} +*color0: {color0} +*.color1: {color1} +*color1: {color1} +*.color2: {color2} +*color2: {color2} +*.color3: {color3} +*color3: {color3} +*.color4: {color4} +*color4: {color4} +*.color5: {color5} +*color5: {color5} +*.color6: {color6} +*color6: {color6} +*.color7: {color7} +*color7: {color7} +*.color8: {color8} +*color8: {color8} +*.color9: {color9} +*color9: {color9} +*.color10: {color10} +*color10: {color10} +*.color11: {color11} +*color11: {color11} +*.color12: {color12} +*color12: {color12} +*.color13: {color13} +*color13: {color13} +*.color14: {color14} +*color14: {color14} +*.color15: {color15} +*color15: {color15} + +! Black color that will not be affected by bold highlighting. +*.color66: {color0} +*color66: {color0} + +! Xclock colors. +XClock*foreground: {foreground} +XClock*background: {background} +XClock*majorColor: rgba:{color15.xrgba} +XClock*minorColor: rgba:{color15.xrgba} +XClock*hourColor: rgba:{color15.xrgba} +XClock*minuteColor: rgba:{color15.xrgba} +XClock*secondColor: rgba:{color15.xrgba} + +! Set depth to make transparency work. +!URxvt*depth: 32 + +twobwm.focus_color: {color13} +twobwm.unfocus_color: {color15} +twobwm.fixed_color: {color2} +twobwm.unkill_color: {color9} +twobwm.outer_border_color: {background} +twobwm.fixed_unkill-color: {color11} diff --git a/.kshrc b/.kshrc new file mode 100644 index 0000000..dbafa99 --- /dev/null +++ b/.kshrc @@ -0,0 +1,14 @@ +export HISTFILE="$HOME/.ksh-hist" +export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/opt/texlive/2017/bin/x86_64-linux:/usr/local/texlive/2017/bin/x86_64-linux/" + +export PS1='$(pwd | sed "s,^$HOME,~,") >>> ' + +export EDITOR="vim" +set -o emacs + +alias gpg=gpg2 +alias vi=vim + +export GPG_TTY=$(tty) + +ufetch diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..9c53e3c --- /dev/null +++ b/.vimrc @@ -0,0 +1,131 @@ +call plug#begin('~/.vim/plugged') + +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-vinegar' +Plug 'lervag/vimtex' +Plug 'Shougo/deoplete.nvim' +Plug 'roxma/nvim-yarp' +Plug 'roxma/vim-hug-neovim-rpc' +Plug 'w0rp/ale' +Plug 'lervag/vimtex' +Plug 'ervandew/supertab' +Plug 'dylanaraps/wal.vim' +Plug 'airblade/vim-gitgutter' + +call plug#end() + +map +map +let g:deoplete#enable_at_startup = 1 +let g:ale_lint_on_text_changed = 'never' +set tabstop=4 shiftwidth=4 expandtab +set laststatus=2 +set encoding=utf-8 +set ttyfast +set lazyredraw +set number + +""""" Statusline """"" +let g:currentmode = { + \ 'n' : 'N ', + \ 'no' : 'N·Operator Pending ', + \ 'v' : 'V ', + \ 'V' : 'V·Line ', + \ '^V' : 'V·Block ', + \ 's' : 'Select ', + \ 'S' : 'S·Line ', + \ '^S' : 'S·Block ', + \ 'i' : 'I ', + \ 'R' : 'R ', + \ 'Rv' : 'V·Replace ', + \ 'c' : 'Command ', + \ 'cv' : 'Vim Ex ', + \ 'ce' : 'Ex ', + \ 'r' : 'Prompt ', + \ 'rm' : 'More ', + \ 'r?' : 'Confirm ', + \ '!' : 'Shell ', + \ 't' : 'Terminal ' + \} + +" Automatically change the statusline color depending on mode +function! ChangeStatuslineColor() + if (mode() =~# '\v(n|no)') + exe 'hi! StatusLine ctermfg=008' + elseif (mode() =~# '\v(v|V)' || g:currentmode[mode()] ==# 'V·Block' || get(g:currentmode, mode(), '') ==# 't') + exe 'hi! StatusLine ctermfg=005' + elseif (mode() ==# 'i') + exe 'hi! StatusLine ctermfg=004' + else + exe 'hi! StatusLine ctermfg=006' + endif + + return '' +endfunction + +function! ReadOnly() + if &readonly || !&modifiable + return '' + else + return '' +endfunction + +function! GitInfo() + let git = fugitive#head() + if git != '' + return ' '.fugitive#head() + else + return '' +endfunction + +function! LinterStatus() abort + let l:counts = ale#statusline#Count(bufnr('')) + + let l:all_errors = l:counts.error + l:counts.style_error + let l:all_non_errors = l:counts.total - l:all_errors + + return l:counts.total == 0 ? 'OK' : printf( + \ '%dW %dE', + \ all_non_errors, + \ all_errors + \) +endfunction + +set statusline= +set statusline+=%{ChangeStatuslineColor()} " Changing the statusline color +set statusline+=%0*\ %{toupper(g:currentmode[mode()])} " Current mode +set statusline+=%8*\ [%n] " buffernr +set statusline+=%8*\ %{GitInfo()} " Git Branch name +set statusline+=%8*\ %<%F\ %{ReadOnly()}\ %m\ %w\ " File+path +set statusline+=%#warningmsg# +set statusline+=%* +set statusline+=%9*\ %= " Space +set statusline+=%8*\ %y\ " FileType +set statusline+=%0*\ %{LinterStatus()}\%3p%%\ \ %l:\ %3c\ " Rownumber/total (%) + +hi User1 ctermfg=007 +hi User2 ctermfg=008 +hi User3 ctermfg=008 +hi User4 ctermfg=008 +hi User5 ctermfg=008 +hi User7 ctermfg=008 +hi User8 ctermfg=008 +hi User9 ctermfg=007 + + +"""" LaTeX +let g:vimtex_complete_enabled = 1 +if !exists('g:deoplete#omni#input_patterns') + let g:deoplete#omni#input_patterns = {} +endif +let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete +let g:vimtex_compiler_latexmk = { + \ 'callback': 0, + \ 'backend' : 'jobs' + \} +nmap lw :VimtexCountWords + +"""" Colors +colorscheme wal +highlight SignColumn ctermbg=black diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..160b778 --- /dev/null +++ b/.xinitrc @@ -0,0 +1,49 @@ +#!/bin/sh +# __ _(_)_ _ (_) |_ _ _ __ +# _\ \ / | ' \| | _| '_/ _| +#(_)_\_\_|_||_|_|\__|_| \__| + + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +wallpaper=$(shuf -n1 -e $HOME/Wallpapers/*) +wal -b 0f0f0f -i $wallpaper -n +$HOME/.scripts/wal.sh + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +feh --bg-fill $wallpaper + +compton & +sxhkd & +urxvtd & +2bwm & +exec xwait