summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrafa_99 <rafa99@protonmail.com>2020-04-22 01:48:27 +0100
committerrafa_99 <rafa99@protonmail.com>2020-04-22 01:48:27 +0100
commitc0216d31d468ae7f5ffbecd88b3840c999ab7e6a (patch)
tree165129a47fa0269844eb88f483b064e8faef6bfc
parentb86718ad53ae002186aad622c284f2f6cb188262 (diff)
Updated General Dotfiles
-rw-r--r--.config/nvim/init.vim23
-rw-r--r--.config/surf/bookmarks14
-rwxr-xr-x.config/surf/script.js293
-rwxr-xr-x.config/surf/styles/default.css9
-rwxr-xr-x.local/bin/colorset6
-rwxr-xr-x.local/bin/screenrecord4
-rw-r--r--.local/src/suck/colors/BW/tabbed/colors.h11
-rw-r--r--.local/src/suck/colors/Cyan/tabbed/colors.h11
-rw-r--r--.local/src/suck/colors/Green/tabbed/colors.h11
-rw-r--r--.local/src/suck/colors/Red/tabbed/colors.h11
-rwxr-xr-x.local/src/suck/sucklessUpdate11
-rwxr-xr-x.xprofile14
-rwxr-xr-x.zprofile2
13 files changed, 28 insertions, 392 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 331613e..1a99780 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -8,6 +8,7 @@ Plug 'luochen1990/rainbow'
Plug 'vim-scripts/taglist.vim'
Plug 'vim-scripts/DoxygenToolkit.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
+Plug 'airblade/vim-gitgutter'
call plug#end()
" Keybinds Index
@@ -17,7 +18,7 @@ call plug#end()
" Control + P -> Runs portuguese spelling check
" Control + E -> Runs english spelling check
" Control + S -> Disables any spelling check
-" Control + H,J,K,L -> Movement between splits
+" Alt + H,J,K,L -> Movement between splits
" Control + T -> Opens up NERDTree
" Control + Z -> Toggles Tag List from current program
" :Dox -> Runs doxygen documentation program
@@ -37,6 +38,12 @@ set inccommand=split
set incsearch
set wildmode=longest,list,full
set relativenumber
+set cursorline
+set cursorcolumn
+
+highlight CursorLine ctermbg=red cterm=bold guibg=#2b2b2b
+highlight CursorColumn ctermbg=red cterm=bold guibg=#2b2b2b
+
" Autocommands
map <F5> :!compiler '%' <CR>
@@ -46,12 +53,18 @@ map <C-e> :set spell spelllang=en_us <CR>
map <C-s> :set nospell <CR>
map <C-i> gg=G
+" Remove trailing whitespace on save
+autocmd BufWritePre * %s/\s\+$//e
+
+" Use system clipboard
+set clipboard+=unnamedplus
+
" Keybinds for splits
" Move between splits
-map <C-h> <C-w>h
-map <C-j> <C-w>j
-map <C-k> <C-w>k
-map <C-l> <C-w>l
+map <A-h> <C-w>h
+map <A-j> <C-w>j
+map <A-k> <C-w>k
+map <A-l> <C-w>l
" Splits position
set splitbelow splitright
diff --git a/.config/surf/bookmarks b/.config/surf/bookmarks
deleted file mode 100644
index fff7ddb..0000000
--- a/.config/surf/bookmarks
+++ /dev/null
@@ -1,14 +0,0 @@
-rafa_99.gitlab.io
-lukesmith.xyz
-mail.protonmail.com/login
-moodle.ips.pt/1920/login/index.php
-www.si.ips.pt/ests_si/web_page.Inicial
-gitlab.com/rafa_99
-suckless.org
-wiki.archlinux.org
-github.com
-wiki.gentoo.org/wiki/Main_Page
-lbry.tv
-www.reddit.com
-wiki.archlinux.org/index.php/XDG_Base_Directory
-file:///home/rafael/Repositories/rafa_99.gitlab.io/html/index.html
diff --git a/.config/surf/script.js b/.config/surf/script.js
deleted file mode 100755
index f38e07f..0000000
--- a/.config/surf/script.js
+++ /dev/null
@@ -1,293 +0,0 @@
-/* based on chromium plugin code, adapted by Nibble<.gs@gmail.com> */
-var hint_num_str = '';
-var hint_elems = [];
-var hint_open_in_new_tab = false;
-var hint_enabled = false;
-function hintMode(newtab){
- hint_enabled = true;
- if (newtab) {
- hint_open_in_new_tab = true;
- } else {
- hint_open_in_new_tab = false;
- }
- setHints();
- document.removeEventListener('keydown', initKeyBind, false);
- document.addEventListener('keydown', hintHandler, false);
- hint_num_str = '';
-}
-function hintHandler(e){
- e.preventDefault(); //Stop Default Event
- var pressedKey = get_key(e);
- if (pressedKey == 'Enter') {
- if (hint_num_str == '')
- hint_num_str = '1';
- judgeHintNum(Number(hint_num_str));
- } else if (/[0-9]/.test(pressedKey) == false) {
- removeHints();
- } else {
- hint_num_str += pressedKey;
- var hint_num = Number(hint_num_str);
- if (hint_num * 10 > hint_elems.length + 1) {
- judgeHintNum(hint_num);
- } else {
- var hint_elem = hint_elems[hint_num - 1];
- if (hint_elem != undefined && hint_elem.tagName.toLowerCase() == 'a') {
- setHighlight(hint_elem, true);
- }
- }
- }
-}
-function setHighlight(elem, is_active) {
- if (is_active) {
- var active_elem = document.body.querySelector('a[highlight=hint_active]');
- if (active_elem != undefined)
- active_elem.setAttribute('highlight', 'hint_elem');
- elem.setAttribute('highlight', 'hint_active');
- } else {
- elem.setAttribute('highlight', 'hint_elem');
- }
-}
-function setHintRules() {
- if (document.styleSheets.length < 1) {
- var style = document.createElement("style");
- style.appendChild(document.createTextNode(""));
- document.head.appendChild(style);
- }
- var ss = document.styleSheets[0];
- ss.insertRule('a[highlight=hint_elem] {background-color: yellow}', 0);
- ss.insertRule('a[highlight=hint_active] {background-color: lime}', 0);
-}
-function deleteHintRules() {
- var ss = document.styleSheets[0];
- ss.deleteRule(0);
- ss.deleteRule(0);
-}
-function judgeHintNum(hint_num) {
- var hint_elem = hint_elems[hint_num - 1];
- if (hint_elem != undefined) {
- execSelect(hint_elem);
- } else {
- removeHints();
- }
-}
-function execSelect(elem) {
- var tag_name = elem.tagName.toLowerCase();
- var type = elem.type ? elem.type.toLowerCase() : "";
- if (tag_name == 'a' && elem.href != '') {
- setHighlight(elem, true);
- // TODO: ajax, <select>
- if (hint_open_in_new_tab)
- window.open(elem.href);
- else location.href=elem.href;
- } else if (tag_name == 'input' && (type == "submit" || type == "button" || type == "reset")) {
- elem.click();
- } else if (tag_name == 'input' && (type == "radio" || type == "checkbox")) {
- // TODO: toggle checkbox
- elem.checked = !elem.checked;
- } else if (tag_name == 'input' || tag_name == 'textarea') {
- elem.focus();
- elem.setSelectionRange(elem.value.length, elem.value.length);
- }
- removeHints();
-}
-function setHints() {
- setHintRules();
- var win_top = window.scrollY;
- var win_bottom = win_top + window.innerHeight;
- var win_left = window.scrollX;
- var win_right = win_left + window.innerWidth;
- // TODO: <area>
- var elems = document.body.querySelectorAll('a, input:not([type=hidden]), textarea, select, button');
- var div = document.createElement('div');
- div.setAttribute('highlight', 'hints');
- document.body.appendChild(div);
- for (var i = 0; i < elems.length; i++) {
- var elem = elems[i];
- if (!isHintDisplay(elem))
- continue;
- var pos = elem.getBoundingClientRect();
- var elem_top = win_top + pos.top;
- var elem_bottom = win_top + pos.bottom;
- var elem_left = win_left + pos.left;
- var elem_right = win_left + pos.left;
- if ( elem_bottom >= win_top && elem_top <= win_bottom) {
- hint_elems.push(elem);
- setHighlight(elem, false);
- var span = document.createElement('span');
- span.style.cssText = [
- 'left: ', elem_left, 'px;',
- 'top: ', elem_top, 'px;',
- 'position: absolute;',
- 'font-size: 13px;',
- 'background-color: ' + (hint_open_in_new_tab ? '#ff6600' : 'red') + ';',
- 'color: white;',
- 'font-weight: bold;',
- 'padding: 0px 1px;',
- 'z-index: 100000;'
- ].join('');
- span.innerHTML = hint_elems.length;
- div.appendChild(span);
- if (elem.tagName.toLowerCase() == 'a') {
- if (hint_elems.length == 1) {
- setHighlight(elem, true);
- } else {
- setHighlight(elem, false);
- }
- }
- }
- }
-}
-function isHintDisplay(elem) {
- var pos = elem.getBoundingClientRect();
- return (pos.height != 0 && pos.width != 0);
-}
-function removeHints() {
- if (!hint_enabled)
- return;
- hint_enabled = false;
- deleteHintRules();
- for (var i = 0; i < hint_elems.length; i++) {
- hint_elems[i].removeAttribute('highlight');
- }
- hint_elems = [];
- hint_num_str = '';
- var div = document.body.querySelector('div[highlight=hints]');
- if (div != undefined) {
- document.body.removeChild(div);
- }
- document.removeEventListener('keydown', hintHandler, false);
- document.addEventListener('keydown', initKeyBind, false);
-}
-function addKeyBind( key, func, eve ){
- var pressedKey = get_key(eve);
- if( pressedKey == key ){
- eve.preventDefault(); //Stop Default Event
- eval(func);
- }
-}
-document.addEventListener( 'keydown', initKeyBind, false );
-function initKeyBind(e){
- var t = e.target;
- if( t.nodeType == 1){
- addKeyBind( 'C-f', 'hintMode()', e );
- addKeyBind( 'C-F', 'hintMode(true)', e );
- addKeyBind( 'C-c', 'removeHints()', e );
- }
-}
-var keyId = {
- "U+0008" : "BackSpace",
- "U+0009" : "Tab",
- "U+0018" : "Cancel",
- "U+001B" : "Esc",
- "U+0020" : "Space",
- "U+0021" : "!",
- "U+0022" : "\"",
- "U+0023" : "#",
- "U+0024" : "$",
- "U+0026" : "&",
- "U+0027" : "'",
- "U+0028" : "(",
- "U+0029" : ")",
- "U+002A" : "*",
- "U+002B" : "+",
- "U+002C" : ",",
- "U+002D" : "-",
- "U+002E" : ".",
- "U+002F" : "/",
- "U+0030" : "0",
- "U+0031" : "1",
- "U+0032" : "2",
- "U+0033" : "3",
- "U+0034" : "4",
- "U+0035" : "5",
- "U+0036" : "6",
- "U+0037" : "7",
- "U+0038" : "8",
- "U+0039" : "9",
- "U+003A" : ":",
- "U+003B" : ";",
- "U+003C" : "<",
- "U+003D" : "=",
- "U+003E" : ">",
- "U+003F" : "?",
- "U+0040" : "@",
- "U+0041" : "a",
- "U+0042" : "b",
- "U+0043" : "c",
- "U+0044" : "d",
- "U+0045" : "e",
- "U+0046" : "f",
- "U+0047" : "g",
- "U+0048" : "h",
- "U+0049" : "i",
- "U+004A" : "j",
- "U+004B" : "k",
- "U+004C" : "l",
- "U+004D" : "m",
- "U+004E" : "n",
- "U+004F" : "o",
- "U+0050" : "p",
- "U+0051" : "q",
- "U+0052" : "r",
- "U+0053" : "s",
- "U+0054" : "t",
- "U+0055" : "u",
- "U+0056" : "v",
- "U+0057" : "w",
- "U+0058" : "x",
- "U+0059" : "y",
- "U+005A" : "z",
- //"U+005B" : "[",
- //"U+005C" : "\\",
- //"U+005D" : "]",
- "U+00DB" : "[",
- "U+00DC" : "\\",
- "U+00DD" : "]",
- "U+005E" : "^",
- "U+005F" : "_",
- "U+0060" : "`",
- "U+007B" : "{",
- "U+007C" : "|",
- "U+007D" : "}",
- "U+007F" : "Delete",
- "U+00A1" : "¡",
- "U+0300" : "CombGrave",
- "U+0300" : "CombAcute",
- "U+0302" : "CombCircum",
- "U+0303" : "CombTilde",
- "U+0304" : "CombMacron",
- "U+0306" : "CombBreve",
- "U+0307" : "CombDot",
- "U+0308" : "CombDiaer",
- "U+030A" : "CombRing",
- "U+030B" : "CombDblAcute",
- "U+030C" : "CombCaron",
- "U+0327" : "CombCedilla",
- "U+0328" : "CombOgonek",
- "U+0345" : "CombYpogeg",
- "U+20AC" : "€",
- "U+3099" : "CombVoice",
- "U+309A" : "CombSVoice",
-}
-function get_key(evt){
- var key = keyId[evt.keyIdentifier] || evt.keyIdentifier,
- ctrl = evt.ctrlKey ? 'C-' : '',
- meta = (evt.metaKey || evt.altKey) ? 'M-' : '',
- shift = evt.shiftKey ? 'S-' : '';
- if (evt.shiftKey){
- if (/^[a-z]$/.test(key))
- return ctrl+meta+key.toUpperCase();
- if (/^[0-9]$/.test(key)) {
- switch(key) {
- // TODO
- case "4":
- key = "$";
- break;
- };
- return key;
- }
- if (/^(Enter|Space|BackSpace|Tab|Esc|Home|End|Left|Right|Up|Down|PageUp|PageDown|F(\d\d?))$/.test(key))
- return ctrl+meta+shift+key;
- }
- return ctrl+meta+key;
-}
diff --git a/.config/surf/styles/default.css b/.config/surf/styles/default.css
deleted file mode 100755
index c16f245..0000000
--- a/.config/surf/styles/default.css
+++ /dev/null
@@ -1,9 +0,0 @@
-a,div,summary,main,pre,textarea,input,body,td,tr,p,nav,section,button,footer,i,form {
- background-color: #202020 !important;
- background-image: none !important;
- color: #e0e0e0 !important;
-}
-h1,h2,h3,h4,h5,h6,span {
- background-color: #202020 !important;
- color: #e0e0e0 !important;
-}
diff --git a/.local/bin/colorset b/.local/bin/colorset
index ea9d333..dac0f3e 100755
--- a/.local/bin/colorset
+++ b/.local/bin/colorset
@@ -16,7 +16,6 @@ fi
! [ -f "$SUCK"/colors/wal/dmenu ] && mkdir -p "$SUCK"/colors/wal/dmenu
! [ -f "$SUCK"/colors/wal/dwm ] && mkdir -p "$SUCK"/colors/wal/dwm
! [ -f "$SUCK"/colors/wal/st ] && mkdir -p "$SUCK"/colors/wal/st
-! [ -f "$SUCK"/colors/wal/tabbed ] && mkdir -p "$SUCK"/colors/wal/tabbed
# Purging previous colorscheme files
convert "$1" "$SUCK"/colors/wal/wallpaper.png
@@ -25,7 +24,6 @@ convert "$1" "$SUCK"/colors/wal/wallpaper.png
cp ~/.cache/wal/colors-wal-dmenu.h "$SUCK"/colors/wal/dmenu/colors.h
head -7 ~/.cache/wal/colors-wal-dwm.h > "$SUCK"/colors/wal/dwm/colors.h
head -27 ~/.cache/wal/colors-wal-st.h > "$SUCK"/colors/wal/st/colors.h
-cp ~/.cache/wal/colors-wal-tabbed.h "$SUCK"/colors/wal/tabbed/colors.h
# Recompiling Suckless Programs with new colorscheme
cp -rf "$SUCK"/colors/wal/* "$SUCK"
@@ -33,10 +31,10 @@ cp -rf "$SUCK"/colors/wal/wallpaper.png ~/.config/wallpaper
xwallpaper --stretch "$WALLPAPER"
cd "$SUCK"/dwm && git pull ; doas make clean install ; make clean
+cd "$SUCK"/dwmblocks && git pull ; doas make clean install ; make clean
cd "$SUCK"/dmenu && git pull ; doas make clean install ; make clean
cd "$SUCK"/st && git pull ; doas make clean install ; make clean
-cd "$SUCK"/surf && git pull ; doas make clean install ; make clean
-cd "$SUCK"/tabbed && git pull ; doas make clean install ; make clean
cd "$SUCK"/farbfeld && git pull ; doas make clean install ; make clean
cd "$SUCK"/sent && git pull ; doas make clean install ; make clean
+cd "$SUCK"/neovimb && git pull ; doas make clean install ; make clean
cd "$SUCK"/slock && git pull ; doas make clean install ; make clean
diff --git a/.local/bin/screenrecord b/.local/bin/screenrecord
index 7f98bd4..081d9f7 100755
--- a/.local/bin/screenrecord
+++ b/.local/bin/screenrecord
@@ -1,6 +1,4 @@
#!/bin/sh
-#Detecting resol| Grab Curnt| Print Cur Res
-RESOLUTION=$(xrandr -q | grep "\*" | awk '{print $1}')
#FFMPEG Grabs X11 Screen Puts it into a file inside Videos Folder
-ffmpeg -f x11grab -s "$RESOLUTION" -i :0.0 -f alsa -i default ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv
+ffmpeg -y -f x11grab -framerate 60 -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" -i :0.0 -f alsa -i default ~/Videos/Recordings/recording-"$(date '+%Y%m%d_%H%M%S')".mkv
diff --git a/.local/src/suck/colors/BW/tabbed/colors.h b/.local/src/suck/colors/BW/tabbed/colors.h
deleted file mode 100644
index 7de36d7..0000000
--- a/.local/src/suck/colors/BW/tabbed/colors.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Norm Colors */
-static const char* normbgcolor = "#676767";
-static const char* normfgcolor = "#e3e3e3";
-
-/* Sel Colors */
-static const char* selbgcolor = "#040404";
-static const char* selfgcolor = "#e3e3e3";
-
-/* Urg Colors */
-static const char* urgbgcolor = "#575757";
-static const char* urgfgcolor = "#e3e3e3";
diff --git a/.local/src/suck/colors/Cyan/tabbed/colors.h b/.local/src/suck/colors/Cyan/tabbed/colors.h
deleted file mode 100644
index 559a7c4..0000000
--- a/.local/src/suck/colors/Cyan/tabbed/colors.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Norm Colors */
-static const char* normbgcolor = "#396087";
-static const char* normfgcolor = "#a2e9d0";
-
-/* Sel Colors */
-static const char* selbgcolor = "#040A33";
-static const char* selfgcolor = "#a2e9d0";
-
-/* Urg Colors */
-static const char* urgbgcolor = "#C1355D";
-static const char* urgfgcolor = "#a2e9d0";
diff --git a/.local/src/suck/colors/Green/tabbed/colors.h b/.local/src/suck/colors/Green/tabbed/colors.h
deleted file mode 100644
index 1f3edc9..0000000
--- a/.local/src/suck/colors/Green/tabbed/colors.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Norm Colors */
-static const char* normbgcolor = "#4DA779";
-static const char* normfgcolor = "#c0e5c7";
-
-/* Sel Colors */
-static const char* selbgcolor = "#0A1515";
-static const char* selfgcolor = "#c0e5c7";
-
-/* Urg Colors */
-static const char* urgbgcolor = "#20936F";
-static const char* urgfgcolor = "#c0e5c7";
diff --git a/.local/src/suck/colors/Red/tabbed/colors.h b/.local/src/suck/colors/Red/tabbed/colors.h
deleted file mode 100644
index 6532880..0000000
--- a/.local/src/suck/colors/Red/tabbed/colors.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Norm Colors */
-static const char* normbgcolor = "#6D384A";
-static const char* normfgcolor = "#db9c9a";
-
-/* Sel Colors */
-static const char* selbgcolor = "#0f1014";
-static const char* selfgcolor = "#db9c9a";
-
-/* Urg Colors */
-static const char* urgbgcolor = "#7C274D";
-static const char* urgfgcolor = "#db9c9a";
diff --git a/.local/src/suck/sucklessUpdate b/.local/src/suck/sucklessUpdate
index 1e4f51b..3002850 100755
--- a/.local/src/suck/sucklessUpdate
+++ b/.local/src/suck/sucklessUpdate
@@ -11,18 +11,18 @@ SUCK=$(pwd)
#################################
git clone https://gitlab.com/rafa_99/dwm
+git clone https://gitlab.com/rafa_99/dwmblocks
git clone https://gitlab.com/rafa_99/dmenu
git clone https://gitlab.com/rafa_99/st
-git clone https://gitlab.com/rafa_99/surf
-git clone https://gitlab.com/rafa_99/tabbed
+git clone https://gitlab.com/rafa_99/neovimb
git clone https://gitlab.com/rafa_99/farbfeld
git clone https://gitlab.com/rafa_99/sent
git clone https://gitlab.com/rafa_99/slock
cd "$SUCK"/dwm && git pull && git checkout . ;
+cd "$SUCK"/dwmblocks && git pull && git checkout . ;
cd "$SUCK"/dmenu && git pull && git checkout . ;
cd "$SUCK"/st && git pull && git checkout . ;
-cd "$SUCK"/surf && git pull && git checkout . ;
-cd "$SUCK"/tabbed && git pull && git checkout . ;
+cd "$SUCK"/neovimb && git pull && git checkout . ;
cd "$SUCK"/farbfeld && git pull && git checkout . ;
cd "$SUCK"/sent && git pull && git checkout . ;
cd "$SUCK"/slock && git pull && git checkout .
@@ -54,10 +54,9 @@ esac
########################
cd "$SUCK"/dwm && git pull ; doas make clean install ; make clean
+cd "$SUCK"/dwmblocks && git pull ; doas make clean install ; make clean
cd "$SUCK"/dmenu && git pull ; doas make clean install ; make clean
cd "$SUCK"/st && git pull ; doas make clean install ; make clean
-cd "$SUCK"/surf && git pull ; doas make clean install ; make clean
-cd "$SUCK"/tabbed && git pull ; doas make clean install ; make clean
cd "$SUCK"/farbfeld && git pull ; doas make clean install ; make clean
cd "$SUCK"/sent && git pull ; doas make clean install ; make clean
cd "$SUCK"/slock && git pull ; doas make clean install ; make clean
diff --git a/.xprofile b/.xprofile
index 2d22e0d..82dcefe 100755
--- a/.xprofile
+++ b/.xprofile
@@ -1,19 +1,7 @@
#!/bin/sh
-# Detecting Session and it's requirements
-case "$SESSION" in
- bspwm)
- sxhkd &
- polybar laptop &
- ;;
- dwm)
- dwmbar &
- ;;
- xfce)
- ;;
-esac
-
# General Requirements
+dwmblocks &
xwallpaper --stretch "$WALLPAPER" &
picom -f --fade-delta=5 &
setxkbmap pt &
diff --git a/.zprofile b/.zprofile
index f2a524f..cab57ba 100755
--- a/.zprofile
+++ b/.zprofile
@@ -10,7 +10,7 @@ export PATH="$HOME/.local/bin:$PATH"
# Default programs
export EDITOR="nvim"
export TERMINAL="st"
-export BROWSER="tabbed surf -e"
+export BROWSER="neovimb"
export READER="zathura"
export FILE="vifm"
export DISTRO