summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--dwmblocks/config18
-rw-r--r--scripts/.gitignore1
-rwxr-xr-xscripts/icstocal99
-rwxr-xr-xscripts/randwp20
-rw-r--r--wallpapers/fabio.jpgbin0 -> 57987 bytes
-rw-r--r--zsh/.zshenv2
-rw-r--r--zsh/.zshrc5
8 files changed, 146 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index da7a773..c3308f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,6 @@ dconf/
Tracktion/
## trashfiles
-.zcompdump \ No newline at end of file
+.zcompdump
+
+## other stuff
diff --git a/dwmblocks/config b/dwmblocks/config
new file mode 100644
index 0000000..9a85932
--- /dev/null
+++ b/dwmblocks/config
@@ -0,0 +1,18 @@
+/*Name State Update Signal + 34*/
+music = false // 35
+cputemp = true // 36
+fanspeed = true // 37
+memory = true // 38
+battery = true // 39
+wifi = true // 40
+ethernet = false // 41
+localip = false // 42
+publicip = false // 43
+volume = true // 44
+mic = false // 45
+news = false // 46
+mail = false // 47
+weather = true // 48
+daypercent = true // 49
+date = true // 50
+time = true // 51
diff --git a/scripts/.gitignore b/scripts/.gitignore
new file mode 100644
index 0000000..76d851f
--- /dev/null
+++ b/scripts/.gitignore
@@ -0,0 +1 @@
+rider.sh \ No newline at end of file
diff --git a/scripts/icstocal b/scripts/icstocal
new file mode 100755
index 0000000..94e8700
--- /dev/null
+++ b/scripts/icstocal
@@ -0,0 +1,99 @@
+#!/usr/bin/env python3
+# A really poorly written script to convert .ics file to calendar file for quand or when
+# doesn't work when an event take longer than a day
+
+from sys import argv
+from pathlib import Path
+
+if len(argv) < 3:
+ print("To use this script you need to supply 2 arguments.")
+ print("e.g.: icsparser calendar.ics $XDG_DATA_HOME/quand/calendar")
+ exit()
+
+TIMEZONE = 2 # as UTC+2
+IN="en" # 'en' means 'in' in french
+INPUT = argv[1]
+OUTPUT = argv[2]
+
+if not Path(INPUT).is_file():
+ print("{0} doesn't exist".format(INPUT))
+ exit()
+
+file = open(INPUT, "r")
+
+if file.readline() != "BEGIN:VCALENDAR\n":
+ print("{0} is not valid".format(INPUT))
+ file.close()
+ exit()
+
+line = file.readline()
+locations = []
+summaries = []
+starts = []
+ends = []
+
+while line != "END:VCALENDAR\n":
+ if line == "BEGIN:VEVENT\n":
+ while line != "END:VEVENT\n":
+ if line.startswith("LOCATION"):
+ locations.append(line[9:].strip())
+ elif line.startswith("SUMMARY"):
+ summaries.append(line[8:].strip())
+ elif line.startswith("DTSTART"):
+ start = line.lstrip("DTSTART")
+ year = ""
+ month = ""
+ day = ""
+ hour = ""
+ min = ""
+ for i in range(len(start)):
+ if i >= 1 and i <= 4:
+ year += start[i]
+ elif i == 5 or i == 6:
+ month += start[i]
+ elif i == 7 or i == 8:
+ day += start[i]
+ elif i == 10:
+ hour += start[i]
+ elif i == 11:
+ if int(start[i]) + TIMEZONE > 9:
+ hour = str(int(hour[0]) + 1) + "0" # I cba do the case where H will become 25
+ else:
+ hour += str(int(start[i]) + TIMEZONE)
+ elif i == 12 or i == 13:
+ min += start[i]
+ starts.append([year, month, day, hour, min])
+ elif line.startswith("DTEND"):
+ end = line.lstrip("DTEND")
+ hour = ""
+ min = ""
+ for i in range(len(end)):
+ if i == 10:
+ hour += end[i]
+ elif i == 11:
+ if int(end[i]) + TIMEZONE > 9:
+ hour = str(int(hour[0]) + 1) + "0" # I cba do the case where H will become 25
+ else:
+ hour += str(int(end[i]) + TIMEZONE)
+ elif i == 12 or i == 13:
+ min += end[i]
+ ends.append("{0}:{1}".format(hour, min))
+ line = file.readline()
+ line = file.readline()
+file.close()
+
+file = open(OUTPUT, "w")
+for i in range(len(locations)):
+ # yyyy mm dd, hh:hh -> hh:hh summary location
+ file.write("{0} {1} {2}, {3}:{4} -> {5} {6} {7} {8}\n".format(starts[i][0],
+ starts[i][1],
+ starts[i][2],
+ starts[i][3],
+ starts[i][4],
+ ends[i],
+ summaries[i],
+ IN,
+ locations[i]))
+
+file.close()
+print("All done!")
diff --git a/scripts/randwp b/scripts/randwp
new file mode 100755
index 0000000..a63271d
--- /dev/null
+++ b/scripts/randwp
@@ -0,0 +1,20 @@
+#!/bin/sh
+# set a random wallpaper
+# to ignore a folder or a file put it in IGNORE like "file1|folder|file2"
+
+WPDIR="${1:-/home/marcellus/.config/wallpapers}"
+ALL="$(find "$WPDIR" -type f ! -path '*/.git*' ! -name 'README.md')"
+
+searchwp() {
+ wp="$(printf '%s' "$ALL" | shuf -n 1)"
+}
+
+# 1 screen with hsetroot
+#searchwp
+#hsetroot -cover "$wp" 1>/dev/null
+
+# multiple screens with xwallpaper
+for output in $(xrandr | awk '$2=="connected" {print $1 "\n"}'); do
+ searchwp
+ xwallpaper --output "$output" --zoom "$wp"
+done
diff --git a/wallpapers/fabio.jpg b/wallpapers/fabio.jpg
new file mode 100644
index 0000000..914c5e5
--- /dev/null
+++ b/wallpapers/fabio.jpg
Binary files differ
diff --git a/zsh/.zshenv b/zsh/.zshenv
index 88560b6..1d51105 100644
--- a/zsh/.zshenv
+++ b/zsh/.zshenv
@@ -1,2 +1,2 @@
-export PATH="$HOME/:$PATH"
+export PATH="$HOME/.config/scripts:$PATH"
TERMINAL="st"
diff --git a/zsh/.zshrc b/zsh/.zshrc
index c7bb242..3525222 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -12,10 +12,13 @@ PS1="%B%(?.0.%F{red}%?) %F{blue}%n %F{green}%~ %f$%b "
alias ls="ls -a --color=auto"
alias shut="sudo openrc-shutdown -p now"
alias shutr="sudo openrc-shutdown -r now"
-alias ins="sudo pacman -S"
+alias ins="sudo pacman -Syu"
alias uins="sudo pacman -Rns"
alias c="clear; quand"
alias poule="git pull"
+alias bri5="xrandr --output eDP-1 --brightness 0.5"
+alias bri6="xrandr --output eDP-1 --brightness 0.6"
+alias ascii="ascii -d"
autoload -U compinit
zstyle ':completion:*' menu select