Skip to content

Commit ff009f0

Browse files
committed
Remove redundant stuff, minor upgrades to work with EC2 and add github actions(Weekly CI)
1 parent 050526d commit ff009f0

File tree

20 files changed

+85
-4549
lines changed

20 files changed

+85
-4549
lines changed

.github/workflows/ubuntu.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: CI
2+
on:
3+
push:
4+
schedule:
5+
- cron: '0 0 * * 0' # Runs at 00:00 UTC every Sunday
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4 # Checks out the current repository
12+
- name: "Install.sh"
13+
run: "bash install.sh server"

conky/conkylock

Lines changed: 0 additions & 19 deletions
This file was deleted.

conky/conkyrc

Lines changed: 0 additions & 184 deletions
This file was deleted.

git/gitconfig

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
[user]
22
name = meetps
33
email = meetshah1995@gmail.com
4-
54
[url "https://github.com/"]
65
insteadOf = gh:
7-
86
[url "https://gist.github.com/"]
97
insteadOf = gist:
10-
118
[url "https://bitbucket.org/"]
129
insteadOf = bb:
13-
1410
[credential]
1511
helper = cache
1612
[core]
1713
editor = vim
18-
pager = "diff-so-fancy | less --tabs=4 -RFX"
19-
14+
pager = delta
2015
[push]
2116
default = simple
2217
[color]
2318
ui = true
2419
[alias]
2520
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
2621
st = "status"
22+
[interactive]
23+
diffFilter = delta --color-only
24+
[delta]
25+
navigate = true
26+
side-by-side = true
27+
line-numbers = true
28+
dark = true
29+
features = decorations line-numbers

i3/finance.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import requests
2+
from bs4 import BeautifulSoup
3+
4+
urls = ["https://www.cnbc.com/quotes/%40SI.1",
5+
"https://www.cnbc.com/quotes/%40GC.1",
6+
"https://www.cnbc.com/quotes/INR="]
7+
8+
selector = "#quote-page-strip > div.QuoteStrip-dataContainer > div.QuoteStrip-lastTimeAndPriceContainer > div.QuoteStrip-lastPriceStripContainer > span.QuoteStrip-lastPrice"
9+
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36'}
10+
11+
def get_price(url):
12+
response = requests.get(url, headers=headers)
13+
soup = BeautifulSoup(response.content, 'html.parser')
14+
try:
15+
price = soup.select_one(selector).get_text()
16+
except:
17+
price = 0
18+
price = price.replace(",", "")
19+
return float(price)
20+
21+
prices = [get_price(url) for url in urls]
22+
prices_sanitized = list(map(str, [int(p * 100) / 100 for p in prices]))
23+
icons = ['🥈: ', '🥇: ', '$->₹: ']
24+
final_str = ' | '.join([icons[i] + prices_sanitized[i] for i in range(len(prices))])
25+
print(final_str)

i3/py3status_config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ external_script chogadiya {
9191
cache_timeout = 1200
9292
}
9393

94+
external_script finance {
95+
format = "{output}"
96+
script_path = "python /usr/bin/finance.py"
97+
cache_timeout = 1200
98+
}
99+
94100

95101
volume_status {
96102
thresholds = [

0 commit comments

Comments
 (0)