commit d7fa235c3d8e787cdea4682be52a13f9988b149b Author: Curle Date: Mon Dec 14 02:45:11 2020 +0000 My rice dotfiles. Have fun :) diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..6e8135e --- /dev/null +++ b/.bashrc @@ -0,0 +1,21 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +PS1='\[\033[01;31m\]\w \$\[\033[00m\] ' +alias vncserve=`x11vnc -display :0 -forever -o /var/log/x11vnc.log -bg` + +export TZ =: "Europe/London" +export LC_ALL=en_GB.UTF-8 +export LANG=en_GB.UTF-8 +export CLICOLOR=1 +export LS_COLORS="di=32:ln=32:so=33:pi=36:ex=35:bd=34:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43" + +export EDITOR=nano +export PAGER=less + + diff --git a/.conky/syclo-crimson-bottomleft.conkyrc b/.conky/syclo-crimson-bottomleft.conkyrc new file mode 100644 index 0000000..f85cd8f --- /dev/null +++ b/.conky/syclo-crimson-bottomleft.conkyrc @@ -0,0 +1,184 @@ +--[[ +#===================================================================================== +# +# Name : Syclo Conky (Simple System Info & Clock) +# Author : Adhi Pambudi +# https://plus.google.com/+AdhiPambudi +# http://addy-dclxvi.deviantart.com/ +# Github : https://github.com/addy-dclxvi +# Version : v3.0.1 +# License : Distributed under the terms of GNU GPL version 2 or later +# Note : Using template from Erik Dubois +# +#===================================================================================== +# CONKY +# For commands in conky.config section: +# http://conky.sourceforge.net/config_settings.html +# +# For commands in conky.text section: +# http://conky.sourceforge.net/variables.html +# +#===================================================================================== + +]] + + +conky.config = { + +--## Begin Window Settings ##################### + +own_window = true, +own_window_type = 'override', +own_window_transparent = true, +own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky', +own_window_colour = '#000000', +own_window_class = 'Conky', +own_window_title = 'Syclo Conky', +--## ARGB can be used for real transparency +--## NOTE that a composite manager is required for real transparency. +--## This option will not work as desired (in most cases) in conjunction with +--## own_window_type normal +-- own_window_argb_visual yes # Options: yes or no + +--## When ARGB visuals are enabled, this use this to modify the alpha value +--## Use: own_window_type normal +--## Use: own_window_transparent no +--## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. +-- own_window_argb_value 50 + +minimum_width = 420, +minimum_height = 220, +maximum_width = 420, + +gap_x = 0,--## left | right +gap_y = 0,--## up | down + +alignment = 'bottom_left', + +--###################### End Window Settings ### + + +--## Font Settings ############################# +-- Use Xft (anti-aliased font and stuff) +use_xft = true, +--xftfont Liberation Mono:bold:size=9 +font = 'Roboto:size=10', + +-- Alpha of Xft font. Must be a value at or between 1 and 0 ### +xftalpha = 1, +-- Force UTF8? requires XFT ### +override_utf8_locale = true, + +uppercase = false, + +--######################## End Font Settings ### + + +--## Colour Settings ########################### +draw_shades = false,--yes +default_shade_color = 'black', + +draw_outline = false,-- amplifies text if yes +default_outline_color = 'black', + +default_color = '#ffffff',-- PureWhite +color0 = '#DC143C',-- crimson +color1 = '#778899',-- LightSlateGray +color2 = '#D8BFD8',-- Thistle +color3 = '#9ACD32',-- YellowGreen +color4 = '#FFA07A',-- LightSalmon +color5 = '#FFDEAD',-- NavajoWhite +color6 = '#00BFFF',-- DeepSkycrimson +color7 = '#5F9EA0',-- Cadetcrimson +color8 = '#BDB76B',-- DarkKhaki +color9 = '#CD5C5C',-- IndianRed + +--###################### End Colour Settings ### + + +--## Borders Section ########################### + +draw_borders = false, +-- Stippled borders? +stippled_borders = 5, +-- border margins +border_inner_margin = 0, +border_outer_margin = 0, +-- border width +border_width = 0, +-- graph borders +draw_graph_borders = true,--no +--default_graph_size 15 40 + +--####################### End Borders Secton ### + + +--## Miscellaneous Section ##################### + +-- Boolean value, if true, Conky will be forked to background when started. +background = true, +-- Adds spaces around certain objects to stop them from moving other things +-- around, this only helps if you are using a mono font +-- Options: right, left or none +use_spacer = 'none', + +-- Default and Minimum size is 256 - needs more for single commands that +-- "call" a lot of text IE: bash scripts +--text_buffer_size 6144 + +-- Subtract (file system) buffers from used memory? +no_buffers = true, + +-- change GiB to G and MiB to M +short_units = true, + +-- Like it says, ot pads the decimals on % values +-- doesn't seem to work since v1.7.1 +pad_percents = 2, + +-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use +-- $image lots. Set to 0 to disable the image cache. +imlib_cache_size = 0, + +-- Use the Xdbe extension? (eliminates flicker) +-- It is highly recommended to use own window with this one +-- so double buffer won't be so big. +double_buffer = true, + +-- Maximum size of user text buffer, i.e. layout below TEXT line in config file +-- (default is 16384 bytes) +-- max_user_text 16384 + +-- Desired output unit of all objects displaying a temperature. Parameters are +-- either "fahrenheit" or "celsius". The default unit is degree Celsius. +-- temperature_unit Fahrenheit + +--################ End Miscellaneous Section ### + +update_interval = 1, + +}; + +conky.text = [[ +# You can change bg-bottomleft-75.png to bg-bottomleft-50.png for 50% opacity +# Or bg-bottomleft-25.png for 25% opacity +# Or bg-bottomleft-0.png for fully transparent +${image ~/.config/conky/syclo/images/bg/bg-bottomleft-75.png -p 0,0 -s 420x220}\ +${goto 24}${font Roboto:Light:size=72}${color0}\ +${time %H}${color}\ +\ +:\ +\ +${time %M}${font}${color} +\ +${goto 24}${font Roboto:Light:size=20}${voffset 12}${execi 300 LANG=en_US.utf8 LC_TIME=en_US.utf8 date +"%A"},${color}\ +${color0} ${execi 300 LANG=en_US.utf8 LC_TIME=en_US.utf8 date +"%d"}${color}\ + ${execi 300 LANG=en_US.utf8 LC_TIME=en_US.utf8 date +"%B"}${font}${color} +\ + +${goto 24}\ +${font Roboto:Light:pixelsize=12}\ +${image ~/.config/conky/syclo/images/crimson/hdd.png -p 20,170 -s 16x16} ${offset 20}${fs_used /} / ${fs_size /}\ +${image ~/.config/conky/syclo/images/crimson/ram.png -p 140,170 -s 16x16} ${offset 45}$mem / $memmax\ +${image ~/.config/conky/syclo/images/crimson/cpu.png -p 260,170 -s 16x16} ${offset 45}${cpu cpu0}% +]]; \ No newline at end of file diff --git a/.scripts/compile-all-masters.py b/.scripts/compile-all-masters.py new file mode 100644 index 0000000..7dca07a --- /dev/null +++ b/.scripts/compile-all-masters.py @@ -0,0 +1,9 @@ +#!/bin/python3 +from courses import Courses + +for course in Courses(): + lectures = course.lectures + + r = lectures.parse_range_string('all') + lectures.update_lectures_in_master(r) + lectures.compile_master() diff --git a/.scripts/config.py b/.scripts/config.py new file mode 100644 index 0000000..bb2fdde --- /dev/null +++ b/.scripts/config.py @@ -0,0 +1,11 @@ +from datetime import datetime +from pathlib import Path + +def get_week(d=datetime.today()): + return (int(d.strftime("%W")) + 52 - 5) % 52 + +CURRENT_COURSE_SYMLINK = Path('~/university/current-course').expanduser() +CURRENT_COURSE_ROOT = CURRENT_COURSE_SYMLINK.resolve() +CURRENT_COURSE_WATCH_FILE = Path('/tmp/current_course').resolve() +ROOT = Path('~/university/semester-1').expanduser() +DATE_FORMAT = '%a %d %b %Y %H:%M' diff --git a/.scripts/countdown.py b/.scripts/countdown.py new file mode 100644 index 0000000..da59322 --- /dev/null +++ b/.scripts/countdown.py @@ -0,0 +1,223 @@ +#!/usr/bin/python3 +import pickle + +import os +import os.path +import sys + +import re +import math + +import sched +import datetime +import time +import pytz +from dateutil.parser import parse + +import http.client as httplib + +from googleapiclient.discovery import build +from google_auth_oauthlib.flow import InstalledAppFlow +from google.auth.transport.requests import Request + +from courses import Courses + +courses = Courses() + +def authenticate(): + print('Authenticating') + # If modifying these scopes, delete the file token.pickle. + SCOPES = ['https://www.googleapis.com/auth/calendar.readonly'] + creds = None + # The file token.pickle stores the user's access and refresh tokens, and is + # created automatically when the authorization flow completes for the first + # time. + if os.path.exists('token.pickle'): + with open('token.pickle', 'rb') as token: + creds = pickle.load(token) + + # If there are no (valid) credentials available, let the user log in. + if not creds or not creds.valid: + if creds and creds.expired and creds.refresh_token: + print('Refreshing credentials') + creds.refresh(Request()) + else: + print('Need to allow access') + flow = InstalledAppFlow.from_client_secrets_file('credentials.json', SCOPES) + creds = flow.run_local_server(port=0) + # Save the credentials for the next run + with open('token.pickle', 'wb') as token: + pickle.dump(creds, token) + + service = build('calendar', 'v3', credentials=creds) + return service + +def join(*args): + return ' '.join(str(e) for e in args if e) + +def truncate(string, length): + ellipsis = ' ...' + if len(string) < length: + return string + return string[:length - len(ellipsis)] + ellipsis + +def summary(text): + return truncate(re.sub(r'X[0-9A-Za-z]+', '', text).strip(), 50) + +def gray(text): + return '%{F#999999}' + text + '%{F-}' + +def formatdd(begin, end): + minutes = math.ceil((end - begin).seconds / 60) + + if minutes == 1: + return '1 minute' + + if minutes < 60: + return f'{minutes} min' + + hours = math.floor(minutes/60) + rest_minutes = minutes % 60 + + if hours > 5 or rest_minutes == 0: + return f'{hours} hours' + + return '{}:{:02d} hours'.format(hours, rest_minutes) + +def location(text): + if not text: + return '' + match = re.search(r'\((.*)\)', text) + + if not match: + return '' + + return f'{gray("in")} {match.group(1)}' + +def text(events, now): + current = next((e for e in events if e['start'] < now and now < e['end']), None) + + if not current: + nxt = next((e for e in events if now <= e['start']), None) + if nxt: + return join( + summary(nxt['summary']), + gray('in'), + formatdd(now, nxt['start']), + location(nxt['location']) + ) + return '' + + nxt = next((e for e in events if e['start'] >= current['end']), None) + if not nxt: + return join(gray('ends in'), formatdd(now, current['end']) + '!') + + if current['end'] == nxt['start']: + return join( + gray('Ends in'), + formatdd(now, current['end']) + gray('.'), + gray('After this: '), + summary(nxt['summary']), + location(nxt['location']) + ) + + return join( + gray('Ends in'), + formatdd(now, current['end']) + gray('.'), + gray('After this: '), + summary(nxt['summary']), + location(nxt['location']), + gray('after a break from'), + formatdd(current['end'], nxt['start']) + ) + + +def activate_course(event): + course = next( + (course for course in courses + if course.info['title'].lower() in event['summary'].lower()), + None + ) + + if not course: + return + + courses.current = course + + +def main(): + scheduler = sched.scheduler(time.time, time.sleep) + + print('Initializing') + + service = authenticate() + + print('Authenticated') + # Call the Calendar API + timezone = pytz.timezone("Europe/London") + date = datetime.datetime.now() + now = timezone.localize(date) + + morning = now.replace(hour=6, minute=0, microsecond=0) + evening= now.replace(hour=23, minute=59, microsecond=0) + + print('Searching for events') + + def get_events(calendar): + events_result = service.events().list( + calendarId=calendar, + timeMin=morning.isoformat(), + timeMax=evening.isoformat(), + singleEvents=True, + orderBy='startTime' + ).execute() + events = events_result.get('items', []) + return [ + { + 'summary': event['summary'], + 'location': event.get('location', None), + 'start': parse(event['start']['dateTime']), + 'end': parse(event['end']['dateTime']) + } + for event in events + if 'dateTime' in event['start'] + ] + + events = get_events('primary') + # events = get_events('primary') + get_events('school-calendar@import.calendar.google.com') + print('Done') + + DELAY = 60 + + def print_message(): + date = datetime.datetime.now() + timezone = pytz.timezone("Europe/London") + now = timezone.localize(date) + print(text(events, now)) + if now < evening: + scheduler.enter(DELAY, 1, print_message) + + for event in events: + # absolute entry, priority 1 + scheduler.enterabs(event['start'].timestamp(), 1, activate_course, argument=(event, )) + + # Immediate, priority 1 + scheduler.enter(0, 1, print_message) + scheduler.run() + + +def wait_for_internet_connection(url, timeout=1): + while True: + conn = httplib.HTTPConnection(url, timeout=5) + try: + conn.request("HEAD", "/") + conn.close() + return True + except: + conn.close() + +if __name__ == '__main__': + os.chdir(sys.path[0]) + print('Waiting for connection') + wait_for_internet_connection('www.google.com') + main() diff --git a/.scripts/courses.py b/.scripts/courses.py new file mode 100644 index 0000000..f63c45f --- /dev/null +++ b/.scripts/courses.py @@ -0,0 +1,46 @@ +#!/usr/bin/python3 +from pathlib import Path +import yaml + +from lectures import Lectures +from config import ROOT, CURRENT_COURSE_ROOT, CURRENT_COURSE_SYMLINK, CURRENT_COURSE_WATCH_FILE + +class Course(): + def __init__(self, path): + self.path = path + self.name = path.stem + + self.info = yaml.load((path / 'info.yaml').open()) + self._lectures = None + + @property + def lectures(self): + if not self._lectures: + self._lectures = Lectures(self) + return self._lectures + + def __eq__(self, other): + if other == None: + return False + return self.path == other.path + +class Courses(list): + def __init__(self): + list.__init__(self, self.read_files()) + + def read_files(self): + course_directories = [x for x in ROOT.iterdir() if x.is_dir()] + _courses = [Course(path) for path in course_directories] + return sorted(_courses, key=lambda c: c.name) + + @property + def current(self): + return Course(CURRENT_COURSE_ROOT.resolve()) + + @current.setter + def current(self, course): + CURRENT_COURSE_SYMLINK.unlink() + curcourses = [x for x in ROOT.iterdir() if x.isdir()] + if any(course.name in c for c in curcourses): + CURRENT_COURSE_SYMLINK.symlink_to(course.path) + CURRENT_COURSE_WATCH_FILE.write_text('{}\n'.format(course.info['short'])) diff --git a/.scripts/lectures.py b/.scripts/lectures.py new file mode 100644 index 0000000..2582317 --- /dev/null +++ b/.scripts/lectures.py @@ -0,0 +1,190 @@ +#!/usr/bin/python3 + +import os +from datetime import datetime +from pathlib import Path +import locale +import re +import subprocess + + +from config import get_week, DATE_FORMAT, CURRENT_COURSE_ROOT + +# TODO +locale.setlocale(locale.LC_TIME, "en_GB.utf8") + + +def number2filename(n): + return 'lec_{0:02d}.tex'.format(n) + +def filename2number(s): + return int(str(s).replace('.tex', '').replace('lec_', '')) + +class Lecture(): + def __init__(self, file_path, course): + with file_path.open() as f: + for line in f: + lecture_match = re.search(r'lecture\{(.*?)\}\{(.*?)\}\{(.*)\}', line) + if lecture_match: + break; + + # number = int(lecture_match.group(1)) + + date_str = lecture_match.group(2) + date = datetime.strptime(date_str, DATE_FORMAT) + week = get_week(date) + + title = lecture_match.group(3) + + self.file_path = file_path + self.date = date + self.week = week + self.number = filename2number(file_path.stem) + self.title = title + self.course = course + + def edit(self): + subprocess.Popen([ + "x-terminal-emulator", + "-e", "zsh", "-i", "-c", + f"\\vim --servername kulak --remote-silent {str(self.file_path)}" + ]) + + def __str__(self): + return f'' + + +class Lectures(list): + def __init__(self, course): + self.course = course + self.root = course.path + self.master_file = self.root / 'master.tex' + list.__init__(self, self.read_files()) + + def read_files(self): + files = self.root.glob('lec_*.tex') + return sorted((Lecture(f, self.course) for f in files), key=lambda l: l.number) + + def parse_lecture_spec(self, string): + if len(self) == 0: + return 0 + + if string.isdigit(): + return int(string) + elif string == 'last': + return self[-1].number + elif string == 'prev': + return self[-1].number - 1 + + def parse_range_string(self, arg): + all_numbers = [lecture.number for lecture in self] + if 'all' in arg: + return all_numbers + + if '-' in arg: + start, end = [self.parse_lecture_spec(bit) for bit in arg.split('-')] + return list(set(all_numbers) & set(range(start, end + 1))) + + return [self.parse_lecture_spec(arg)] + + @staticmethod + def get_header_footer(filepath): + part = 0 + header = '' + footer = '' + with filepath.open() as f: + for line in f: + # order of if-statements is important here! + if 'end lectures' in line: + part = 2 + + if part == 0: + header += line + if part == 2: + footer += line + + if 'start lectures' in line: + part = 1 + return (header, footer) + + def update_lectures_in_master(self, r): + header, footer = self.get_header_footer(self.master_file) + body = ''.join( + ' ' * 4 + r'\input{' + number2filename(number) + '}\n' for number in r) + self.master_file.write_text(header + body + footer) + + def new_lecture(self): + if len(self) != 0: + new_lecture_number = self[-1].number + 1 + else: + new_lecture_number = 1 + + new_lecture_path = self.root / number2filename(new_lecture_number) + + today = datetime.today() + date = today.strftime(DATE_FORMAT) + + new_lecture_path.touch() + new_lecture_path.write_text(f'\\lecture{{{new_lecture_number}}}{{{date}}}{{}}\n') + + if new_lecture_number == 1: + self.update_lectures_in_master([1]) + else: + self.update_lectures_in_master([new_lecture_number - 1, new_lecture_number]) + + self.read_files() + + + l = Lecture(new_lecture_path, self.course) + + return l + + def compile_master(self): + subprocess.Popen( + ['latexmk', '-g', '-f', str(self.master_file)], + cwd=str(self.root), + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL + ) + +if __name__ == '__main__': + import sys + args = sys.argv + command = args[1] + + + lectures = Lectures(Path.cwd()) + + if command == 'view': + lecture_range = args[2] + lecture_range = lectures.parse_range_string(lecture_range) + print(lecture_range) + lectures.update_lectures_in_master(lecture_range) + lectures.compile_master() + + if command == 'new': + lectures.new_lecture() + + if command == 'init': + from utils import beautify + course_title = beautify(lectures.root.stem) + lines = [r'\documentclass[a4paper]{article}', + r'\input{../preamble.tex}', + fr'\title{{{course_title}}}', + r'\begin{document}', + r' \maketitle', + r' \tableofcontents', + r' % start lectures', + r' % end lectures', + r'\end{document}' + ] + lectures.master_file.touch() + lectures.master_file.write_text('\n'.join(lines)) + + (lectures.root / 'master.tex.latexmain').touch() + + info_file = lectures.root / 'info.yaml' + info_file.touch() + info_file.write_text(f"title: '{course_title}'") + + (lectures.root / 'figures').mkdir() diff --git a/.scripts/rofi-courses.py b/.scripts/rofi-courses.py new file mode 100644 index 0000000..a702d59 --- /dev/null +++ b/.scripts/rofi-courses.py @@ -0,0 +1,22 @@ +#!/usr/bin/python3 +from rofi import rofi + +from courses import Courses + +courses = Courses() +current = courses.current + +try: + current_index = courses.index(current) + args = ['-a', current_index] +except ValueError: + args = [] + +code, index, selected = rofi('Select course', [c.info['title'] for c in courses], [ + '-auto-select', + '-no-custom', + '-lines', len(courses) +] + args) + +if index >= 0: + courses.current = courses[index] diff --git a/.scripts/rofi-lectures-view.py b/.scripts/rofi-lectures-view.py new file mode 100644 index 0000000..bcc190c --- /dev/null +++ b/.scripts/rofi-lectures-view.py @@ -0,0 +1,22 @@ +#!/usr/bin/python3 +from courses import Courses +from rofi import rofi + +lectures = Courses().current.lectures + +commands = ['last', 'prev-last', 'all', 'prev'] +options = ['Current lecture', 'Last two lectures', 'All lectures', 'Previous lectures'] + +key, index, selected = rofi('Select view', options, [ + '-lines', 4, + '-auto-select' +]) + +if index >= 0: + command = commands[index] +else: + command = selected + +lecture_range = lectures.parse_range_string(command) +lectures.update_lectures_in_master(lecture_range) +lectures.compile_master() diff --git a/.scripts/rofi-lectures.py b/.scripts/rofi-lectures.py new file mode 100644 index 0000000..b5e8f9d --- /dev/null +++ b/.scripts/rofi-lectures.py @@ -0,0 +1,32 @@ +#!/usr/bin/python3 +from courses import Courses +from rofi import rofi +from utils import generate_short_title, MAX_LEN + +lectures = Courses().current.lectures + +sorted_lectures = sorted(lectures, key=lambda l: -l.number) + +options = [ + "{number: >2}. {title: <{fill}} {date} ({week})".format( + fill=MAX_LEN, + number=lecture.number, + title=generate_short_title(lecture.title), + date=lecture.date.strftime('%a %d %b'), + week=lecture.week + ) + for lecture in sorted_lectures +] + +key, index, selected = rofi('Select lecture', options, [ + '-lines', 5, + '-markup-rows', + '-kb-row-down', 'Down', + '-kb-custom-1', 'Ctrl+n' +]) + +if key == 0: + sorted_lectures[index].edit() +elif key == 1: + new_lecture = lectures.new_lecture() + new_lecture.edit() diff --git a/.scripts/rofi.py b/.scripts/rofi.py new file mode 100644 index 0000000..101c1c6 --- /dev/null +++ b/.scripts/rofi.py @@ -0,0 +1,30 @@ +import subprocess + +def rofi(prompt, options, rofi_args=[], fuzzy=True): + optionstr = '\n'.join(option.replace('\n', ' ') for option in options) + args = ['rofi', '-sort', '-no-levenshtein-sort'] + if fuzzy: + args += ['-matching', 'fuzzy'] + args += ['-dmenu', '-p', prompt, '-format', 's', '-i'] + args += rofi_args + args = [str(arg) for arg in args] + + + result = subprocess.run(args, input=optionstr, stdout=subprocess.PIPE, universal_newlines=True) + returncode = result.returncode + stdout = result.stdout.strip() + + selected = stdout.strip() + try: + index = [opt.strip() for opt in options].index(selected) + except ValueError: + index = -1 + + if returncode == 0: + key = 0 + elif returncode == 1: + key = -1 + elif returncode > 9: + key = returncode - 9 + + return key, index, selected diff --git a/.scripts/utils.py b/.scripts/utils.py new file mode 100644 index 0000000..ac06a70 --- /dev/null +++ b/.scripts/utils.py @@ -0,0 +1,14 @@ +def beautify(string): + return string.replace('_', ' ').replace('-', ' ').title() + +def unbeautify(string): + return string.replace(' ', '-').lower() + +MAX_LEN = 40 +def generate_short_title(title): + short_title = title or 'Untitled' + if len(title) >= MAX_LEN: + short_title = title[:MAX_LEN - len(' ... ')] + ' ... ' + short_title = short_title.replace('$', '') + return short_title + diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..587d237 --- /dev/null +++ b/.xinitrc @@ -0,0 +1,34 @@ + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +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 + +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 + + +# exec fluxbox with extra build-specific guff. +exec startfluxbox + + diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..f41a068 --- /dev/null +++ b/.zshrc @@ -0,0 +1,112 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="/home/guinevere/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes + +#ZSH_THEME="agnoster" + +powerline-daemon -q +. /usr/lib/python3.8/site-packages/powerline/bindings/zsh/powerline.zsh + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS=true + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in ~/.oh-my-zsh/plugins/* +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git archlinux command-not-found extract sudo systemd vscode z) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment + export LANG=en_GB.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +export TARGET=i686-elf +export PREFIX="$HOME/opt/cross" +export PATH="$PREFIX/bin:$PATH" + +alias iegcc=i686-elf-gcc +alias ieas=i686-elf-as +alias xegcc=x86_64-elf-gcc +alias qemu-sync=qemu-system-x86_64 -drive format=raw,media=cdrom,file=red.iso -serial stdio -vga std diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..808af28 --- /dev/null +++ b/i3/config @@ -0,0 +1,208 @@ +set $mod Mod4 + +exec_always --no-startup-id wal -i "$(< "${HOME}/.cache/wal/wal")" +exec pgrep sxhkd || sxhkd & + +new_window none +new_float normal + +hide_edge_borders none + +bindsym $mod+u border none +bindsym $mod+y border pixel 1 + +font xft:San-Francisco-Text 10 + +floating_modifier $mod + +bindsym $mod+Return exec urxvt +bindsym $mod+Shift+q kill +bindsym $mod+d exec jgmenu_run & + +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +workspace_auto_back_and_forth yes +bindsym $mod+b workspace back_and_forth +bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth + +bindsym $mod+h split h; exec notify-send 'tile horizontally' +bindsym $mod+v split v; exec notify-send 'tile vertically' +bindsym $mod+q split toggle + +bindsym $mod+f fullscreen toggle +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +bindsym $mod+Shift+space floating toggle + +bindsym $mod+space focus mode_toggle + +bindsym $mod+Shift+s sticky toggle +bindsym $mod+a focus parent + +bindsym $mod+Shift+minus move scratchpad + +bindsym $mod+Ctrl+Right workspace next +bindsym $mod+Ctrl+Left workspace prev + + +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 + +bindsym $mod+Ctrl+1 move container to workspace 1 +bindsym $mod+Ctrl+2 move container to workspace 2 +bindsym $mod+Ctrl+3 move container to workspace 3 +bindsym $mod+Ctrl+4 move container to workspace 4 +bindsym $mod+Ctrl+5 move container to workspace 5 +bindsym $mod+Ctrl+6 move container to workspace 6 +bindsym $mod+Ctrl+7 move container to workspace 7 +bindsym $mod+Ctrl+8 move container to workspace 8 + +bindsym $mod+Shift+1 move container to workspace 1; workspace 1 +bindsym $mod+Shift+2 move container to workspace 2; workspace 2 +bindsym $mod+Shift+3 move container to workspace 3; workspace 3 +bindsym $mod+Shift+4 move container to workspace 4; workspace 4 +bindsym $mod+Shift+5 move container to workspace 5; workspace 5 +bindsym $mod+Shift+6 move container to workspace 6; workspace 6 +bindsym $mod+Shift+7 move container to workspace 7; workspace 7 +bindsym $mod+Shift+8 move container to workspace 8; workspace 8 + + + +for_window [urgent=latest] focus + +bindsym $mod+Shift+c reload +bindsym $mod+Shift+r restart +bindsym $mod+x exec blurlock + +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'End X Session?' -b 'Yes' 'i3-msg exit'" +#bindsym $mod+0 mode $mode_system +#set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown +#mode "$mode_system" { +# bindsym s exec --no-startup-id i3exit suspend, mode "default" +# bindsym u exec --no-startup-id i3exit switch_user, mode "default" +# bindsym e exec --no-startup-id i3exit logout, mode "default" +# bindsym h exec --no-startup-id i3exit hibernate, mode "default" +# bindsym r exec --no-startup-id i3exit reboot, mode "default" +# bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" +# bindsym Return mode "default" +# bindsym Escape mode "default" +#} + +bindsym $mod+r mode "resize" +mode "resize" { + bindsym j resize shrink width 5 px or 5 ppt + bindsym k resize grow height 5 px or 5 ppt + bindsym l resize shrink height 5 px or 5 ppt + bindsym semicolon resize grow width 5 px or 5 ppt + + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + bindsym Return mode "default" + bindsym Escape mode "default" +} + +exec --no-startup-id nitrogen --restore; sleep 1; +#exec --no-startup-id nm-applet +exec --no-startup-id xfce4-power-manager +exec --no-startup-id pamac-tray +exec --no-startup-id clipit +exec_always --no-startup-id ff-theme-util +exec_always --no-startup-id fix_xcursor +exec_always --no-startup-id dbus-launch compton --config ~/.config/compton.conf +exec_always (xinput set-prop 12 228 1) +exec --no-startup-id ~/.config/polybar/launch.sh + +client.focused #14171A #14171A #CCCCCC #393f4d #393f4d +client.focused_inactive #192733 #192733 #CCCCCC #000d1a +client.unfocused #192733 #192733 #CCCCCC #000d1a #000d1a +client.urgent #192733 #192733 #CCCCCC #000d1a #000d1a +client.placeholder #192733 #192733 #CCCCCC #000d1a #000d1a + +client.background #F31D3A + +gaps inner 10 +gaps outer -4 +smart_gaps on + +set $mode_gaps Gaps: (o)uter, (i)nner +set $mode_gaps_outer: Outer Gaps: +|-|0 (current), Shift + +|-|0 (all) +set $mode_gaps_inner: Inner Gaps: +|-|0 (current), Shift + +|-|0 (all) +bindsym $mod+Shift+g mode "$mode_gaps" + +mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym Return mode "default" + bindsym Escape mode "default" +} + +mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} + +mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioPause exec playerctl pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous + +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle + +bindsym XF86MonBrightnessUp exec xbacklight -inc 20 +bindsym XF86MonBrightnessDown exec xbacklight -dec 20 + +bindsym Print exec gnome-screenshot + +exec_always /$HOME/.config/i3/init.sh diff --git a/i3/config.old b/i3/config.old new file mode 100644 index 0000000..2b8835c --- /dev/null +++ b/i3/config.old @@ -0,0 +1,170 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod1 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec dmenu_run +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status +} diff --git a/i3/config.save b/i3/config.save new file mode 100644 index 0000000..700fb29 --- /dev/null +++ b/i3/config.save @@ -0,0 +1,207 @@ +set $mod Mod4 + +#exec_always --no-startup-id wal -i "$(< "${HOME}/.cache/wal/wal")" + +new_window pixel 2 +new_float normal + +hide_edge_borders none + +bindsym $mod+u border none +bindsym $mod+y border pixel 1 +bindsym $mod+n border none + +font xft:San-Francisco-Text 10 + +floating_modifier $mod + +bindsym $mod+Return exec urxvt +bindsym $mod+Shift+q kill +bindsym $mod+d exec jgmenu_run & + +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +workspace_auto_back_and_forth yes +bindsym $mod+b workspace back_and_forth +bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth + +bindsym $mod+h split h; exec notify-send 'tile horizontally' +bindsym $mod+v split v; exec notify-send 'tile vertically' +bindsym $mod+q split toggle + +bindsym $mod+f fullscreen toggle +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +bindsym $mod+Shift+space floating toggle + +bindsym $mod+space focus mode_toggle + +bindsym $mod+Shift+s sticky toggle +bindsym $mod+a focus parent + +bindsym $mod+Shift+minus move scratchpad + +bindsym $mod+Ctrl+Right workspace next +bindsym $mod+Ctrl+Left workspace prev + + +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 + +bindsym $mod+Ctrl+1 move container to workspace 1 +bindsym $mod+Ctrl+2 move container to workspace 2 +bindsym $mod+Ctrl+3 move container to workspace 3 +bindsym $mod+Ctrl+4 move container to workspace 4 +bindsym $mod+Ctrl+5 move container to workspace 5 +bindsym $mod+Ctrl+6 move container to workspace 6 +bindsym $mod+Ctrl+7 move container to workspace 7 +bindsym $mod+Ctrl+8 move container to workspace 8 + +bindsym $mod+Shift+1 move container to workspace 1; workspace 1 +bindsym $mod+Shift+2 move container to workspace 2; workspace 2 +bindsym $mod+Shift+3 move container to workspace 3; workspace 3 +bindsym $mod+Shift+4 move container to workspace 4; workspace 4 +bindsym $mod+Shift+5 move container to workspace 5; workspace 5 +bindsym $mod+Shift+6 move container to workspace 6; workspace 6 +bindsym $mod+Shift+7 move container to workspace 7; workspace 7 +bindsym $mod+Shift+8 move container to workspace 8; workspace 8 + + + +for_window [urgent=latest] focus + +bindsym $mod+Shift+c reload +bindsym $mod+Shift+r restart +bindsym $mod+x exec (i3lock) + +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'End X Session?' -b 'Yes' 'i3-msg exit'" +set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown +bindsym $mod+0 mode "$mode_system" +mode "$mode_system" { + bindsym s exec --no-startup-id i3exit suspend; mode "default" + bindsym u exec --no-startup-id i3exit switch_user; mode "default" + bindsym e exec --no-startup-id i3exit logout; mode "default" + bindsym h exec --no-startup-id i3exit hibernate; mode "default" + bindsym r exec --no-startup-id i3exit reboot; mode "default" + bindsym Shift+s exec --no-startup-id i3exit shutdown; mode "default" + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" +mode "resize" { + bindsym j resize shrink width 5 px or 5 ppt + bindsym k resize grow height 5 px or 5 ppt + bindsym l resize shrink height 5 px or 5 ppt + bindsym semicolon resize grow width 5 px or 5 ppt + + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + bindsym Return mode "default" + bindsym Escape mode "default" +} + +exec --no-startup-id nitrogen --restore; sleep 1; +#exec --no-startup-id nm-applet +exec --no-startup-id xfce4-power-manager +exec --no-startup-id pamac-tray +exec --no-startup-id clipit +exec_always --no-startup-id ff-theme-util +exec_always --no-startup-id fix_xcursor +exec_always --no-startup-id (nohup compton &) +exec_always (xinput set-prop 12 228 1) + +client.focused #14171A #14171A #CCCCCC #393f4d #393f4d +client.focused_inactive #192733 #192733 #CCCCCC #000d1a +client.unfocused #192733 #192733 #CCCCCC #000d1a #000d1a +client.urgent #192733 #192733 #CCCCCC #000d1a #000d1a +client.placeholder #192733 #192733 #CCCCCC #000d1a #000d1a + +client.background #F31D3A + +gaps inner 10 +gaps outer -4 +smart_gaps on + +set $mode_gaps Gaps: (o)uter, (i)nner +set $mode_gaps_outer: Outer Gaps: +|-|0 (current), Shift + +|-|0 (all) +set $mode_gaps_inner: Inner Gaps: +|-|0 (current), Shift + +|-|0 (all) +bindsym $mod+Shift+g mode "$mode_gaps" + +mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym Return mode "default" + bindsym Escape mode "default" +} + +mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} + +mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioPause exec playerctl pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous + +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle + +bindsym XF86MonBrightnessUp exec xbacklight -inc 20 +bindsym XF86MonBrightnessDown exec xbacklight -dec 20 + +bindsym Print exec gnome-screenshot + +exec_always /$HOME/.config/i3/init.sh diff --git a/i3/init.sh b/i3/init.sh new file mode 100755 index 0000000..142b688 --- /dev/null +++ b/i3/init.sh @@ -0,0 +1,7 @@ +/$HOME/.config/polybar/launch.sh + +pkill conky + +conky -c ~/.conky/syclo-crimson-bottomleft.conkyrc + +compstrt diff --git a/i3/nohup.out b/i3/nohup.out new file mode 100644 index 0000000..705cc8e --- /dev/null +++ b/i3/nohup.out @@ -0,0 +1,9 @@ +XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1" + after 237522 requests (237522 known processed) with 0 events remaining. +[ 40.35 ] error 3 BadWindow request 2 minor 0 serial 5409: "BadWindow (invalid Window parameter)" +[ 60.44 ] error 3 BadWindow request 2 minor 0 serial 19386: "BadWindow (invalid Window parameter)" +[ 198.71 ] error 3 BadWindow request 2 minor 0 serial 45546: "BadWindow (invalid Window parameter)" +[ 975.69 ] error 3 BadWindow request 2 minor 0 serial 124952: "BadWindow (invalid Window parameter)" +X connection to :1 broken (explicit kill or server shutdown). +[ 48.88 ] error 3 BadWindow request 2 minor 0 serial 4759: "BadWindow (invalid Window parameter)" +[ 653.46 ] error 3 BadWindow request 2 minor 0 serial 243951: "BadWindow (invalid Window parameter)" diff --git a/jgmenu/greeneye-search.svg b/jgmenu/greeneye-search.svg new file mode 100644 index 0000000..2beac75 --- /dev/null +++ b/jgmenu/greeneye-search.svg @@ -0,0 +1,15 @@ + + + + + + + diff --git a/jgmenu/jgmenurc b/jgmenu/jgmenurc new file mode 100644 index 0000000..f77d14b --- /dev/null +++ b/jgmenu/jgmenurc @@ -0,0 +1,39 @@ +tint2_look = 0 +terminal_exec = urxvt-unicode +columns = 2 + +menu_width = 500 +menu_height_min = 480 +menu_height_max = 480 +menu_padding_top = 50 +menu_padding_right = 40 +menu_padding_bottom = 40 +menu_padding_left = 40 +menu_radius = 0 +menu_border = 0 +menu_halign = center +menu_valign = center + +item_margin_y = 5 +item_height = 30 +item_padding_x = 8 +item_radius = 0 +item_border = 2 + +sep_height = 5 + +icon_theme = Oranchelo + +font = San Francisco Text 10 +icon_size = 20 +icon_text_spacing = 3 + +color_menu_bg = ${xrdb:color0} 30 +color_norm_bg = ${xrdb:color1} 0 +color_norm_fg = ${xrdb:color2} 80 +color_sel_bg = ${xrdb:color3} 0 +color_sel_fg = ${xrdb:color4} 30 +color_sel_border = ${xrdb:color5} 0 +color_sep_fg = ${xrdb:color6} 30 + +csv_no_dirs = 1 diff --git a/nitrogen/bg-saved.cfg b/nitrogen/bg-saved.cfg new file mode 100644 index 0000000..fd2068c --- /dev/null +++ b/nitrogen/bg-saved.cfg @@ -0,0 +1,4 @@ +[xin_-1] +file=/media/secondary.jpg +mode=5 +bgcolor=#ffffff diff --git a/nitrogen/nitrogen.cfg b/nitrogen/nitrogen.cfg new file mode 100644 index 0000000..12a19fd --- /dev/null +++ b/nitrogen/nitrogen.cfg @@ -0,0 +1,12 @@ +[geometry] +posx=572 +posy=99 +sizex=584 +sizey=466 + +[nitrogen] +view=icon +recurse=true +sort=alpha +icon_caps=false +dirs=/media; diff --git a/polybar/bars.ini b/polybar/bars.ini new file mode 100644 index 0000000..db77c57 --- /dev/null +++ b/polybar/bars.ini @@ -0,0 +1,604 @@ +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ +;; +;; ____ +;; / __ )____ ___________ +;; / __ / __ `/ ___/ ___/ +;; / /_/ / /_/ / / (__ ) +;; /_____/\__,_/_/ /____/ +;; +;; +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/volume] +type = internal/alsa + +; Soundcard to be used +; Usually in the format hw:# where # is the card number +; You can find the different card numbers in `/proc/asound/cards` +;;master-soundcard = default +;;speaker-soundcard = default +;;headphone-soundcard = default + +; Name of the master, speaker and headphone mixers +; Use the following command to list available mixer controls: +; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" +; If master, speaker or headphone-soundcard isn't the default, +; use `amixer -c # scontrols` instead where # is the number +; of the master, speaker or headphone soundcard respectively +; +; Default: Master +;;master-mixer = Master + +; Optionally define speaker and headphone mixers +; Default: none +;;speaker-mixer = Speaker +; Default: none +;;headphone-mixer = Headphone + +; NOTE: This is required if headphone_mixer is defined +; Use the following command to list available device controls +; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort +; You may also need to use `amixer -c # controls` as above for the mixer names +; Default: none +;;headphone-id = 9 + +; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear +; Default: false +;;mapped = true + +; Interval for volume increase/decrease (in percent points) +; Default: 5 +;;interval = 5 + +; Available tags: +; (default) +; +; +format-volume = + +; Available tags: +; (default) +; +; +format-muted = + +; Available tokens: +; %percentage% (default) +label-volume = %percentage%% + +; Available tokens: +; %percentage% (default +format-muted-prefix =  +label-muted = " Muted" +label-muted-foreground = ${color.ac} + +; Only applies if is used +ramp-volume-0 =  +ramp-volume-1 =  +ramp-volume-2 =  +ramp-volume-3 =  +ramp-volume-4 =  + +; Only applies if is used +bar-volume-width = 10 +bar-volume-gradient = false + +bar-volume-indicator = +bar-volume-indicator-foreground = ${color.bi} +bar-volume-indicator-font = 2 + +bar-volume-fill = ━ +bar-volume-foreground-0 = ${color.bn} +bar-volume-foreground-1 = ${color.bn} +bar-volume-foreground-2 = ${color.bn} +bar-volume-foreground-3 = ${color.bn} +bar-volume-foreground-4 = ${color.bm} +bar-volume-foreground-5 = ${color.bm} +bar-volume-foreground-6 = ${color.bm} +bar-volume-foreground-7 = ${color.bd} +bar-volume-foreground-8 = ${color.bd} +bar-volume-fill-font = 2 + +bar-volume-empty = ┉ +bar-volume-empty-foreground = ${color.be} +bar-volume-empty-font = 2 + +; If defined, it will replace when +; headphones are plugged in to `headphone_control_numid` +; If undefined, will be used for both +; Only applies if is used +ramp-headphones-0 =  +ramp-headphones-1 =  + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/brightness] +type = internal/xbacklight + +; Use the following command to list available cards: +; $ ls -1 /sys/class/backlight/ +card = intel_backlight + +; Available tags: +;