1
1
mirror of https://github.com/nboughton/dotfiles synced 2024-11-22 14:51:56 +01:00

oh dang I've changed a lot of stuff

This commit is contained in:
Nick Boughton 2021-02-17 14:54:42 +00:00
parent ab3b43399a
commit 0050d8c227
15 changed files with 315 additions and 102 deletions

1
.gitignore vendored

@ -53,3 +53,4 @@ pipewire-media-session/
systemd/
gedit/
tilix/
QtProject.conf

@ -208,7 +208,7 @@ preview_images: true
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 1
background_opacity: 0.96
# Mouse bindings
#

@ -1,8 +1,8 @@
[Settings]
gtk-application-prefer-dark-theme=0
gtk-theme-name=Nordic-darker
gtk-icon-theme-name=Tela-circle-black-dark
gtk-font-name=Roboto 10
gtk-icon-theme-name=Tela-circle-grey-dark
gtk-font-name=Kanit Medium 10
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_ICONS

@ -30,7 +30,7 @@ exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec --no-startup-id ~/.screenlayout/default.sh
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id ~/.fehbg
exec --no-startup-id picom -b -c
exec --no-startup-id picom -b
exec --no-startup-id dunst
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
exec --no-startup-id nm-applet --indicator

@ -1,5 +1,5 @@
layer=top
font=Roboto 11
font=Kanit Regular 11
max-visible=5
anchor=top-right
icon-path=~/.icons/DarK-svg
@ -7,12 +7,12 @@ icon-path=~/.icons/DarK-svg
width=400
height=150
margin=20
border-size=2
border-size=3
border-radius=10
max-icon-size=32
background-color=#4c566add
text-color=#d8dee9
text-color=#8fbcbb
border-color=#5e81ac
default-timeout=10000

@ -8,7 +8,7 @@
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
shadow = false;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12

@ -39,7 +39,7 @@ font-2 = siji:pixelsize=10;2
modules-left = i3 xwindow
modules-center = cpu memory swap date root_storage home_storage battery
modules-right = updates my-updates weather backlight-acpi pulseaudio powermenu
modules-right = covid updates my-updates backlight-acpi pulseaudio powermenu
tray-position = right
tray-padding = 2
@ -63,6 +63,11 @@ interval = 5
click-left = systemctl --user start auroch.service
label = " %output%"
[module/covid]
type = custom/script
exec = ~/.config/polybar/modules/covid
interval = 3600
[module/weather]
type = custom/script
exec = ~/.config/waybar/modules/weather.sh

2
polybar/modules/covid Executable file

@ -0,0 +1,2 @@
#!/bin/bash
~/.config/waybar/modules/covid/covid-checker ltla E07000012 | jq -jr '[.class, .text] | join(" ")' | sed -e 's/DOWN//' | sed -e 's/UP//'

