1
0
Fork 0

add base dotfiles

This commit is contained in:
Lucas Sta Maria 2022-03-20 03:19:38 -04:00
commit 968449de49
No known key found for this signature in database
GPG key ID: 4B9481F3C5068E2E
31 changed files with 2121 additions and 0 deletions

21
.config/bspwm/bspwmrc Executable file
View file

@ -0,0 +1,21 @@
#! /bin/sh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
bspc config border_width 3
bspc config normal_border_color "#919191"
bspc config focused_border_color "#FF6054"
bspc config presel_feedback_color "#CCCCCC"
bspc config window_gap 25
bspc config split_ratio 0.5
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config pointer_follows_monitor true
bspc config pointer_follows_focus false
bspc config focus_follows_pointer true
exec .local/bin/startup

146
.config/eww/eww.scss Normal file
View file

@ -0,0 +1,146 @@
// General styling
* {
all: unset;
}
scale trough {
all: unset;
background-color: #22242b;
box-shadow: 0 2px 3px 2px #06060b;
border-radius: 16px;
min-height: 10px;
min-width: 70px;
margin: 0px 10px 0px 0px;
}
// Main bar styling
.main {
background-color: #0e1419;
color: #e5e1cf;
font-family: "Noto Sans";
font-size: 12px;
}
.leftwidgets {
margin-left: 5px;
margin-right: 50px;
button {
margin: 0px 5px;
border-color: #0e1419;
border-width: 0px;
padding-left: 0em;
padding-right: 0em;
}
.occupied {
color: #919191;
}
.focused {
color: #ff6054;
}
.empty {
color: #444444;
}
}
.rightwidgets {
margin: 0px 10px 0px 5px;
}
.icon-module__icon {
margin: 0px 5px 0px 0px;
font-size: 15px;
}
.player {
color: #e5e1cf;
}
.player__container {
padding-left: 7px;
padding-right: 7px;
border-radius: 10px;
}
.player__container:hover {
background-color: hsla(210, 25%, 25%, 0.3);
}
.power__text {
margin-top: 3px;
}
.brightness__label {
margin-top: 1px;
}
.brightness__bar {
margin-left: 10px;
}
.brightness__bar trough highlight {
background-image: linear-gradient(to right, #e4c9af 30%, #f2cdcd 50%, #e0b089 100% *50);
border-radius: 10px;
min-width: 20px;
}
.volume__bar {
margin-left: 10px;
}
.volume__bar trough highlight {
background-image: linear-gradient(to right, #f2525d 30%, #cc5a61 50%, #c93640 100% *50);
border-radius: 10px;
min-width: 20px;
}
.volume__label {
margin-top: 3px;
}
.timedate__button {
padding: 3px 9px;
border-radius: 5px;
}
.timedate__button:hover {
background-color: hsla(210, 25%, 25%, 0.3);
}
// Song card styling
.songcard {
background-color: #0e1419;
color: #e5e1cf;
font-family: "Noto Sans";
font-size: 12px;
}
.songcard__title {
font-weight: 700;
font-size: 20px;
margin-top: 10px;
margin-bottom: 0px;
}
.songcard__artist {
font-weight: 500;
font-size: 14px;
margin-top: 0px;
margin-bottom: 0px;
color: #919191;
}
.songcard__controls {
margin-top: 0px;
margin-bottom: 10px;
}
.songcard__button {
margin: 0px 3px;
}

223
.config/eww/eww.yuck Normal file
View file

@ -0,0 +1,223 @@
;; Global variables
(deflisten w1 "scripts/workspaces 1")
(deflisten w2 "scripts/workspaces 2")
(deflisten w3 "scripts/workspaces 3")
(deflisten w4 "scripts/workspaces 4")
(deflisten w5 "scripts/workspaces 5")
(deflisten w6 "scripts/workspaces 6")
(deflisten w7 "scripts/workspaces 7")
(deflisten w8 "scripts/workspaces 8")
(deflisten w9 "scripts/workspaces 9")
(deflisten w10 "scripts/workspaces 10")
(deflisten w11 "scripts/workspaces 11")
(deflisten w12 "scripts/workspaces 12")
(deflisten w13 "scripts/workspaces 13")
(deflisten w14 "scripts/workspaces 14")
(deflisten w15 "scripts/workspaces 15")
(deflisten w16 "scripts/workspaces 16")
(deflisten w17 "scripts/workspaces 17")
(deflisten w18 "scripts/workspaces 18")
(deflisten w19 "scripts/workspaces 19")
(deflisten w20 "scripts/workspaces 20")
(deflisten player_listen :initial '{"show": "no", "content": ""}' "scripts/player")
(deflisten player :initial '{"content": "TEST"}' "scripts/player")
(deflisten songcardtitle :initial '(label :class "songcard__title" :text "None Playing")'
"scripts/songcardtitle")
(deflisten songcardartist :initial '(label :class "songcard__artist" :text ".")'
"scripts/songcardartist")
(defpoll songcard_button :interval "1s" "scripts/songcardplayrender")
(defpoll wifi_label :interval "1s" "scripts/wifi")
(defpoll volume_level :interval "1s" "scripts/volume")
(defpoll volume_label :initial '{"icon": "", content: "0"}'
:interval "1s"
"scripts/volumelabel")
(defpoll brightness_level :interval "1s" "scripts/brightness")
(defpoll brightness_label :interval "1s" "scripts/brightnesslabel")
(defpoll battery_level :interval "15s" "scripts/battery")
(defpoll currtime :interval "1s" "scripts/currtime")
(defvar songcard_reveal false)
(defvar brightness_reveal false)
(defvar volume_reveal false)
(defvar timedate_reveal false)
;; Main widget
(defwindow main
:monitor 0
:geometry (geometry :x "-2px"
:y "15px"
:width "98%"
:height "30px"
:anchor "top center")
:stacking "bg"
:reserve (struts :distance "50px" :side "top")
:windowtype "dialog"
:wm-ignore false
(container))
;; The main container for all the widgets
(defwidget container []
(centerbox :orientation "horizontal"
:space-evenly true
(leftwidgets)
(middlewidgets)
(rightwidgets)))
;; Left widgets
(defwidget leftwidgets []
(box :spacing 4
:orientation "horizontal"
:halign "start"
:valign "center"
:class "leftwidgets"
(literal :content w1)
(literal :content w2)
(literal :content w3)
(literal :content w4)
(literal :content w5)
(literal :content w6)
(literal :content w7)
(literal :content w8)
(literal :content w9)
(literal :content w10)
(literal :content w11)
(literal :content w12)
(literal :content w13)
(literal :content w14)
(literal :content w15)
(literal :content w16)
(literal :content w17)
(literal :content w18)
(literal :content w19)
(literal :content w20)))
;; Middle widgets
(defwidget middlewidgets []
(player))
;; Spotify widget
(defwidget player []
(button :onclick "scripts/songcardshow"
:class "player__container"
(icon-module :class "player"
:icon ""
:visible {player_listen.show == "yes"}
(literal :content {player_listen.content}))))
;; Right widgets
(defwidget rightwidgets []
(box :class "rightwidgets"
:orientation "horizontal"
:halign "end"
:valign "center"
:space-evenly "false"
:spacing 10
(wifi)
(brightness)
(volume)
(power)
(timedate)))
;; A widget that displays the current wifi SSID
(defwidget wifi []
(icon-module :icon "↑"
(literal :content {wifi_label})))
;; A widget for tracking brightness
(defwidget brightness []
(eventbox :onhover "eww update brightness_reveal=true"
:onhoverlost "eww update brightness_reveal=false"
(icon-module :icon "☼"
(literal :content {brightness_label})
(revealer :transition "slideleft"
:reveal brightness_reveal
:duration "350ms"
(scale :class "brightness__bar"
:orientation "horizontal"
:value brightness_level
:min 0
:max 100
:onchange "brightnessctl set {}%")))))
;; A widget for tracking volume
(defwidget volume []
(eventbox :onhover "eww update volume_reveal=true"
:onhoverlost "eww update volume_reveal=false"
(icon-module :icon {volume_label.icon}
(literal :content {volume_label.content})
(revealer :transition "slideleft"
:reveal volume_reveal
:duration "350ms"
(scale :class "volume__bar"
:orientation "horizontal"
:value volume_level
:min 0
:max 100
:onchange "pamixer --set-volume $(printf \"%.0f\" \"{}\")")))))
;; A widget for tracking battery
(defwidget power []
(icon-module :class "power"
:icon "⏻"
:visible true
(literal :content {battery_level})))
;; A widget for tracking time and date
(defwidget timedate []
(box :class "timedate"
:orientation "horizontal"
:space-evenly false
:valign "center"
:halign "end"
(button :class "timedate__button"
:onclick "scripts/boolflip timedate_reveal"
(literal :content {currtime}))))
;; A module with an icon attached
(defwidget icon-module [icon ?class ?visible]
(box :class "${class} icon-module"
:orientation "horizontal"
:halign "end"
:valign "center"
:space-evenly false
:visible {visible ?: true}
(label :class "icon-module__icon" :text "${icon}")
(children)))
; The song card widget
(defwindow songcard
:monitor 0
:geometry (geometry :x "0px"
:y "70px"
:width "350px"
:height "50px"
:anchor "top center")
:stacking "fg"
:reserve (struts :distance "50px" :side "top")
:windowtype "dialog"
:wm-ignore false
(box :orientation "vertical"
;; song metadata
(box :orientation "vertical"
:halign "center"
:valign "top"
(literal :content {songcardtitle})
(literal :content {songcardartist})
;; song controls
(centerbox :class "songcard__controls"
:orientation "horizontal"
:valign "center"
:halign "center"
(button :onclick "scripts/songback"
:class "songcard__button"
(image :path "img/musicback.png" :image-width 20 :image-height 20))
(button :onclick "scripts/songplay"
:class "songcard__button"
(literal :content {songcard_button}))
(button :onclick "scripts/songnext"
:class "songcard__button"
(image :path "img/musicnext.png" :image-width 20 :image-height 20))))))

3
.config/eww/scripts/battery Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo "(label :class \"power__text\" :text \"$(cat /sys/class/power_supply/BAT0/capacity)%\")"

10
.config/eww/scripts/boolflip Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
var="$1"
val=`eww get ${var}`
if [ "$val" == "true" ]; then
eww update "$var"=false
else
eww update "$var"=true
fi

9
.config/eww/scripts/brightness Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
level=$(brightnessctl get)
max=$(brightnessctl max)
raw_percent=$(echo "scale=2 ; $level / $max" | bc)
percent=$(echo "$raw_percent*100" | bc)
final_percent=${percent%.*}
echo "$final_percent"

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
level=$(brightnessctl get)
max=$(brightnessctl max)
raw_percent=$(echo "scale=2 ; $level / $max" | bc)
percent=$(echo "$raw_percent*100" | bc)
final_percent=${percent%.*}
echo "(label :class \"brightness__label\" :text \"$final_percent%\")"

12
.config/eww/scripts/currtime Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
var="timedate_reveal"
val=`eww get ${var}`
if [ "$val" == true ]; then
time=`date +"%F %T"`
echo "(label :text \"$time\")"
else
time=`date +"%R"`
echo "(label :text \"$time\")"
fi

17
.config/eww/scripts/player Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
echo "{\"show\": \"no\", \"content\": \"\"}"
while true
do
line=$(spt playback --status -f "%s:%a - %t" 2> /dev/null)
IFS=':' read -ra ELS <<< "$line"
button=${ELS[0]}
content=${ELS[1]}
if [ "$button" == "▶" ]; then
echo "{\"show\": \"yes\", \"content\": \"(label :text \\\"$content\\\")\"}"
else
echo "{\"show\": \"no\", \"content\": \"\"}"
fi
sleep 1
done

3
.config/eww/scripts/songback Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
spt playback --previous

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
echo "(label :class \"songcard__artist\" :text \".\")"
while true
do
content=$(spt playback --status -f "%a" 2> /dev/null)
echo "(label :class \"songcard__artist\" :text \"${content}\")"
sleep 1
done

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
button=$(spt playback --status -f "%s" 2>/dev/null)
if [ "$button" == "▶" ]; then
echo "(image :path \"img/musicpause.png\" :image-width 40 :image-height 40)"
else
echo "(image :path \"img/musicplay.png\" :image-width 40 :image-height 40)"
fi

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
show=$(eww get songcard_reveal)
if [ "$show" == "false" ]; then
eww open songcard && eww update songcard_reveal=true
else
eww close songcard && eww update songcard_reveal=false
fi
./boolflip songcard_reveal

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
echo "(label :class \"songcard__title\" :text \"None Playing\")"
while true
do
content=$(spt playback --status -f "%t" 2> /dev/null)
echo "(label :class \"songcard__title\" :text \"${content}\")"
sleep 1
done

3
.config/eww/scripts/songnext Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
spt playback --next

3
.config/eww/scripts/songplay Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
spt playback --toggle

9
.config/eww/scripts/volume Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
raw_percent=$(pamixer --get-volume-human)
if [ "$raw_percent" == "muted" ]; then
echo "0"
else
percent=$(echo "$raw_percent" | sed 's/[^0-9]*//g')
echo "$percent"
fi

20
.config/eww/scripts/volumelabel Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
raw_percent=$(pamixer --get-volume-human)
if [ "$raw_percent" == "muted" ]; then
echo "{\"icon\": \"\", \"content\": \"(label :class \\\"volume__label\\\" :text \\\"muted\\\")\"}"
else
percent=$(echo "$raw_percent" | sed 's/[^0-9]*//g')
#if [ "$percent" -gt 66 ]; then
# icon=""
#elif [ "$percent" -gt 33 ]; then
# icon=""
#elif [ "$percent" -gt 0 ]; then
# icon=""
#else
# icon=""
#fi
icon=""
volume="$percent%"
echo "{\"icon\": \"${icon}\", \"content\": \"(label :class \\\"volume__label\\\" :text \\\"${volume}\\\")\"}"
fi

8
.config/eww/scripts/wifi Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
wifi=`nmcli c show --active | tail -n 1 | sed 's/ .*//g'`
if [ ${#wifi} -gt 0 ]; then
echo "(label :text \"${wifi}\")"
else
echo ""
fi

29
.config/eww/scripts/workspaces Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Checks if a list ($1) contains an element ($2)
contains() {
for e in $1; do
[ "$e" == "$2" ] && echo 1 && return
done
echo 0
}
workspaces() {
icon=""
isfocused=$(bspc query -D -d focused --names | grep -w "$1")
isoccupied=$(bspc query -D -d .occupied --names | grep -w "$1")
if [ ${#isfocused} -ge 1 ]; then
class="focused"
elif [ ${#isoccupied} -ge 1 ]; then
class="occupied"
else
class="empty"
fi
echo "(button :onclick \"bspc desktop -f '^$1'\" :class \"$class\" \"$icon\")"
}
workspaces $1
bspc subscribe desktop node_transfer | while read -r _ ; do
workspaces $1
done

View file

@ -0,0 +1,301 @@
snippet template "template for comp prog"
#include <bits/stdc++.h>
using namespace std;
int MOD = 1000000007;
int main() {
ios::sync_with_stdio();
cin.tie(0);
$0
}
endsnippet
snippet if "if statement"
if ($1) {
$0
}
endsnippet
snippet while "while loop"
while ($1) {
$0
}
endsnippet
snippet fori "for i" w
for (int i = 0; i < $1; i++) {
$0
}
endsnippet
snippet forj "for j" w
for (int j = 0; j < $1; j++) {
$0
}
endsnippet
snippet fork "for k" w
for (int k = 0; k < $1; k++) {
$0
}
endsnippet
snippet fora "for auto" w
for (&auto i : $1) {
$0
}
endsnippet
snippet print "print" w
cout << $1 << '\n';
$0
endsnippet
snippet printv "print vector" w
for (int i = 0; i < $1.size(); i++) {
cout << $1[i] << '\n';
}
$0
endsnippet
snippet ins "input string" w
string $1;
cin >> $1;
$0
endsnippet
snippet ini "input int" w
int $1;
cin >> $1;
$0
endsnippet
snippet viin "input vector int" w
int n;
cin >> n;
vector<int> $1;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
$1.push_back(a);
}
$0
endsnippet
snippet vsin "input vector string" w
int n;
cin >> n;
vector<string> $1;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
$1.push_back(s);
}
$0
endsnippet
snippet sort "sort iterator" w
sort($1.begin(), $1.end());
$0
endsnippet
snippet sortr "sort reverse iterator" w
sort($1.rbegin(), $1.rend());
$0
endsnippet
snippet sortp "sort iterator pains" w
sort($1.begin(), $1.end(), [](auto &left, auto& right) {
$0
});
endsnippet
snippet rev "reverse iterator" w
reverse($1.begin(), $1.end());
$0
endsnippet
snippet sum "sum vector" w
accumulate($1.begin(), $1.end(), 0);
$0
endsnippet
snippet vec "vector" w
vector<$1> $2;
$0
endsnippet
snippet vvec "vector vector" w
vector<vector<$1>> $2;
$0
endsnippet
snippet vi "vector int" w
vector<int> $1;
$0
endsnippet
snippet vvi "vector vector int" w
vector<vector<int>> $1;
$0
endsnippet
snippet vii "vector pair int" w
vector<pair<int, int>> $1;
$0
endsnippet
snippet vs "vector string" w
vector<string> $1;
$0
endsnippet
snippet vvs "vector vector string" w
vector<vector<string>> $1;
$0
endsnippet
snippet vss "vector pair int" w
vector<pair<string,string>> $1;
$0
endsnippet
snippet vsi "vector pair string int" w
vector<pair<string,int>> $1;
$0
endsnippet
snippet vis "vector pair int string" w
vector<pair<int,string>> $1;
$0
endsnippet
snippet .pb "vector push back" i
.push_back($1)$0
endsnippet
snippet os "ordered set" w
set<$1> $2;
$0
endsnippet
snippet osi "ordered set int" w
set<int> $1;
$0
endsnippet
snippet oss "ordered set string" w
set<string> $1;
$0
endsnippet
snippet us "unordered set" w
unordered_set<$1> $2;
$0
endsnippet
snippet usi "unordered set int" w
unordered_set<int> $1;
$0
endsnippet
snippet uss "unordered set string" w
unordered_set<string> $1;
$0
endsnippet
snippet om "ordered map" w
map<$1, $2> $3;
$0
endsnippet
snippet omii "ordered map int int" w
map<int, int> $1;
$0
endsnippet
snippet omss "ordered map int int" w
map<string, string> $1;
$0
endsnippet
snippet omsi "ordered map string int" w
map<string, int> $1;
$0
endsnippet
snippet omis "ordered map int string" w
map<int, string> $1;
$0
endsnippet
snippet um "unordered map" w
unordered_map<$1, $2> $3;
$0
endsnippet
snippet umii "unordered map int int" w
unordered_map<int, int> $1;
$0
endsnippet
snippet umss "unordered map int int" w
unordered_map<string, string> $1;
$0
endsnippet
snippet umsi "unordered map string int" w
unordered_map<string, int> $1;
$0
endsnippet
snippet umis "unordered map int string" w
unordered_map<int, string> $1;
$0
endsnippet
snippet que "queue" w
queue<$1> $2;
$0
endsnippet
snippet qi "queue integer" w
queue<int> $1;
$0
endsnippet
snippet qs "queue string" w
queue<string> $1;
$0
endsnippet
snippet sta "stack" w
stack<$1> $2;
$0
endsnippet
snippet si "stack int" w
stack<int> $1;
$0
endsnippet
snippet ss "stack string" w
stack<string> $1;
$0
endsnippet
snippet pq "priority queue" w
priority_queue<$1> $2;
$0
endsnippet
snippet pqi "priority queue int" w
priority_queue<int> $1;
$0
endsnippet
snippet pqs "priority queue string" w
priority_queue<string> $1;
$0
endsnippet

View file

@ -0,0 +1,96 @@
snippet h1 "h1 header" bA
# $0
endsnippet
snippet h2 "h2 header" bA
## $0
endsnippet
snippet h3 "h3 header" bA
### $0
endsnippet
snippet h4 "h4 header" bA
#### $0
endsnippet
snippet h5 "h5 header" bA
##### $0
endsnippet
snippet h6 "h6 header" bA
###### $0
endsnippet
snippet link "link"
[$1]($2)$0
endsnippet
snippet img "image"
![$2]($1)$0
endsnippet
snippet im "inline math"
\$$0\$
endsnippet
snippet am "display math"
\$\$
$0
\$\$
endsnippet
snippet cb "code block" bA
\`\`\`$1
$0
\`\`\`
endsnippet
global !p
# A overkill(dirty) table with automatic alignment feature
def create_table(snip):
# retrieving single line from current string and treat it like tabstops count
placeholders_string = snip.buffer[snip.line].strip()
rows_amount = int(placeholders_string[0])
columns_amount = int(placeholders_string[1])
prefix_str = "from vimsnippets import display_width;"
# erase current line
snip.buffer[snip.line] = ""
# create anonymous snippet with expected content and number of tabstops
anon_snippet_title = "| "
anon_snippet_delimiter = "|"
for col in range(1, columns_amount+1):
sync_rows = [x*columns_amount+col for x in range(rows_amount+1)]
sync_str = ",".join(["t[{0}]".format(x) for x in sync_rows])
max_width_str = "max(list(map(display_width, [" + sync_str + "])))"
cur_width_str = "display_width(t[" + str(col) + "])"
rv_val = "(" + max_width_str + "-" + cur_width_str + ")*' '"
anon_snippet_title += "${" + str(col) + ":head" + str(col)\
+ "}`!p " + prefix_str + "snip.rv=" + rv_val + "` | "
anon_snippet_delimiter += ":`!p " + prefix_str + "snip.rv = "\
+ max_width_str + "*'-'" + "`-|"
anon_snippet_title += "\n"
anon_snippet_delimiter += "\n"
anon_snippet_body = ""
for row in range(1, rows_amount+1):
body_row = "| "
for col in range(1, columns_amount+1):
sync_rows = [x*columns_amount+col for x in range(rows_amount+1)]
sync_str = ",".join(["t[{0}]".format(x) for x in sync_rows])
max_width_str = "max(list(map(display_width, [" + sync_str + "])))"
cur_width_str = "display_width(t[" + str(row*columns_amount+col) + "])"
rv_val = "(" + max_width_str + "-" + cur_width_str + ")*' '"
placeholder = "R{0}C{1}".format(row, col)
body_row += "${" + str(row*columns_amount+col) + ":" + placeholder\
+ "}`!p " + prefix_str + "snip.rv=" + rv_val + "` | "
body_row += "\n"
anon_snippet_body += body_row
anon_snippet_table = anon_snippet_title + anon_snippet_delimiter + anon_snippet_body
# expand anonymous snippet
snip.expand_anon(anon_snippet_table)
endglobal
post_jump "create_table(snip)"
snippet "tb([1-9][1-9])" "Fancy table" br
`!p snip.rv = match.group(1)`
endsnippet

View file

@ -0,0 +1,262 @@
# Document
snippet importmath "amsmath amssymb"
\usepackage{amsmath}
\usepackage{amssymb}
endsnippet
snippet importgeo "geometry"
\usepackage[left=2cm,top=2cm]{geometry}
endsnippet
snippet importenum "enum item"
\usepackage{enumitem}
endsnippet
snippet setlist "set list"
\setlist[enumerate,$1]{label={\roman*.}}
endsnippet
snippet titleneu "Lucas NEU Author Title"
\title{$1}
\author {
Sta. Maria, Lucas \\\\
\texttt{stamaria.l@northeastern.edu}
}
\date{`date +"%B %d, %Y"`}
$0
endsnippet
snippet titlenor "Lucas Normal Author Title"
\title{$1}
\author {
Sta. Maria, Lucas \\\\
\texttt{stamaria.l@northeastern.edu}
}
\date{`date +"%B %d, %Y"`}
$0
endsnippet
snippet worddoc "Word document"
\documentclass{article}
\usepackage{wordlike}
\PassOptionsToPackage{margin=1in}{geometry}
\usepackage[hang,flushmargin]{footmisc}
\usepackage[parfill]{parskip}
$0
endsnippet
# Text Formatting
snippet bold "bold font"
\textbf{$1}$0
endsnippet
snippet ita "italic font"
\textit{$1}$0
endsnippet
snippet boi "bold italic font"
\textbf{\textit{$1}}$0
endsnippet
snippet ul "underline font"
\underline{$1}$0
endsnippet
snippet ... "ldots"
\ldots
endsnippet
snippet fn "footnote" i
\footnote{$0}
endsnippet
# General Shortcuts
snippet beg "\begin{} / end{}"
\begin{$1}
$0
\end{$1}
endsnippet
snippet olist "ordered list"
\begin{enumerate}
\item $0
\end{enumerate}
endsnippet
snippet ulist "unordered list"
\begin{itemize}
\item $0
\end{itemize}
endsnippet
# Math Shortcuts
snippet * "cdot" iA
\cdot
endsnippet
snippet im "inline math"
\$$0\$
endsnippet
snippet dm "display math"
\$\$
$0
\$\$
endsnippet
snippet am "align math"
\begin{align}
$0
\end{align}
endsnippet
snippet nonum "no number"
\nonumber $0
endsnippet
# Math Symbols Shortcuts
snippet mbb "\mathbb" iA
$1\mathbb{$2}$0
endsnippet
snippet rarr "right arrow" iA
\rightarrow
endsnippet
snippet larr "left arrow" iA
\leftarrow
endsnippet
snippet set "math set" w
\\\{$1\\\}$0
endsnippet
snippet tf "therefore" w
\therefore$1$0
endsnippet
snippet frac "\frac" w
$1\frac{$2}{$3}$0
endsnippet
snippet sqq "square" iA
^2
endsnippet
snippet cbb "cube" iA
^3
endsnippet
snippet sss "superscript" iA
^{$0}
endsnippet
snippet ssb "subscript" iA
_{$0}
endsnippet
snippet land "logical and" iA
\wedge$0
endsnippet
snippet lor "logical or" iA
\vee$0
endsnippet
snippet lnot "logical not" iA
\neg$0
endsnippet
snippet lxor "logical xor" iA
\veebar$0
endsnippet
snippet sand "set and" i
\cap$0
endsnippet
snippet sor "set or" i
\cup$0
endsnippet
snippet snot "set not" i
\bar{$1}$0
endsnippet
snippet cong "logical congruent" i
\cong $0
endsnippet
snippet ncong "logical not congruent" i
\ncong $0
endsnippet
snippet cap "set cap" i
\cap $0
endsnippet
snippet cup "set cup" i
\cup $0
endsnippet
# Boxes
snippet importcbox "import colored boxes"
\usepackage[most]{tcolorbox}
endsnippet
snippet boxr "red box" wA
\begin{tcolorbox}[colback=red!30!white,colframe=red!30!white, sharp corners]
$0
\end{tcolorbox}
endsnippet
snippet boxb "blue box" wA
\begin{tcolorbox}[colback=blue!30!white,colframe=blue!30!white, sharp corners]
$0
\end{tcolorbox}
endsnippet
snippet boxg "green box" wA
\begin{tcolorbox}[colback=green!30!white,colframe=green!30!white, sharp corners]
$0
\end{tcolorbox}
endsnippet
snippet boxtr "red title box" wA
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=$1]
$0
\end{tcolorbox}
endsnippet
snippet boxtb "blue title box" wA
\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title=$1]
$0
\end{tcolorbox}
endsnippet
snippet boxtg "green title box" wA
\begin{tcolorbox}[colback=green!5!white, colframe=green!75!black,title=$1]
$0
\end{tcolorbox}
endsnippet
snippet proposition "red box" w
\begin{tcolorbox}[colback=red!30!white,colframe=red!30!white, sharp corners]
\textbf{Proposition} \\\\
$0
\end{tcolorbox}
endsnippet
snippet theorem "blue box" w
\begin{tcolorbox}[colback=blue!30!white,colframe=blue!30!white, sharp corners]
\textbf{Theorem} \\\\
$0
\end{tcolorbox}
endsnippet
snippet definition "green box" w
\begin{tcolorbox}[colback=green!30!white,colframe=green!30!white, sharp corners]
\textbf{Definition} \\\\
$0
\end{tcolorbox}
endsnippet

245
.config/nvim/init.vim Normal file
View file

@ -0,0 +1,245 @@
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set scrolloff=1
set expandtab
set smartindent
set autoindent
set cursorline
set number
set rnu
set nowrap
set inccommand=split
set updatetime=100
set mouse+=a
" File settings
au BufReadPost,BufNewFile *.md setlocal tw=80 | PencilHard | nnoremap <C-c> :MarkdownPreview<CR>
au BufReadPost,BufNewFile *.tex nnoremap <C-c> :w<CR>:!pdflatex main.tex<CR>
au BufReadPost,BufNewFile *.md,*.tex setlocal spell | set spelllang=en_US | inoremap <C-l> <c-g>u<ESC>[s1z=`]a<c-g>u
au BufReadPost,BufNewFile *.js,*.ts set sw=2 | set ts=2
" nnoremap : ;
" nnoremap ; :
nnoremap <space> :
tnoremap <silent> <ESC> <C-\><C-n>
nmap <C-z>z :Goyo 80<CR>
nmap <C-z>q :Goyo!<CR>
nnoremap <silent> <C-p> :RainbowToggle<CR>
nnoremap <silent> <C-q> <C-w>s<C-w>j:resize 20<CR>:terminal<CR><S-i>
" Telescope
nnoremap <C-t> :Telescope find_files<CR>
nnoremap <C-h>d :Telescope live_grep<CR>
nnoremap <C-h>u :Telescope lsp_definitions<CR>
nnoremap <C-h>e :Telescope<CR>git_
nnoremap <C-h>h :Telescope<CR>
" lsp
nnoremap <C-x>s :lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
nnoremap <C-x>h :lua vim.lsp.buf.hover()<CR>
nnoremap <C-x>c :lua vim.lsp.buf.code_action()<CR>
nnoremap <C-x>r :lua vim.lsp.buf.rename()<CR>
" Tree
nnoremap <C-s> :NvimTreeToggle<CR>
" Barbar
nnoremap <silent> J :BufferPrevious<CR>
nnoremap <silent> K :BufferNext<CR>
nnoremap <silent> <C-j> :BufferMovePrevious<CR>
nnoremap <silent> <C-k> :BufferMoveNext<CR>
nnoremap <silent> <C-b>q :BufferClose<CR>
" Git Signs
nnoremap <silent> <C-n>b :lua require"gitsigns".blame_line()<CR>
call plug#begin('~/.config/nvim/plugged')
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'ayu-theme/ayu-vim'
Plug 'lewis6991/gitsigns.nvim', {'branch': 'main'}
Plug 'vim-airline/vim-airline'
Plug 'mattn/emmet-vim'
Plug 'reedes/vim-pencil'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/nvim-compe'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'camspiers/animate.vim'
Plug 'Yggdroot/indentLine'
Plug 'frazrepo/vim-rainbow'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'kyazdani42/nvim-tree.lua'
Plug 'romgrk/barbar.nvim'
Plug 'elkowar/yuck.vim'
Plug 'SirVer/ultisnips'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
call plug#end()
" VimTex
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
set conceallevel=0
" Ultisnips
let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<tab>'
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/UltiSnips']
" Markdown Preview
let g:mkdp_auto_close = 0
let g:mkdp_browser = 'surf'
" Compe
let g:compe = {}
let g:compe.enabled = v:true
let g:compe.autocomplete = v:true
let g:compe.debug = v:false
let g:compe.min_length = 1
let g:compe.preselect = 'enable'
let g:compe.throttle_time = 80
let g:compe.source_timeout = 200
let g:compe.incomplete_delay = 400
let g:compe.max_abbr_width = 100
let g:compe.max_kind_width = 100
let g:compe.max_menu_width = 100
let g:compe.documentation = v:true
let g:compe.source = {}
let g:compe.source.path = v:true
let g:compe.source.buffer = v:true
let g:compe.source.calc = v:true
let g:compe.source.nvim_lsp = v:true
let g:compe.source.nvim_lua = v:true
let g:compe.source.vsnip = v:true
let g:compe.source.ultisnips = v:true
" gitsigns
lua << EOF
require('gitsigns').setup {
signs = {
add = {hl = 'GitSignsAdd', text = '+', numhl='GitSignsAddNr', linehl='GitSignsAddLn' },
change = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn' },
delete = {hl = 'GitSignsDelete', text = '-', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn' },
topdelete = {hl = 'GitSignsDelete', text = '-', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn' },
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn' },
}
}
EOF
" indentLine
let g:indentLine_char = '⎸'
let g:indentLine_setConceal = 0
" Tree
let g:nvim_tree_width = 35
lua << EOF
require'lspconfig'.rust_analyzer.setup{}
EOF
lua << EOF
require'lspconfig'.ccls.setup{
init_options = {
cache = {
directory = "/home/priime/.cache/ccls/";
}
}
}
EOF
lua << EOF
require'lspconfig'.pyls.setup{}
EOF
lua << EOF
require'lspconfig'.tsserver.setup{}
EOF
lua << EOF
require'lspconfig'.java_language_server.setup{
cmd = { "/usr/share/java/java-language-server/lang_server_linux.sh" }
}
EOF
lua << EOF
require 'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
},
}
EOF
lua << EOF
require'lspconfig'.vuels.setup{
on_attach = function(client)
client.resolved_capabilities.document_formatting = true
end;
}
EOF
lua << EOF
require'lspconfig'.racket_langserver.setup{}
EOF
fun! Start()
" Don't run if: we have commandline arguments, we don't have an empty
" buffer, if we've not invoked as vim or gvim, or if we'e start in insert mode
if argc() || line2byte('$') != -1 || v:progname !~? '^[-gmnq]\=vim\=x\=\%[\.exe]$' || &insertmode
return
endif
" Start a new buffer ...
enew
" ... and set some options for it
setlocal
\ bufhidden=wipe
\ buftype=nofile
\ nobuflisted
\ nocursorcolumn
\ nocursorline
\ nolist
\ nonumber
\ noswapfile
\ norelativenumber
" Now we can just write to the buffer, whatever you want.
call append('$', "")
for line in split(system('cat /home/priime/.config/nvim/startscreen.vimstart'), '\n')
call append('$', '' . l:line)
endfor
" No modifications to this buffer
setlocal nomodifiable nomodified
" When we go to insert mode start a new buffer, and start insert
nnoremap <buffer><silent> e :enew<CR>
nnoremap <buffer><silent> i :enew <bar> startinsert<CR>
nnoremap <buffer><silent> o :enew <bar> startinsert<CR>
" simple
" set syntax=erlang
" red leaves
" set syntax=html
" blue leaves
set syntax=yaml
endfun
" Run after "doing all the startup stuff"
autocmd VimEnter * call Start()
syntax on
set termguicolors
set t_Co=256
let ayucolor="dark"
colorscheme ayu

View file

@ -0,0 +1,48 @@
& &&&~
&&&&\ //~&&&
&&& &/|& /| /|&&/~
& & & &&&&//~|&&\ \//~
&&&& & & && /\/~&&&/ \//~
& ////~| /|&\/| &
\&&&/|&/&/&\&&&&&&
& & & & & &/|~/~/|/|/~\&&&&&&&&
&&& &&&&& && ///~ \&/&&&//~ &&&&
&&&&& &&&&&&&&&\ &\&&/|&&\&/~&
& &__&\_\__&\&&/~||////~&& & & &
&&&&&&&&&&\&|\_&\/|/~&/&/ && && &&& &
&& &&&&/\_& &&&\_/\_&\~/~/|/|&&&&&&&&&&&&
& &&&& &&&&&&& &&&&&&&///~/||/~/~&_&&&&&&&&&& &
&&&&&&&_ && &&&&&& &&&&\///~/|~//&__&&&&&&&&&& &
&&&& \___&&&&&&& &_&\/|\&\/~//~/ &&&&/ && &
\_ &&&&/ \& &//|/\ _/ && &
\_\__ \_ /\ /|/~/~\ _/_/& & &
\_ \__ \///~&& \&/&& &&&&&&& &&&
\_\_ \//|~& & &&&&& &/&&&&&&&&&&&
/~| /~&&&& & _&&&&&&& &&& &
//|/|/&_&&&&& & &&&
/~\ /~ \& &&&&_&&& &
&&& & & &&& \__/~/~ &&&&&&&&
&&&&&&&&&&&&&&\& & / / &
&& &&&&\_& \_&___| & / //~
&& \_/ \_\_ / //~
& \_ /~
/~
╓───────────╭╱⎨⏆╲╮───────────╖
║ ║
╟────────────────────────────╢
╟────────────────────────────╢
╚════════════════════════════╝
' _ _ '
'_ __ _ __(_|_)_ __ ___ ___'
| '_ \| '__| | | '_ ` _ \ / _ \
| |_) | | | | | | | | | | __/
| .__/|_| |_|_|_| |_| |_|\___|
|_|
[ https://priime.dev ]
Find File <C-t>
New Buffer <C-w>v
Open Terminal <C-q>
Focus Mode <C-z>z

69
.config/picom.conf Normal file
View file

@ -0,0 +1,69 @@
#################################
# Corners #
#################################
corner-radius = 10.0;
round-borders = 1;
rounded-corners-exclude = [
"window_type = 'dock'",
"class_g ?= 'Dmenu'",
];
#################################
# Shadows #
#################################
shadow = true;
shadow-radius = 25;
shadow-opacity = 1;
shadow-offset-x = -25;
shadow-offset-y = -25;
shadow-exclude = [
"window_type = 'dock'",
"class_g ?= 'Dunst'",
];
#################################
# Transparency / Opacity #
#################################
active-opacity = 1.0;
inactive-opacity = 1.0;
inactive-dim-fixed = true;
frame-opacity = 1;
focus-exclude = [
"class_g ?= 'i3lock'",
"class_g ?= 'Dmenu'",
];
opacity-rule = [
];
#################################
# Background-Blurring #
#################################
blur-kern = "3x3box";
blur: {
method = "dual_kawase";
strength = 10;
background = true;
background-frame = false;
background-fixed = false;
}
blur-background-exclude = [
"class_g ?= 'peek'",
"class_g ?= 'Peek'"
# "window_type = 'dock'",
#
];
#################################
# General Settings #
#################################
#experimental-backends = true;
backend = "glx";
glx-no-stencil = true;
vsync = true;

206
.config/sxhkd/sxhkdrc Normal file
View file

@ -0,0 +1,206 @@
#
# wm independent hotkeys
#
# terminal emulator
super + Return
kitty
# program launcher
super + r
/home/priime/.config/rofi/scripts/rofi-apps
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
#
# bspwm hotkeys
#
# quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
super + {_,shift + }c
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
super + g
bspc node -s biggest.window
#
# state/flags
#
# set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
# focus/swap
#
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# focus the next/previous window in the current desktop
# super + {_,shift + }c
# bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + {e,u}
bspc desktop -f {prev,next}.local
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# focus the older or newer node in the focus history
# super + {o,i}
# bspc wm -h off; \
# bspc node {older,newer} -f; \
# bspc wm -h on
# focus or send to the given desktop
super + {_, shift + } ampersand
bspc {desktop -f, node -d} '^1'
super + {_, shift + } bracketleft
bspc {desktop -f, node -d} '^2'
super + {_, shift + } braceleft
bspc {desktop -f, node -d} '^3'
super + {_, shift + } braceright
bspc {desktop -f, node -d} '^4'
super + {_, shift + } parenleft
bspc {desktop -f, node -d} '^5'
super + {_, shift + } equal
bspc {desktop -f, node -d} '^6'
super + {_, shift + } asterisk
bspc {desktop -f, node -d} '^7'
super + {_, shift + } parenright
bspc {desktop -f, node -d} '^8'
super + {_, shift + } plus
bspc {desktop -f, node -d} '^9'
super + {_, shift + } bracketright
bspc {desktop -f, node -d} '^10'
super + control + {_, shift + } ampersand
bspc {desktop -f, node -d} '^11'
super + control + {_, shift + } bracketleft
bspc {desktop -f, node -d} '^12'
super + control + {_, shift + } braceleft
bspc {desktop -f, node -d} '^13'
super + control + {_, shift + } braceright
bspc {desktop -f, node -d} '^14'
super + control + {_, shift + } parenleft
bspc {desktop -f, node -d} '^15'
super + control + {_, shift + } equal
bspc {desktop -f, node -d} '^16'
super + control + {_, shift + } asterisk
bspc {desktop -f, node -d} '^17'
super + control + {_, shift + } parenright
bspc {desktop -f, node -d} '^18'
super + control + {_, shift + } plus
bspc {desktop -f, node -d} '^19'
super + control + {_, shift + } bracketright
bspc {desktop -f, node -d} '^20'
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
#
# misc keybinds
#
# screenshot
super + shift + s
flameshot gui
Print
flameshot full -c
# brightness
XF86MonBrightness{Up,Down}
brightnessctl set {+5%,5%-}
super + shift + {a,o}
brightnessctl set {+5%,5%-}
# volume
XF86Audio{Raise,Lower}Volume
pactl set-sink-volume @DEFAULT_SINK@ {+,-}2%
XF86AudioMute
pamixer --toggle-mute
super + {a,o}
pactl set-sink-volume @DEFAULT_SINK@ {+,-}2%

13
.config/zathura/zathurarc Normal file
View file

@ -0,0 +1,13 @@
set recolor-lightcolor "#0e1419"
set default-bg "#0e1419"
set inputbar-bg "#0e1419"
set inputbar-fg "#ffffff"
set notification-bg "#0e1419"
set notification-fg "#ffffff"
set statusbar-bg "#0e1419"
set statusbar-fg "#ffffff"
set tabbar-bg "#0e1419"
set tabbar-fg "#ffffff"
set tabbar-focus-bg "#ffffff"
set tabbar-focus-fg "#0e1419"
set selection-clipboard clipboard