Added gtk2.0 theme
parent
181d3b6475
commit
f8b24dd2e9
|
@ -0,0 +1 @@
|
|||
file:///home/tuan/.nextcloud/
|
|
@ -0,0 +1,18 @@
|
|||
# DO NOT EDIT! This file will be overwritten by LXAppearance.
|
||||
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
||||
|
||||
include "/home/tuan/.gtkrc-2.0.mine"
|
||||
gtk-theme-name="Sweet"
|
||||
gtk-icon-theme-name="Arc"
|
||||
gtk-font-name="Hack Nerd Font Mono Regular 9"
|
||||
gtk-cursor-theme-name="Adwaita"
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=0
|
||||
gtk-menu-images=0
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle="hintmedium"
|
File diff suppressed because it is too large
Load Diff
|
@ -6,7 +6,7 @@ from PIL import Image
|
|||
|
||||
def screenshot():
|
||||
ss_time = time.time()
|
||||
os.system('scrot /tmp/i3lock.png')
|
||||
os.system('maim -f png /tmp/i3lock.png')
|
||||
print('Screenshot: {}'.format(time.time() - ss_time))
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/zsh
|
||||
|
||||
setxkbmap us,de
|
|
@ -1,68 +0,0 @@
|
|||
import sys
|
||||
from os import stat
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
import json
|
||||
|
||||
|
||||
def get_info():
|
||||
'Gather the City ID and API Key'
|
||||
# First line of the API file in the same directory as this file is the city ID
|
||||
# Second line of the API file in the same directory as this file is the openweathermap-API key
|
||||
try:
|
||||
with open('API', 'r') as f:
|
||||
city_id = f.readline().strip('\n')
|
||||
api_key = f.readline().strip('\n')
|
||||
if city_id == '' or api_key == '':
|
||||
raise FileNotFoundError
|
||||
return [city_id, api_key]
|
||||
except FileNotFoundError:
|
||||
print("Create a file called 'API' and put your city id in the 1st and API-key in the 2nd line.")
|
||||
|
||||
|
||||
def cache_weather():
|
||||
'Cache the weatherinformation as json'
|
||||
city_id, api_key = get_info()
|
||||
url = 'http://api.openweathermap.org/data/2.5/forecast?id={}&APPID={}&units=metric'.format(city_id, api_key)
|
||||
ob_weather = requests.get(url).text
|
||||
with open('weather_cache.json','w') as f:
|
||||
json.dump(ob_weather, f)
|
||||
|
||||
|
||||
# Isn't needed at the moment, might change later
|
||||
def conv_to_epoch(iso_time):
|
||||
'Converts the dt_txt to epoch time(Or any ISO formatted timestamp)'
|
||||
dt_obj = datetime.strptime(iso_time, "%Y-%m-%d %H:%M:%S")
|
||||
return int(dt_obj.strftime("%s"))
|
||||
|
||||
|
||||
def main():
|
||||
# Only request new data, when data is older than 12h
|
||||
# if (os.path.isfile('weather_chache.json')):
|
||||
# if (time.time()-1800000>os.stat('weather_cache.json').st_mtime):
|
||||
# cache_weather()
|
||||
# else:
|
||||
# cache_weather()
|
||||
# Load cached file as dictionary
|
||||
weather = json.loads(json.load(open('weather_cache.json')))
|
||||
|
||||
if(weather['cod']=='200'):
|
||||
lowest_temp = sys.maxsize
|
||||
lowest_time = ''
|
||||
# Only check the next 24h
|
||||
for i in weather['list']:
|
||||
print(i['dt_txt'])
|
||||
print(i['main']['temp'])
|
||||
print(i['weather']['main'])
|
||||
print(i['dt_txt'])
|
||||
print('Time: {} \nTemp: {}'.format(i['dt_txt'], i['main']['temp']))
|
||||
print('Time: {} \nDescription: {}'.format('\t', i['weather']['main']))
|
||||
|
||||
|
||||
else:
|
||||
print("Error.\nDo you have a working internet connection?\nIs your API Key correct?\nIs your city ID correct?")
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(main())
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
# Paths
|
||||
export ZSH="/home/tuan/.oh-my-zsh"
|
||||
export PATH="$PATH:$HOME/.go/bin"
|
||||
export PATH="$PATH:$HOME/.go/bin:$HOME/.local/bin"
|
||||
export GOPATH="$HOME/.go/"
|
||||
|
||||
# Alias
|
||||
|
@ -20,6 +20,11 @@ plugins=(
|
|||
history
|
||||
)
|
||||
|
||||
# History
|
||||
HISTORY_IGNORE='sudo veracrypt *|veracrypt *'
|
||||
|
||||
|
||||
|
||||
# Source
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
|
Loading…
Reference in New Issue