@ -20,12 +20,13 @@ set $menu wofi -c ~/.config/wofi/config -s ~/.config/wofi/style.css -I
### Gnome settings
set $gnome-schema org.gnome.desktop.interface
exec_always {
#gsettings set $gnome-schema gtk-theme 'NordSur-dark'
gsettings set $gnome-schema gtk-theme 'Nordic-darker'
gsettings set $gnome-schema icon-theme 'Tela-circle-black-dark'
gsettings set $gnome-schema font-name 'Roboto 10'
gsettings set $gnome-schema monospace-font-name 'Roboto Mono 10'
gsettings set $gnome-schema document-font-name 'Roboto 10'
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Roboto Bold 10'
gsettings set $gnome-schema font-name 'Kanit Light 10'
gsettings set $gnome-schema monospace-font-name 'JetBrains Mono 10'
gsettings set $gnome-schema document-font-name 'Kanit Light 10'
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Kanit Light 10'
gsettings set org.gnome.desktop.wm.preferences button-layout ''
gsettings set org.gnome.desktop.default-applications.terminal exec $term
gsettings set org.gnome.desktop.default-applications.terminal exec-arg '-e'
@ -65,7 +66,8 @@ for_window [app_id=io.github.celluloid_player.Celluloid] floating enable
for_window [app_id=Alacritty] floating enable
for_window [app_id=zenity] floating enable
for_window [app_id="apostrophe" title="Export"] floating enable
for_window [name="Firefox — Sharing Indicator"] floating enable
for_window [title="Firefox — Sharing Indicator"] floating enable
for_window [app_id=file-roller] floating enable
for_window [app_id=".*"] border pixel 2
### Key bindings
@ -243,6 +245,7 @@ smart_gaps off
#
# Titlebars
#
font pango:KanitMedium 10
default_border pixel 2
default_floating_border normal
hide_edge_borders none
@ -252,9 +255,9 @@ titlebar_padding 5 2
# Colors #93cee9
#
# class border backgr. text indicator child_border
client.focused #5e81ac #2e3440 #d8dee9 #5e81ac #5e81ac
client.focused_inactive #3b4252 #3b4252 #d8dee9 #4c566a #4c566a
client.unfocused #434c5e #434c5e #d8dee9 #4c566a #4c566a
client.urgent #bf616a #bf616a #d8dee9 #d08770 #d08770
client.focused #5e81ac #2e3440 #8fbcbb #5e81ac #5e81ac
client.focused_inactive #3b4252 #3b4252 #5e81ac #4c566a #4c566a
client.unfocused #434c5e #434c5e #5e81ac #4c566a #4c566a
client.urgent #bf616a #bf616a #bf616a #d08770 #d08770
include /etc/sway/config.d/*

@ -1,22 +1,26 @@
image=/home/nick/Pictures/Wallpapers/by_home2_2560.jpg
font=Roboto
image=/home/nick/Pictures/Wallpapers/7duujinh1ca61.jpg
font=Kanit Medium
indicator-radius=100
indicator-thickness=20
indicator-idle-visible
key-hl-color=81a1c1
separator-color=3b4252
layout-border-color=5e81ac
layout-bg-color=5e81ac
line-color=5e81ac
inside-clear-color=5e81ac
inside-ver-color=81a1c1
inside-wrong-color=bf616a
ring-color=5e81ac
ring-clear-color=5e81ac
ring-ver-color=81a1c1
ring-wrong-color=bf616a
inside-color=4c566aee
inside-clear-color=b48eadee
inside-ver-color=a3be8cee
inside-wrong-color=bf616aee
line-uses-inside
key-hl-color=88c0d0ee
layout-border-color=434c5eee
ring-color=8fbcbbee
ring-clear-color=ebcb8bee
ring-ver-color=a3be8cee
ring-wrong-color=bf616aee
separator-color=5e81acee
text-color=d8dee9ee
text-clear-color=2e3440ee
text-ver-color=2e3440ee
text-wrong-color=2e3440ee

@ -1,6 +1,32 @@
// -*- mode: json -*-
[
{
"layer": "bottom",
"position": "left",
"margin-top": 0,
"margin-left": 10,
"margin-bottom": 10,
"modules-left": ["wlr/taskbar"],
"modules-center": ["sway/window"],
"modules-right": ["tray"],
"wlr/taskbar": {
"all-outputs": false,
"format": "{icon}",
"icon-theme": "DarK-lb",
"icon-size": 16,
"on-click": "activate",
"on-middle-click": "close",
"on-right-click": "minimize"
},
"sway/window": {
"rotate": 90
},
"tray": {
"icon-size": 14,
"spacing": 10
}
},
{
//"output": "eDP-1",
"layer": "bottom",
"position": "top",
"margin-top": 10,
@ -9,8 +35,6 @@
"modules-left": [
"sway/workspaces",
"custom/separator",
"wlr/taskbar",
"custom/separator",
"idle_inhibitor",
"custom/separator",
"sway/mode"
@ -29,7 +53,7 @@
"battery"
],
"modules-right": [
"tray",
"custom/covid",
"custom/separator",
"custom/weather",
"custom/separator",
@ -40,6 +64,8 @@
"custom/separator",
"pulseaudio",
"custom/separator",
//"tray",
//"custom/separator",
"custom/reboot",
"custom/shutdown"
],
@ -57,15 +83,6 @@
"default": ""
}
},
"wlr/taskbar": {
"all-outputs": false,
"format": "{icon}",
"icon-theme": "DarK-svg",
"icon-size": 16,
"on-click": "activate",
"on-middle-click": "close",
"on-right-click": "minimize"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
@ -76,10 +93,6 @@
"sway/mode": {
"format": "{}"
},
"tray": {
"icon-size": 14,
"spacing": 10
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["", ""],
@ -113,16 +126,26 @@
"on-click": "pavucontrol"
},
"memory": {
"states": {
"good": 0,
"warning": 60,
"critical": 80
},
"interval": 5,
"format": " {}%"
},
"cpu": {
"states": {
"good": 0,
"warning": 70,
"critical": 95
},
"interval": 1,
"format": " {usage:2}%"
},
"battery": {
"states": {
"good": 95,
"good": 100,
"warning": 30,
"critical": 15
},
@ -136,17 +159,27 @@
]
},
"disk#1": {
"states": {
"good": 0,
"warning": 70,
"critical": 95
},
"interval": 5,
"format": " {percentage_used:2}%",
"path": "/"
},
"disk#2": {
"states": {
"good": 0,
"warning": 70,
"critical": 95
},
"interval": 5,
"format": " {percentage_used:2}%",
"path": "/home"
},
"custom/updates": {
"format": " {}",
"format": " {}",
"return-type": "json",
"interval": 5,
"exec": "cat ~/tmp/updates.json",
@ -193,15 +226,13 @@
"exec": "~/.config/waybar/modules/spotify.sh",
"exec-if": "pgrep spotify",
"escape": true
},
"custom/covid": {
"interval": 3600,
"exec": "~/.config/waybar/modules/covid/covid-checker ltla E07000012",
"return-type": "json",
"format": "{icon} {}",
"format-icons": ["", ""]
}
}
//{
// "layer": "bottom",
// "position": "bottom",
// "margin-right": 5,
// "margin-left": 5,
// "margin-bottom": 5,
// "modules-left": ["custom/weather"],
// "modules-center": [],
// "modules-right": ["custom/spotify"],
//}
]

@ -0,0 +1,80 @@
#!/bin/bash
#
# Small script to scrape the Coronavirus
# Base host where the API seems to be
HOST="https://coronavirus.data.gov.uk"
API_URL="$HOST/api/v1"
# This is a static file that contains an ISO date showing when "the site
# was last updated" even though the data always seems to be 5 days
# beind this?
TIMESTAMP_URL="$HOST/public/assets/dispatch/website_timestamp"
# Formats the returned JSON into the JSON output that Waybar expects
# (NB this expects the input object to have already been selected (as
# this is different depending on endpoints) and needs the $name set for
# the region name
JQ_FORMAT='{
text: .rollingRate | tostring,
tooltip: (
$name +
"\nPer 100K: " + (.rollingRate | tostring) +
"\nTotal Cases: " + (.rollingSum | tostring) +
" (" + (.change | tostring) + " / " + (.changePercentage | tostring) + "%)"
),
class: .direction,
percentage: (if .direction == "UP" then 100 else 0 end)
}'
usage() {
echo "Usage: $0 [Area Type] [Area Code]"
}
if [ $1 == "-h" ]
then
usage
exit 0
fi
if ! [ $# -eq 2 ]
then
usage
exit 1
fi
# For some reason the endpoint is different for MSOA types even though
# format of the data should in theory be the same.
# Of course this end point returns a completely different data object
case $1 in
"msoa")
curl $API_URL'/soa?areaType=msoa&areaCode='$2 -s | \
jq -c '.areaName as $name | .latest.newCasesBySpecimenDate | '"$JQ_FORMAT"
;;
ltla|utla)
# This endpoint needs to be queried by date. It seems that the
# interactive map always queries 5 days less than the last update
# time, which is given by this endpoint
date=$(dateadd -f '%Y-%m-%d' $(curl -s $TIMESTAMP_URL) -5d)
# This endpoint requires providing the designed returned format
# (graphQL style) but it does it in an awful URL encoded JSON object.
REQUEST_STRUCTURE=$(echo -n '%7B
"rollingRate": "newCasesBySpecimenDateRollingRate",
"direction":"newCasesBySpecimenDateDirection",
"rollingSum":"newCasesBySpecimenDateRollingSum",
"change":"newCasesBySpecimenDateChange",
"changePercentage":"newCasesBySpecimenDateChangePercentage",
"areaName":"areaName"
%7D' | tr '\n' ' ' | sed 's/ //g')
curl -s --compressed \
"$API_URL/data?filters=areaCode=$2;areaType=$1;date=$date&structure=$REQUEST_STRUCTURE" | \
jq -c '.data[0] | .areaName as $name | '"$JQ_FORMAT"
;;
*)
echo "Area Type must be one of: msoa, ltla, utla!"
exit 1
esac

@ -1,3 +1,6 @@
#!/bin/bash
report=$(curl -q wttr.in/?format="%C,+%t" 2>/dev/null)
if [[ $report =~ "Unknown location" || $report =~ "Sorry" ]]; then
report="No data"
fi
echo $report

@ -1,19 +1,65 @@
/* Polar Night */
@define-color nord0 #2e3440;
@define-color nord1 #3b4252;
@define-color nord2 #434c5e;
@define-color nord3 #4c566a;
/* Snow Storm */
@define-color nord4 #d8dee9;
@define-color nord5 #e5e9f0;
@define-color nord6 #eceff4;
/* Frost */
@define-color nord7 #8fbcbb;
@define-color nord8 #88c0d0;
@define-color nord9 #81a1c1;
@define-color nord10 #5e81ac;
/* Aurora */
@define-color nord11 #bf616a;
@define-color nord12 #d08770;
@define-color nord13 #ebcb8b;
@define-color nord14 #a3be8c;
@define-color nord15 #b48ead;
/* Simple color names */
@define-color bgkdark @nord0;
@define-color bgkgrey @nord2;
@define-color text @nord4;
@define-color lightblue @nord7;
@define-color darkblue @nord10;
@define-color red @nord11;
@define-color orange @nord12;
@define-color yellow @nord13;
@define-color green @nord14;
@define-color purple @nord15;
* {
font-size: 11px;
font-family: "Roboto", "Font Awesome 5 Free";
font-size: 12px;
font-family: "Kanit Medium", "Font Awesome 5 Free";
}
window#waybar {
color: #d8dee9;
background: #2e3440;
border-radius: 16px;
border: 2px solid #5e81ac;
color: @lightblue;
background: @bgkdark;
border-radius: 10px;
border: 2px solid @darkblue;
}
#custom-updates {
font-family: "Symbols Nerd Font";
window#waybar.left {
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-top: none;
}
window#waybar.top {
border-bottom-left-radius: 0px;
}
/*#custom-updates {
font-family: "Symbols Nerd Font";
}*/
/* Base styling for modules */
#workspaces,
#mode,
@ -34,41 +80,38 @@ window#waybar {
#custom-separator,
#custom-shutdown,
#custom-reboot,
#custom-covid,
#taskbar,
#tray {
padding: 0px 10px 0px 10px;
padding: 1px 10px 0px 10px;
margin: 5px 0px 5px 0px;
text-shadow: 1px 1px 1px #2e3440;
/*border: 2px solid #2e3440;*/
border-radius: 10px;
background: #4c566a;
/*text-shadow: 1px 1px 1px black;*/
border-radius: 6px;
background: @bgkgrey;
}
/* Separator */
#custom-separator {
background: #4c566a;
opacity: 0;
padding: 0px;
}
/* TOP BAR (left)*/
#workspaces {
margin-left: 5px;
padding: 0px;
}
#workspaces button {
padding: 0px 5px 0px 5px;
border-radius: 10px;
color: @lightblue;
padding: 1px 5px 0px 7px;
border-radius: 6px;
}
#workspaces button.focused {
background: rgba(94, 129, 172, 0.8)
color: @purple;
}
#mode {
background: rgba(191, 97, 106, 0.8)
color: @red;
}
/* TOP BAR (right/center) */
#disk.1,
#memory,
#custom-reboot,
@ -93,35 +136,70 @@ window#waybar {
}
#clock {
background: rgba(94, 129, 172, 0.8)
color: @lightblue;
}
/*#custom-swap,
#battery.good,
#cpu.good,
#disk.1.good,
#disk.2.good,
#memory.good {
background: rgba(163, 190, 140, 0.7);
}*/
#battery.warning,
#cpu.warning,
#custom-updates.checking,
#custom-auroch.checking {
background: rgba(235, 203, 139, 0.8)
#custom-auroch.checking,
#disk.1.warning,
#disk.2.warning,
#memory.warning {
color: @yellow;
}
#battery.critical,
#cpu.critical,
#custom-updates.error,
#custom-auroch.error,
#disk.1.critical,
#disk.2.critical,
#memory.critical {
color: @orange;
}
#custom-updates.no-updates,
#custom-auroch.no-updates {
background: rgba(163, 190, 140, 0.8)
color: @green;
}
#custom-updates.updates,
#custom-auroch.updates {
background: rgba(180, 142, 173, 0.8)
}
#custom-updates.error,
#custom-auroch.error {
background: rgba(191, 97, 106, 0.8)
color: @purple;
}
#taskbar {
#taskbar,
#tray,
#window {
padding: 0px;
margin: 3px 5px 5px 5px;;
}
#taskbar button {
border-radius: 10px;
margin: 0px;
padding: 0px 5px 0px 5px;
text-shadow: 1px 1px 1px #2e3440;
color: @lightblue;
border-radius: 6px;
padding-top: 5px;
}
#taskbar button.active {
background: rgba(94, 129, 172, 0.8);
background: @nord3;
}
#tray,
#window {
padding: 5px 0px 5px 0px;
}
#custom-covid.DOWN {
color: @green;
}
#custom-covid.UP {
color: @orange;
}

@ -1,8 +1,14 @@
#window {
border-radius: 20px;
border-radius: 10px;
border: 2px solid #5e81ac;
}
#text {
color: #8fbcbb;
font-family: "Kanit Regular";
text-shadow: 1px 1px 1px #2e3440;
}
#outer-box {
padding: 5px;
margin: 10px