refine gruvbox-95
BIN
gruvbox-95/icons/battery-98.png
Normal file
After Width: | Height: | Size: 563 B |
BIN
gruvbox-95/icons/binary-98.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
gruvbox-95/icons/bluetooth.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
gruvbox-95/icons/briefcase-98.png
Normal file
After Width: | Height: | Size: 636 B |
BIN
gruvbox-95/icons/brightness-98.png
Normal file
After Width: | Height: | Size: 757 B |
BIN
gruvbox-95/icons/code-98.png
Normal file
After Width: | Height: | Size: 382 B |
BIN
gruvbox-95/icons/computer-98.png
Normal file
After Width: | Height: | Size: 529 B |
BIN
gruvbox-95/icons/cpu-98.png
Normal file
After Width: | Height: | Size: 794 B |
BIN
gruvbox-95/icons/floppy-98.png
Normal file
After Width: | Height: | Size: 720 B |
BIN
gruvbox-95/icons/hardisk-98.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
gruvbox-95/icons/internet-98.png
Normal file
After Width: | Height: | Size: 948 B |
BIN
gruvbox-95/icons/keys-98.png
Normal file
After Width: | Height: | Size: 660 B |
BIN
gruvbox-95/icons/memory-98.png
Normal file
After Width: | Height: | Size: 380 B |
BIN
gruvbox-95/icons/notification-98.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
gruvbox-95/icons/poweroff-98.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
gruvbox-95/icons/processor-98.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
gruvbox-95/icons/restart-98.png
Normal file
After Width: | Height: | Size: 634 B |
BIN
gruvbox-95/icons/restrict-98.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
gruvbox-95/icons/shutdown-98.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
gruvbox-95/icons/sound-98.png
Normal file
After Width: | Height: | Size: 497 B |
BIN
gruvbox-95/icons/temp-98.png
Normal file
After Width: | Height: | Size: 508 B |
BIN
gruvbox-95/icons/timewarrior-98.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
gruvbox-95/icons/tux-again.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
gruvbox-95/wallpapers/blue_gruv_aoc.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
gruvbox-95/wallpapers/blue_gruv_dell.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
gruvbox-95/wallpapers/blue_gruv_thinkpad.png
Normal file
After Width: | Height: | Size: 10 KiB |
59
gruvbox-95/wallpapers/src/blue_gruv_dell.svg
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="3440"
|
||||||
|
height="1440"
|
||||||
|
viewBox="0 0 3439.9999 1440"
|
||||||
|
version="1.1"
|
||||||
|
id="svg622"
|
||||||
|
sodipodi:docname="plain_gruv_dell.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
inkscape:export-filename="blue_gruv_dell.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs622" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview622"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:zoom="0.59993751"
|
||||||
|
inkscape:cx="1871.0282"
|
||||||
|
inkscape:cy="834.25355"
|
||||||
|
inkscape:window-width="1715"
|
||||||
|
inkscape:window-height="1392"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg622" />
|
||||||
|
<title
|
||||||
|
id="title1">Green No Grid</title>
|
||||||
|
<rect
|
||||||
|
fill="#000e07"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="3440"
|
||||||
|
height="1440"
|
||||||
|
id="rect1"
|
||||||
|
style="fill:#458588;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5456" />
|
||||||
|
<metadata
|
||||||
|
id="metadata1">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:title>Green No Grid</dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
59
gruvbox-95/wallpapers/src/blue_gruv_thinkpad.svg
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="1920"
|
||||||
|
height="1080"
|
||||||
|
viewBox="0 0 1920 1080"
|
||||||
|
version="1.1"
|
||||||
|
id="svg622"
|
||||||
|
sodipodi:docname="blue_gruv_thinkpad.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
inkscape:export-filename="blue_gruv_thinkpad.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:zoom="0.31666667"
|
||||||
|
inkscape:cx="958.42105"
|
||||||
|
inkscape:cy="1223.6842"
|
||||||
|
inkscape:window-width="1715"
|
||||||
|
inkscape:window-height="1392"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg622" />
|
||||||
|
<defs
|
||||||
|
id="defs622" />
|
||||||
|
<title
|
||||||
|
id="title1">Green No Grid</title>
|
||||||
|
<rect
|
||||||
|
fill="#000e07"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="1920"
|
||||||
|
height="1080"
|
||||||
|
id="rect3"
|
||||||
|
style="fill:#458588;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata3">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:title>Green No Grid</dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
59
gruvbox-95/wallpapers/src/plain_gruv_aoc.svg
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="2560"
|
||||||
|
height="1440"
|
||||||
|
viewBox="0 0 2559.9999 1440"
|
||||||
|
version="1.1"
|
||||||
|
id="svg622"
|
||||||
|
sodipodi:docname="plain_gruv_aoc.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
inkscape:export-filename="blue_gruv_aoc.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:zoom="0.2796875"
|
||||||
|
inkscape:cx="1278.2123"
|
||||||
|
inkscape:cy="720.44693"
|
||||||
|
inkscape:window-width="1715"
|
||||||
|
inkscape:window-height="1392"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg622" />
|
||||||
|
<defs
|
||||||
|
id="defs622" />
|
||||||
|
<title
|
||||||
|
id="title1">Green No Grid</title>
|
||||||
|
<rect
|
||||||
|
fill="#000e07"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="2560"
|
||||||
|
height="1440"
|
||||||
|
id="rect1"
|
||||||
|
style="fill:#458588;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.33333" />
|
||||||
|
<metadata
|
||||||
|
id="metadata1">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:title>Green No Grid</dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -52,8 +52,8 @@ input {
|
||||||
general {
|
general {
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
|
||||||
gaps_in = 1
|
gaps_in = 3
|
||||||
gaps_out = 0
|
gaps_out = 6
|
||||||
border_size = 2
|
border_size = 2
|
||||||
# col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
# col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||||
# col.inactive_border = rgba(595959aa)
|
# col.inactive_border = rgba(595959aa)
|
||||||
|
@ -87,7 +87,7 @@ decoration {
|
||||||
}
|
}
|
||||||
|
|
||||||
animations {
|
animations {
|
||||||
enabled = no
|
enabled = yes
|
||||||
|
|
||||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
preload = ~/Pictures/Wallpapers/plain_gruv_thinkpad.png
|
preload = ~/dotfiles/gruvbox-95/wallpapers/blue_gruv_thinkpad.png
|
||||||
preload = ~/Pictures/Wallpapers/plain_gruv_aoc.png
|
preload = ~/dotfiles/gruvbox-95/wallpapers/blue_gruv_dell.png
|
||||||
preload = ~/Pictures/Wallpapers/plain_gruv_dell.png
|
preload = ~/dotfiles/gruvbox-95/wallpapers/blue_gruv_aoc.png
|
||||||
|
|
||||||
wallpaper = HDMI-A-1,~/Pictures/Wallpapers/plain_gruv_dell.png
|
wallpaper = HDMI-A-1,~/dotfiles/gruvbox-95/wallpapers/blue_gruv_dell.png
|
||||||
wallpaper = DP-2,~/Pictures/Wallpapers/plain_gruv_aoc.png
|
wallpaper = DP-2,~/dotfiles/gruvbox-95/wallpapers/blue_gruv_aoc.png
|
||||||
wallpaper = eDP-1,~/Pictures/Wallpapers/plain_gruv_thinkpad.png
|
wallpaper = eDP-1,~/dotfiles/gruvbox-95/wallpapers/blue_gruv_thinkpad.png
|
||||||
|
|
||||||
splash = false
|
splash = false
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
configuration {
|
configuration {
|
||||||
/* modes: "window,drun,run,ssh";*/
|
/* modes: "window,drun,run,ssh";*/
|
||||||
font: "Sys TT 12";
|
font: "Sys TT 12";
|
||||||
location: 1;
|
location: 7;
|
||||||
kb-row-up: "Up,Control+k";
|
kb-row-up: "Up,Control+k";
|
||||||
kb-row-down: "Down,Control+j";
|
kb-row-down: "Down,Control+j";
|
||||||
kb-cancel: "Escape,Control+c";
|
kb-cancel: "Escape,Control+c";
|
||||||
|
@ -22,7 +22,7 @@ cycle: false;
|
||||||
/* run-shell-command: "{terminal} -e {cmd}";*/
|
/* run-shell-command: "{terminal} -e {cmd}";*/
|
||||||
/* window-command: "wmctrl -i -R {window}";*/
|
/* window-command: "wmctrl -i -R {window}";*/
|
||||||
/* window-match-fields: "all";*/
|
/* window-match-fields: "all";*/
|
||||||
/* icon-theme: ;*/
|
icon-theme: 'Raleigh' ;
|
||||||
/* drun-match-fields: "name,generic,exec,categories,keywords";*/
|
/* drun-match-fields: "name,generic,exec,categories,keywords";*/
|
||||||
/* drun-categories: ;*/
|
/* drun-categories: ;*/
|
||||||
/* drun-show-actions: false;*/
|
/* drun-show-actions: false;*/
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
selected-urgent-background: var(red);
|
selected-urgent-background: var(red);
|
||||||
alternate-active-background: var(lightbg);
|
alternate-active-background: var(lightbg);
|
||||||
spacing: 2;
|
spacing: 2;
|
||||||
blue: rgba ( 152, 151, 26 , 100 % );
|
blue: rgba (69, 133, 136, 80 % );
|
||||||
alternate-normal-foreground: var(foreground);
|
alternate-normal-foreground: var(foreground);
|
||||||
urgent-background: var(background);
|
urgent-background: var(background);
|
||||||
selected-normal-foreground: var(foreground);
|
selected-normal-foreground: var(foreground);
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
selected-active-background: var(blue);
|
selected-active-background: var(blue);
|
||||||
active-background: var(background);
|
active-background: var(background);
|
||||||
selected-normal-background: var(lightfg);
|
selected-normal-background: var(lightfg);
|
||||||
alternate-normal-background: var(lightbg);
|
alternate-normal-background: var(background);
|
||||||
foreground: rgba ( 40, 40, 40, 100 % );
|
foreground: rgba ( 40, 40, 40, 100 % );
|
||||||
selected-urgent-foreground: var(background);
|
selected-urgent-foreground: var(background);
|
||||||
normal-foreground: var(foreground);
|
normal-foreground: var(foreground);
|
||||||
|
@ -34,9 +34,9 @@
|
||||||
alternate-active-foreground: var(blue);
|
alternate-active-foreground: var(blue);
|
||||||
}
|
}
|
||||||
element {
|
element {
|
||||||
padding: 2px ;
|
padding: 8px 2px 0px 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
spacing: 5px ;
|
spacing: 8px ;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
element normal.normal {
|
element normal.normal {
|
||||||
|
@ -52,8 +52,8 @@ element normal.active {
|
||||||
text-color: var(active-foreground);
|
text-color: var(active-foreground);
|
||||||
}
|
}
|
||||||
element selected.normal {
|
element selected.normal {
|
||||||
background-color: var(selected-normal-background);
|
background-color: var(selected-normal-background);
|
||||||
text-color: var(selected-normal-foreground);
|
text-color: #ebdbb2;
|
||||||
|
|
||||||
}
|
}
|
||||||
element selected.urgent {
|
element selected.urgent {
|
||||||
|
@ -83,8 +83,9 @@ element-text {
|
||||||
text-color: inherit;
|
text-color: inherit;
|
||||||
}
|
}
|
||||||
element-icon {
|
element-icon {
|
||||||
|
padding: 0 0 6px 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
size: 1.0000em ;
|
size: 1.00000em ;
|
||||||
cursor: inherit;
|
cursor: inherit;
|
||||||
text-color: inherit;
|
text-color: inherit;
|
||||||
}
|
}
|
||||||
|
@ -92,9 +93,12 @@ window {
|
||||||
padding: 5;
|
padding: 5;
|
||||||
background-color: var(background);
|
background-color: var(background);
|
||||||
width: 20%;
|
width: 20%;
|
||||||
|
border: 2;
|
||||||
|
border-color: #ebdbb2;
|
||||||
|
margin: 1 10;
|
||||||
}
|
}
|
||||||
mainbox {
|
mainbox {
|
||||||
padding: 0;
|
padding: 4;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
message {
|
message {
|
||||||
|
@ -103,7 +107,7 @@ message {
|
||||||
border: 2px dash 0px 0px ;
|
border: 2px dash 0px 0px ;
|
||||||
}
|
}
|
||||||
textbox {
|
textbox {
|
||||||
text-color: var(foreground);
|
text-color: #f9f5d7;
|
||||||
}
|
}
|
||||||
listview {
|
listview {
|
||||||
padding: 2px 0px 0px ;
|
padding: 2px 0px 0px ;
|
||||||
|
@ -116,9 +120,9 @@ listview {
|
||||||
scrollbar {
|
scrollbar {
|
||||||
width: 2px ;
|
width: 2px ;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
handle-width: 7px ;
|
handle-width: 6px ;
|
||||||
border: 0;
|
border: 0;
|
||||||
handle-color: rgba ( 102, 92, 84, 100% );
|
handle-color: #665c54;
|
||||||
}
|
}
|
||||||
sidebar {
|
sidebar {
|
||||||
border-color: var(separatorcolor);
|
border-color: var(separatorcolor);
|
||||||
|
@ -147,11 +151,11 @@ textbox-num-sep {
|
||||||
text-color: var(grey);
|
text-color: var(grey);
|
||||||
}
|
}
|
||||||
inputbar {
|
inputbar {
|
||||||
background-color: rgba ( 251, 241, 199, 100% ) ;
|
background-color: #f9f5d7;
|
||||||
padding: 2px ;
|
padding: 8px 2px 6px 2px;
|
||||||
spacing: 2px ;
|
spacing: 5px ;
|
||||||
text-color: var(normal-foreground);
|
text-color: var(normal-foreground);
|
||||||
border: 1;
|
border: 2px;
|
||||||
border-color: rgba ( 102, 92, 84, 100% );
|
border-color: rgba ( 102, 92, 84, 100% );
|
||||||
children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
|
children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
|
||||||
}
|
}
|
||||||
|
|
1
scripts/screenshot.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
grim -g "$(slurp)" - | swappy -f -
|
37
scripts/third-party/tofi_window_switch.sh
vendored
|
@ -1,37 +0,0 @@
|
||||||
# Source = https://github.com/hyprwm/Hyprland/discussions/830
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# rofi -show window for Hyprland, basically
|
|
||||||
|
|
||||||
state="$(hyprctl -j clients)"
|
|
||||||
active_window="$(hyprctl -j activewindow)"
|
|
||||||
|
|
||||||
current_addr="$(echo "$active_window" | gojq -r '.address')"
|
|
||||||
|
|
||||||
window="$(echo "$state" |
|
|
||||||
gojq -r '.[] | select(.monitor != -1 ) | "\(.address) \(.workspace.name) \(.title)"' |
|
|
||||||
sed "s|$current_addr|focused ->|" |
|
|
||||||
sort -r |
|
|
||||||
tofi --fuzzy-match true)"
|
|
||||||
|
|
||||||
addr="$(echo "$window" | awk '{print $1}')"
|
|
||||||
ws="$(echo "$window" | awk '{print $2}')"
|
|
||||||
|
|
||||||
if [[ "$addr" =~ focused* ]]; then
|
|
||||||
echo 'already focused, exiting'
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
fullscreen_on_same_ws="$(echo "$state" | gojq -r ".[] | select(.fullscreen == true) | select(.workspace.name == \"$ws\") | .address")"
|
|
||||||
|
|
||||||
if [[ "$window" != "" ]]; then
|
|
||||||
if [[ "$fullscreen_on_same_ws" == "" ]]; then
|
|
||||||
hyprctl dispatch focuswindow address:${addr}
|
|
||||||
else
|
|
||||||
# If we want to focus app_A and app_B is fullscreen on the same workspace,
|
|
||||||
# app_A will get focus, but app_B will remain on top.
|
|
||||||
# This monstrosity is to make sure app_A will end up on top instead.
|
|
||||||
# XXX: doesn't handle fullscreen 0, but I don't care.
|
|
||||||
notify-send 'Complex switch' "$window"
|
|
||||||
hyprctl --batch "dispatch focuswindow address:${fullscreen_on_same_ws}; dispatch fullscreen 1; dispatch focuswindow address:${addr}; dispatch fullscreen 1"
|
|
||||||
fi
|
|
||||||
fi
|
|
|
@ -36,10 +36,10 @@ def main():
|
||||||
output = {}
|
output = {}
|
||||||
try:
|
try:
|
||||||
if timer_active():
|
if timer_active():
|
||||||
output["text"] = ""
|
output["text"] = "Timer active"
|
||||||
output["class"] = "active"
|
output["class"] = "active"
|
||||||
else:
|
else:
|
||||||
output["text"] = ""
|
output["text"] = "Timer inactive"
|
||||||
output["class"] = "inactive"
|
output["class"] = "inactive"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
output["text"] = "Error"
|
output["text"] = "Error"
|
|
@ -1,166 +0,0 @@
|
||||||
#! /usr/local/bin/python3
|
|
||||||
import requests
|
|
||||||
import os
|
|
||||||
from textwrap import dedent
|
|
||||||
import logging
|
|
||||||
import base64
|
|
||||||
import json
|
|
||||||
import pytz
|
|
||||||
from datetime import datetime, timedelta
|
|
||||||
from tabulate import tabulate # third-party module, must be installed on system
|
|
||||||
|
|
||||||
|
|
||||||
TOGGL_API_URL = "https://api.track.toggl.com/api/v9/"
|
|
||||||
TOGGL_API_KEY = os.getenv("TOGGL_API_KEY")
|
|
||||||
TOGGL_WORKSPACE_ID = os.getenv("TOGGL_WORKSPACE_ID")
|
|
||||||
ENCODED_TOGGL_API_KEY = str(base64.b64encode(TOGGL_API_KEY.encode("utf-8")), "utf-8")
|
|
||||||
HEADERS = {
|
|
||||||
"content-type": "application/json",
|
|
||||||
"Authorization": "Basic %s" % ENCODED_TOGGL_API_KEY,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def get_data(endpoint):
|
|
||||||
response = requests.get(
|
|
||||||
f"https://api.track.toggl.com/api/v9/{endpoint}",
|
|
||||||
headers={
|
|
||||||
"content-type": "application/json",
|
|
||||||
"Authorization": "Basic %s" % ENCODED_TOGGL_API_KEY,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
if response.status_code == 200:
|
|
||||||
return response.json()
|
|
||||||
else:
|
|
||||||
raise Exception(
|
|
||||||
f"Failed to fetch data from API. Status code: {response.status_code}"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_project_name(project_id: int) -> str:
|
|
||||||
try:
|
|
||||||
projects = get_data(f"workspaces/{TOGGL_WORKSPACE_ID}/projects")
|
|
||||||
project = [project for project in projects if project["id"] == project_id][0]
|
|
||||||
return project["name"]
|
|
||||||
except Exception as e:
|
|
||||||
logging.warning(f"Error. Could not retrieve project name: {e}")
|
|
||||||
|
|
||||||
|
|
||||||
def get_human_date(timestamp):
|
|
||||||
return datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%S%z").strftime(
|
|
||||||
"%a %d %b (%H:%M)"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_time_difference(start, end):
|
|
||||||
format = "%Y-%m-%dT%H:%M:%S%z"
|
|
||||||
datetime1 = datetime.strptime(start, format)
|
|
||||||
datetime2 = datetime.strptime(end, format)
|
|
||||||
difference = datetime2 - datetime1
|
|
||||||
return get_hms(int(difference.total_seconds()))
|
|
||||||
|
|
||||||
|
|
||||||
def get_hms(unix_seconds):
|
|
||||||
return str(timedelta(seconds=unix_seconds))
|
|
||||||
|
|
||||||
|
|
||||||
def timer_is_running():
|
|
||||||
active_session = get_data("me/time_entries/current")
|
|
||||||
if not active_session:
|
|
||||||
return False
|
|
||||||
else:
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
# def get_active_time_entry():
|
|
||||||
# active_session = get_data("me/time_entries/current")
|
|
||||||
# if not active_session:
|
|
||||||
# return "No timer running"
|
|
||||||
# else:
|
|
||||||
# current_time = datetime.now(pytz.utc).strftime("%Y-%m-%dT%H:%M:%S%z")
|
|
||||||
# entry = {
|
|
||||||
# "project_id": get_project_name(active_session["project_id"]),
|
|
||||||
# "duration": get_time_difference(active_session["start"], current_time),
|
|
||||||
# "start": get_human_date(active_session["start"]),
|
|
||||||
# "description": active_session["description"],
|
|
||||||
# }
|
|
||||||
# return print_table([entry])
|
|
||||||
|
|
||||||
|
|
||||||
def process_active_entry(entry):
|
|
||||||
time_now = datetime.now(pytz.utc).strftime("%Y-%m-%dT%H:%M:%S%z")
|
|
||||||
return {
|
|
||||||
"project_id": get_project_name(entry["project_id"]),
|
|
||||||
"duration": get_time_difference(entry["start"], time_now),
|
|
||||||
"start": get_human_date(entry["start"]),
|
|
||||||
"description": entry["description"],
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def list_recent_time_entries():
|
|
||||||
try:
|
|
||||||
recent_entries = get_data("me/time_entries")
|
|
||||||
properties = ["project_id", "duration", "start", "description"]
|
|
||||||
transformers = {
|
|
||||||
"project_id": get_project_name,
|
|
||||||
"start": get_human_date,
|
|
||||||
"duration": get_hms,
|
|
||||||
}
|
|
||||||
processed_entries = []
|
|
||||||
first_entry = recent_entries[0]
|
|
||||||
if not first_entry["stop"]:
|
|
||||||
active_entry = process_active_entry(first_entry)
|
|
||||||
print(active_entry)
|
|
||||||
for entry in recent_entries[:5]:
|
|
||||||
processed_entry = {}
|
|
||||||
for prop in properties:
|
|
||||||
if prop in transformers:
|
|
||||||
processed_entry[prop] = transformers[prop](entry[prop]) or "null"
|
|
||||||
else:
|
|
||||||
processed_entry[prop] = entry[prop] or "null"
|
|
||||||
processed_entries.append(processed_entry)
|
|
||||||
processed_entries[0] = active_entry
|
|
||||||
return dedent(
|
|
||||||
tabulate(processed_entries, headers="keys", tablefmt="simple_outline")
|
|
||||||
)
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
return f"Error. Could not retrieve recent time entries: {e}"
|
|
||||||
|
|
||||||
|
|
||||||
def stop_running_timer(entry_id):
|
|
||||||
patch_url = (
|
|
||||||
f"{TOGGL_API_URL}workspaces/{TOGGL_WORKSPACE_ID}/time_entries/{entry_id}/stop"
|
|
||||||
)
|
|
||||||
response = requests.patch(patch_url, headers=HEADERS)
|
|
||||||
if response.status_code != 200:
|
|
||||||
print("Error: timer not stopped")
|
|
||||||
print(response.content)
|
|
||||||
else:
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
output = {}
|
|
||||||
try:
|
|
||||||
if timer_is_running():
|
|
||||||
output["text"] = " Tracker: active"
|
|
||||||
output["class"] = "active"
|
|
||||||
else:
|
|
||||||
output["text"] = " Tracker: inactive"
|
|
||||||
output["class"] = "inactive"
|
|
||||||
output["tooltip"] = list_recent_time_entries()
|
|
||||||
except Exception as e:
|
|
||||||
output["text"] = "Error"
|
|
||||||
|
|
||||||
print(json.dumps(output))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
|
|
||||||
print(list_recent_time_entries())
|
|
||||||
# print(get_project_name(193325937))
|
|
||||||
# print(list_recent_time_entries())
|
|
||||||
# print(get_active_time_entry())
|
|
||||||
# print(get_active_session())
|
|
||||||
# stop_running_timer(3318296941)
|
|
|
@ -52,10 +52,15 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
background-color: #a89983;
|
background-color: #bdae93;
|
||||||
border: 2px solid;
|
border: 2px solid #ebdbb2;
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
padding: 0;
|
/* border-left: 2px solid #ebdbb2; */
|
||||||
|
/* border-top: 2px solid #ebdbb2; */
|
||||||
|
/* border-right: 2px solid #665c54; */
|
||||||
|
/* border-bottom: 2px solid #665c54; */
|
||||||
|
|
||||||
|
padding: 2px 0;
|
||||||
transition: background 0.15s ease-in-out;
|
transition: background 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,6 +407,12 @@
|
||||||
|
|
||||||
.control-center {
|
.control-center {
|
||||||
/* The Control Center which contains the old notifications + widgets */
|
/* The Control Center which contains the old notifications + widgets */
|
||||||
|
|
||||||
|
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
|
||||||
|
border-left: 2px solid #ebdbb2;
|
||||||
|
border-top: 2px solid #ebdbb2;
|
||||||
|
border-right: 2px solid #665c54;
|
||||||
|
border-bottom: 2px solid #665c54;
|
||||||
background: #bdae93;
|
background: #bdae93;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
@ -411,11 +422,6 @@
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-center .control-center-list {
|
|
||||||
/* List of notifications */
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.control-center .control-center-list .notification {
|
.control-center .control-center-list .notification {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
/* box-shadow: */
|
/* box-shadow: */
|
||||||
|
|
421
waybar/config
|
@ -1,106 +1,228 @@
|
||||||
{
|
{
|
||||||
"layer": "top",
|
|
||||||
"margin": "0",
|
|
||||||
"height": 25,
|
|
||||||
"spacing": 0,
|
|
||||||
|
|
||||||
"modules-left": [
|
"layer": "top",
|
||||||
"custom/os",
|
"position": "bottom",
|
||||||
"hyprland/workspaces",
|
"margin": "0",
|
||||||
"wlr/taskbar"
|
"height": 20,
|
||||||
|
"spacing": "",
|
||||||
|
|
||||||
|
"modules-left": [
|
||||||
|
"image#os",
|
||||||
|
"wlr/taskbar"
|
||||||
],
|
],
|
||||||
|
|
||||||
"modules-center": [
|
"modules-center": [
|
||||||
],
|
],
|
||||||
"modules-right": [
|
|
||||||
"network",
|
|
||||||
"bluetooth",
|
|
||||||
"cpu",
|
|
||||||
"memory",
|
|
||||||
"temperature",
|
|
||||||
"backlight",
|
|
||||||
"disk",
|
|
||||||
"custom/diskBackup",
|
|
||||||
"battery",
|
|
||||||
"custom/wakatime",
|
|
||||||
"pulseaudio",
|
|
||||||
"clock",
|
|
||||||
"custom/timewarrior",
|
|
||||||
"custom/lock",
|
|
||||||
"custom/restart",
|
|
||||||
"custom/shutdown",
|
|
||||||
"custom/notification",
|
|
||||||
],
|
|
||||||
|
|
||||||
"wlr/taskbar": {
|
"modules-right": [
|
||||||
|
"group/timeTracker",
|
||||||
|
"group/workspaceList",
|
||||||
|
"group/metrics",
|
||||||
|
"group/clockOutput",
|
||||||
|
"group/controls",
|
||||||
|
],
|
||||||
|
|
||||||
|
"group/clockOutput": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"modules": [
|
||||||
|
"clock",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"group/workspaceList": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"modules": [
|
||||||
|
"hyprland/workspaces",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"group/timeTracker": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"modules": [
|
||||||
|
"custom/timewarrior",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"group/metrics": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"modules": [
|
||||||
|
"image#internet",
|
||||||
|
"network",
|
||||||
|
"image#bluetooth",
|
||||||
|
"bluetooth",
|
||||||
|
"image#memory",
|
||||||
|
"memory",
|
||||||
|
"image#cpu",
|
||||||
|
"cpu",
|
||||||
|
"image#harddrive",
|
||||||
|
"disk",
|
||||||
|
"image#backup",
|
||||||
|
"custom/diskBackup",
|
||||||
|
"image#backlight",
|
||||||
|
"backlight",
|
||||||
|
"image#volume",
|
||||||
|
"pulseaudio",
|
||||||
|
"image#battery",
|
||||||
|
"battery",
|
||||||
|
"image#code",
|
||||||
|
"custom/wakatime",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"group/controls": {
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"modules": [
|
||||||
|
"image#timewarrior",
|
||||||
|
"image#notification",
|
||||||
|
"image#keys",
|
||||||
|
"image#restart",
|
||||||
|
"image#shutdown",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "activate",
|
||||||
|
"sort-by-number": false,
|
||||||
|
"format-icons": {
|
||||||
|
"1": "Workspace 1",
|
||||||
|
"2": "Workspace 2",
|
||||||
|
"3": "Workspace 3",
|
||||||
|
"4": "Workspace 4",
|
||||||
|
"5": "Workspace 5",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#code": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/binary-98.png",
|
||||||
|
"size": 22,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#battery": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/battery-98.png",
|
||||||
|
"size": 22,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#backup": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/floppy-98.png",
|
||||||
|
"size": 22,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#harddrive": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/hardisk-98.png",
|
||||||
|
"size": 22,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#volume": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/sound-98.png",
|
||||||
|
"size": 19,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#backlight": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/brightness-98.png",
|
||||||
|
"size": 18,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#memory": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/memory-98.png",
|
||||||
|
"size": 22,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#cpu": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/processor-98.png",
|
||||||
|
"size": 22,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#internet": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/internet-98.png",
|
||||||
|
"size": 22,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#bluetooth": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/bluetooth.png",
|
||||||
|
"size": 20,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
"image#os": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/computer-98.png",
|
||||||
|
"size": 26,
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#keys": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/keys-98.png",
|
||||||
|
"size": 26,
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "sleep 0.1 && hyprlock",
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#restart": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/restart-98.png",
|
||||||
|
"size": 26,
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "sleep 0.1 && systemctl reboot",
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#shutdown": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/poweroff-98.png",
|
||||||
|
"size": 26,
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "sleep 0.1 && systemctl poweroff",
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#notification": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/notification-98.png",
|
||||||
|
"size": 26,
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "sleep 0.2 && swaync-client -t -sw",
|
||||||
|
},
|
||||||
|
|
||||||
|
"image#timewarrior": {
|
||||||
|
"path": "/home/thomas/dotfiles/gruvbox-95/icons/timewarrior-98.png",
|
||||||
|
"size": 26,
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "sleep 0.15 && timew stop && notify-send 'Time Warrior' 'Timer stopped'",
|
||||||
|
"on-click-right": "sleep 0.1 && timew continue && notify-send 'Time Warrior' 'Timer resumed'",
|
||||||
|
},
|
||||||
|
|
||||||
|
"wlr/taskbar": {
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"icon-size": 20,
|
"icon-size": 22,
|
||||||
"icon-theme": "Pop",
|
"icon-theme": "Raleigh",
|
||||||
"tooltip-format": "{title}",
|
"tooltip-format": "{title}",
|
||||||
"on-click": "activate",
|
"on-click": "activate",
|
||||||
"on-click-middle": "close",
|
|
||||||
"ignore-list": [
|
|
||||||
"Alacritty"
|
|
||||||
],
|
|
||||||
"app_ids-mapping": {
|
|
||||||
"firefoxdeveloperedition": "firefox-developer-edition"
|
|
||||||
},
|
|
||||||
"rewrite": {
|
|
||||||
"Firefox Web Browser": "Firefox",
|
|
||||||
"Foot Server": "Terminal"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"keyboard-state": {
|
|
||||||
"numlock": true,
|
|
||||||
"capslock": true,
|
|
||||||
"format": "{name} {icon}",
|
|
||||||
"format-icons": {
|
|
||||||
"locked": "",
|
|
||||||
"unlocked": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mpd": {
|
|
||||||
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
|
|
||||||
"format-disconnected": "Disconnected ",
|
|
||||||
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
|
|
||||||
"unknown-tag": "N/A",
|
|
||||||
"interval": 2,
|
|
||||||
"consume-icons": {
|
|
||||||
"on": " "
|
|
||||||
},
|
|
||||||
"random-icons": {
|
|
||||||
"off": "<span color=\"#f53c3c\"></span> ",
|
|
||||||
"on": " "
|
|
||||||
},
|
|
||||||
"repeat-icons": {
|
|
||||||
"on": " "
|
|
||||||
},
|
|
||||||
"single-icons": {
|
|
||||||
"on": "1 "
|
|
||||||
},
|
|
||||||
"state-icons": {
|
|
||||||
"paused": "",
|
|
||||||
"playing": ""
|
|
||||||
},
|
|
||||||
"tooltip-format": "MPD (connected)",
|
|
||||||
"tooltip-format-disconnected": "MPD (disconnected)"
|
|
||||||
},
|
|
||||||
"idle_inhibitor": {
|
|
||||||
"format": ""
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"tray": {
|
"tray": {
|
||||||
"spacing": 10
|
"spacing": 10
|
||||||
},
|
},
|
||||||
|
|
||||||
"clock": {
|
"clock": {
|
||||||
"format": "{:%H:%M}",
|
"format": "{:%H:%M}",
|
||||||
"format-alt": "{:%d/%m/%Y}"
|
"format-alt": "{:%d/%m/%Y}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"cpu": {
|
"cpu": {
|
||||||
"format": "CPU: {usage}%",
|
"format": "{usage}%",
|
||||||
"tooltip": false
|
"tooltip": "CPU"
|
||||||
},
|
},
|
||||||
|
|
||||||
"memory": {
|
"memory": {
|
||||||
"format": "Mem: {}%",
|
"format": "{}%",
|
||||||
|
"tooltip": "Memory"
|
||||||
},
|
},
|
||||||
|
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"critical-threshold": 80,
|
"critical-threshold": 80,
|
||||||
"format": "Temp: {temperatureC}°C",
|
"format": "Temp: {temperatureC}°C",
|
||||||
|
@ -110,157 +232,86 @@
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"backlight": {
|
"backlight": {
|
||||||
"device": "acpi_video1",
|
"device": "acpi_video1",
|
||||||
"format": "Dim: {percent}%",
|
"format": "{percent}%",
|
||||||
"format-icons": [
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" "
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"battery": {
|
"battery": {
|
||||||
"states": {
|
"states": {
|
||||||
"warning": 30,
|
"warning": 30,
|
||||||
"critical": 15
|
"critical": 15
|
||||||
},
|
},
|
||||||
"format": "Bat: {capacity}%",
|
"format": "{capacity}%",
|
||||||
"format-charging": "Bat: {capacity}%",
|
"format-charging": "{capacity}%",
|
||||||
"format-plugged": "Bat: {capacity}%",
|
"format-plugged": "{capacity}%",
|
||||||
"format-icons": [
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"battery#bat2": {
|
|
||||||
"bat": "BAT2"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"network": {
|
"network": {
|
||||||
"format-wifi": "Net: {essid}",
|
"format-wifi": "{essid}",
|
||||||
"format-ethernet": "{ipaddr}/{cidr}",
|
"format-ethernet": "{ipaddr}/{cidr}",
|
||||||
"tooltip-format": "{ifname} via {gwaddr}",
|
"tooltip-format": "{ifname} via {gwaddr}",
|
||||||
"format-linked": "{ifname} (No IP)",
|
"format-linked": "{ifname} (No IP)",
|
||||||
"format-disconnected": "Net: none",
|
"format-disconnected": "Net: none",
|
||||||
"format-alt": "Sig: {essid} ({signalStrength}%)"
|
"format-alt": "{essid} ({signalStrength}%)"
|
||||||
},
|
},
|
||||||
|
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
"format": "Vol: {volume}%",
|
"format": "{volume}%",
|
||||||
"format-bluetooth": "Vol: {volume}%",
|
"format-bluetooth": "{volume}%",
|
||||||
"format-bluetooth-muted": "",
|
"format-bluetooth-muted": "",
|
||||||
"format-muted": "Vol: mute",
|
"format-muted": "Mute",
|
||||||
"format-source": "Vol: {volume}%",
|
"format-source": "{volume}%",
|
||||||
"format-source-muted": "Vole: mute",
|
"format-source-muted": "Mute",
|
||||||
"format-icons": {
|
|
||||||
"headphone": "",
|
|
||||||
"hands-free": "",
|
|
||||||
"phone": "",
|
|
||||||
"portable": "",
|
|
||||||
"car": "",
|
|
||||||
"default": [
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"on-click": "pavucontrol"
|
"on-click": "pavucontrol"
|
||||||
},
|
},
|
||||||
|
|
||||||
"disk": {
|
"disk": {
|
||||||
"interval": 30,
|
"interval": 30,
|
||||||
"format": "Disk: {percentage_used}%",
|
"format": "{percentage_used}%",
|
||||||
"path": "/home"
|
"path": "/home"
|
||||||
},
|
},
|
||||||
|
|
||||||
"bluetooth": {
|
"bluetooth": {
|
||||||
"controller": "bluetoothctl",
|
"controller": "bluetoothctl",
|
||||||
"format": "BT: active",
|
"format": "Active",
|
||||||
"format-connected": "BT: connected",
|
"format-connected": "Connected",
|
||||||
"format-alt": "BT: {device_alias}",
|
"format-alt": "{device_alias}",
|
||||||
"format-connected-battery": "BT: {device_battery_percentage}%",
|
"format-connected-battery": "{device_battery_percentage}%",
|
||||||
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
|
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
|
||||||
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
|
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
|
||||||
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
|
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
|
||||||
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
|
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
|
||||||
},
|
},
|
||||||
"custom/media": {
|
|
||||||
"format": "{icon} {}",
|
|
||||||
"return-type": "json",
|
|
||||||
"max-length": 40,
|
|
||||||
"format-icons": {
|
|
||||||
"spotify": "",
|
|
||||||
"default": "🎜"
|
|
||||||
},
|
|
||||||
"escape": true,
|
|
||||||
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"
|
|
||||||
},
|
|
||||||
"custom/os": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
"custom/wakatime": {
|
"custom/wakatime": {
|
||||||
"exec": "source $HOME/.env && python3 $HOME/.config/waybar/resources/custom_modules/wakatime.py",
|
"exec": "source $HOME/.env && python3 $HOME/.config/waybar/resources/custom_modules/wakatime.py",
|
||||||
"format": "Code: {}",
|
"format": "{}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"interval": 600
|
"interval": 600
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/timewarrior": {
|
"custom/timewarrior": {
|
||||||
"exec": "python3 $HOME/.config/waybar/resources/custom_modules/time_warrior_waybar.py",
|
"exec": "python3 $HOME/.config/waybar/resources/custom_modules/time_warrior_waybar.py",
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
"on-click": "sleep 0.15 && timew stop && notify-send 'Time Warrior' 'Timer stopped'",
|
|
||||||
"on-click-right": "sleep 0.1 && timew continue && notify-send 'Time Warrior' 'Timer resumed'",
|
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
"custom/logout": {
|
|
||||||
"format": "",
|
|
||||||
"on-click": "sleep 0.1 && wlogout",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
"custom/notification": {
|
|
||||||
"tooltip": false,
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": {
|
|
||||||
"notification": "<span color=\"#b8bb26\"></span>",
|
|
||||||
"none": "",
|
|
||||||
"dnd-notification": "",
|
|
||||||
"dnd-none": "",
|
|
||||||
"inhibited-notification": "",
|
|
||||||
"inhibited-none": "",
|
|
||||||
"dnd-inhibited-notification": "",
|
|
||||||
"dnd-inhibited-none": "",
|
|
||||||
},
|
|
||||||
"return-type": "json",
|
|
||||||
"exec-if": "which swaync-client",
|
|
||||||
"exec": "swaync-client -swb",
|
|
||||||
"on-click": "sleep 0.2 && swaync-client -t -sw",
|
|
||||||
"on-click-right": "swaync-client -d -sw",
|
|
||||||
"escape": true
|
|
||||||
},
|
|
||||||
"custom/diskBackup": {
|
"custom/diskBackup": {
|
||||||
"format": "Bak: {}",
|
"format": "{}",
|
||||||
"exec": "df -h /media/backups | awk 'NR==2{print $5}'",
|
"exec": "df -h /media/backups | awk 'NR==2{print $5}'",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
"custom/lock": {
|
|
||||||
"format": "",
|
|
||||||
"on-click": "hyprlock",
|
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
"custom/shutdown": {
|
|
||||||
|
"custom/shutdown": {
|
||||||
"format": "",
|
"format": "",
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"on-click": "systemctl poweroff"
|
"on-click": "systemctl poweroff"
|
||||||
},
|
},
|
||||||
"custom/restart": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false,
|
|
||||||
"on-click": "systemctl reboot"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,10 @@ def main():
|
||||||
output = {}
|
output = {}
|
||||||
try:
|
try:
|
||||||
if timer_active():
|
if timer_active():
|
||||||
output["text"] = ""
|
output["text"] = "Timer running"
|
||||||
output["class"] = "active"
|
output["class"] = "active"
|
||||||
else:
|
else:
|
||||||
output["text"] = ""
|
output["text"] = "No timer"
|
||||||
output["class"] = "inactive"
|
output["class"] = "inactive"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
output["text"] = "Error"
|
output["text"] = "Error"
|
||||||
|
|
296
waybar/style.css
|
@ -1,219 +1,117 @@
|
||||||
* {
|
* {
|
||||||
font-weight: 400;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
font-family: "Sys TT", "Font Awesome";
|
font-family: "Sys TT", "Font Awesome";
|
||||||
background-color: #458588;
|
background-color: #bdae93;
|
||||||
border-bottom: 2px solid #282828;
|
padding: 2px 0;
|
||||||
font-size: 16px;
|
border-left: 2px solid #ebdbb2;
|
||||||
|
border-top: 2px solid #ebdbb2;
|
||||||
|
border-right: 2px solid #665c54;
|
||||||
|
border-bottom: 2px solid #665c54;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
#workspaces button {
|
||||||
border-radius: 0;
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
opacity: 1;
|
}
|
||||||
|
|
||||||
|
#timeTracker,
|
||||||
|
#workspaceList,
|
||||||
|
#clockOutput,
|
||||||
|
#metrics {
|
||||||
|
background-color: #bdae93;
|
||||||
|
border-left: 2px solid #665c54;
|
||||||
|
border-top: 2px solid #665c54;
|
||||||
|
border-right: 2px solid #ebdbb2;
|
||||||
|
border-bottom: 2px solid #ebdbb2;
|
||||||
|
margin: 5px 3px;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#controls,
|
||||||
|
#workspaces > *:last-child {
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#image.timewarrior,
|
||||||
|
#image.notification,
|
||||||
|
#image.os,
|
||||||
|
#image.keys,
|
||||||
|
#image.shutdown,
|
||||||
|
#image.restart,
|
||||||
|
#taskbar button {
|
||||||
|
background-color: #bdae93;
|
||||||
|
color: #282828;
|
||||||
|
border-top: 2px solid #ebdbb2;
|
||||||
|
border-left: 2px solid #ebdbb2;
|
||||||
|
border-bottom: 2px solid #665c54;
|
||||||
|
border-right: 2px solid #665c54;
|
||||||
|
margin: 5px 3px;
|
||||||
|
margin-right: 0;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#image.code,
|
||||||
|
#image.battery,
|
||||||
|
#image.backup,
|
||||||
|
#image.harddrive,
|
||||||
|
#image.volume,
|
||||||
|
#image.backlight,
|
||||||
|
#image.cpu,
|
||||||
|
#image.memory,
|
||||||
|
#image.internet,
|
||||||
|
#image.bluetooth {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#image.code,
|
||||||
|
#image.battery,
|
||||||
|
#image.backup,
|
||||||
|
#image.harddrive,
|
||||||
|
#image.volume,
|
||||||
|
#image.backlight,
|
||||||
|
#image.cpu,
|
||||||
|
#image.memory {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#image.backlight,
|
||||||
|
#image.volume {
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#image.harddrive,
|
||||||
|
#image.backup {
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
color: #282828;
|
color: #282828;
|
||||||
border-width: 0;
|
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
background-color: #bdae93;
|
background-color: #bdae93;
|
||||||
box-shadow: none;
|
border-left: 1px solid #ebdbb2;
|
||||||
|
border-top: 1px solid #ebdbb2;
|
||||||
|
border-right: 1px solid #665c54;
|
||||||
|
border-bottom: 1px solid #665c54;
|
||||||
|
padding: 4px 8px;
|
||||||
|
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip label {
|
tooltip label {
|
||||||
color: #282828;
|
color: #282828;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Layout */
|
|
||||||
|
|
||||||
#taskbar {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#custom-wakatime,
|
|
||||||
#network,
|
|
||||||
#bluetooth,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#pulseaudio,
|
|
||||||
#disk,
|
|
||||||
#custom-diskBackup,
|
|
||||||
#battery {
|
|
||||||
padding: 2px 8px 0;
|
|
||||||
margin: 5px 3px 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#taskbar button {
|
|
||||||
margin: 5px 0 6px;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 0px 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-timewarrior,
|
|
||||||
#custom-notification,
|
|
||||||
#custom-lock,
|
|
||||||
#custom-shutdown,
|
|
||||||
#custom-restart,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#custom-logout {
|
|
||||||
margin: 5px 0 6px;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 0px 8px;
|
|
||||||
/* margin: 8px 0 10px; */
|
|
||||||
}
|
|
||||||
|
|
||||||
#taskbar button {
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
margin: 5px 0 6px;
|
|
||||||
font-size: 18px;
|
|
||||||
color: #ebdbb2;
|
|
||||||
padding: 3px 5px 0;
|
|
||||||
background-color: #665c54;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #928374 #282828 #282828 #928374;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces > *:last-child {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-notification {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Colours */
|
|
||||||
|
|
||||||
#taskbar button.active {
|
|
||||||
background-color: #ebdbb2;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #fbf1c7 #a89984 #a89984 #fbf1c7;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery,
|
|
||||||
#battery.charging,
|
|
||||||
#battery.plugged {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
}
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#temperature,
|
|
||||||
#backlight {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
|
|
||||||
color: #282828;
|
|
||||||
}
|
|
||||||
|
|
||||||
#disk,
|
|
||||||
#custom-diskBackup {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network,
|
|
||||||
#bluetooth,
|
|
||||||
#pulseaudio {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
|
|
||||||
/* background-color: #c0c0c0; */
|
|
||||||
/* border: 2px solid; /1* Base border *1/ */
|
|
||||||
/* border-color: #ffffff #808080 #808080 #ffffff; */
|
|
||||||
/* color: #282828; */
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent,
|
|
||||||
#temperature.critical,
|
|
||||||
#network.disconnected,
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
color: #ebdbb2;
|
|
||||||
background-color: #cc241d;
|
|
||||||
border-color: #fb4924 #9d0006 #9d0006 #fb4924;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-wakatime {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.active {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #ebdbb2;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #fbf1c7 #a89984 #a89984 #fbf1c7;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-timewarrior.active {
|
|
||||||
color: #282828;
|
|
||||||
background-color: #98971a;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #b8bb27 #79740e #79740e #b8bb27;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-timewarrior {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Specific module styles */
|
|
||||||
|
|
||||||
#custom-os {
|
|
||||||
margin: 5px 15px 5px 5px;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 0 12px 0 5px;
|
|
||||||
/* padding-right: 14px; */
|
|
||||||
color: #282828;
|
|
||||||
background-color: #a89984;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #ebdbb2 #665c54 #665c54 #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-notification {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-timewarrior {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-timewarrior,
|
|
||||||
#custom-notification,
|
|
||||||
#custom-lock,
|
|
||||||
#custom-shutdown,
|
|
||||||
#custom-restart,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#custom-logout {
|
|
||||||
background-color: #665c54;
|
|
||||||
border: 2px solid; /* Base border */
|
|
||||||
border-color: #928374 #282828 #282828 #928374;
|
|
||||||
color: #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|