diff --git a/waybar/config.jsonc b/waybar/config.jsonc index f005c05..fae05d8 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -17,15 +17,16 @@ "height": 30, "position": "bottom", - "modules-left": ["custom/menu", "sway/workspaces", "custom/scratchpad"], + "modules-left": ["custom/menu", "sway/workspaces", "custom/scratchpad", "custom/watson" ], "modules-center": [ "custom/wf-recorder", "sway/mode", - "custom/weather", - "sway/window" + // "sway/window", + "custom/uair" ], "modules-right": [ // informational + "custom/weather", "sway/language", "custom/github", "custom/clipboard", @@ -44,10 +45,10 @@ "custom/idle_inhibitor", "custom/dnd", "pulseaudio", - "backlight", + // "backlight", // system - // "custom/adaptive-light", + "custom/adaptive-light", // "custom/sunset", "custom/pacman", @@ -284,7 +285,8 @@ // accepts -c/--city -t/--temperature -d/--distance "exec": "/usr/share/sway/scripts/weather.py", "return-type": "json", - "on-click": "xdg-open \"https://wttr.in/$(curl -s https://manjaro-sway.download/geoip | jq -r '.city')\"", + // "on-click": "xdg-open \"https://wttr.in/$(curl -s https://manjaro-sway.download/geoip | jq -r '.city')\"", + "on-click": "xdg-open \"https://wttr.in/Chateldon", "on-click-right": "waybar-signal weather", "signal": 16 }, @@ -363,5 +365,40 @@ "on-click": "inhibit-idle off; inhibit-idle interactive", "on-click-middle": "inhibit-idle off", "signal": 15 + }, + + "custom/uair": { + // "format": "{icon} {percentage}", + "format": "{icon} {text}", + "format-icons": [ + "○○○○○○○○○●", + "○○○○○○○○●●", + "○○○○○○○●●●", + "○○○○○○●●●●", + "○○○○○●●●●●", + "○○○○●●●●●●", + "○○○●●●●●●●", + "○○●●●●●●●●", + "○●●●●●●●●●", + "●●●●●●●●●●" + ], + "tooltip": false, + "return-type": "json", + "interval": 5, + "on-click": "uairctl toggle", + "on-click-middle": "uairctl prev", + "on-click-right": "uairctl next", + "exec-if": "pidof uair", + "exec": "uairctl fetch '{\"text\":\"{name}\",\"class\":\"{state}\",\"percentage\":{percent}}'" + // "exec": "uairctl fetch '{\"text\":\"{name} {time} {percent}%\",\"name\":\"{name}\",\"class\":\"{state}\",\"percentage\":{percent}}'" + + }, + + "custom/watson": { + "format": "{text}", + "return-type": "json", + "interval": 10, + "exec": "/home/krichtof/src/watson/waybar-watson.py" + } } diff --git a/waybar/draft b/waybar/draft new file mode 100644 index 0000000..6fdbfd7 --- /dev/null +++ b/waybar/draft @@ -0,0 +1,9 @@ +A mon tour de vous remercier pour votre réponse enthousiasmante. +Comme indiqué dans la présentation que je vous ai partagée, je suis dans la phase où j'interroge plusieurs profils pour définir plus précisément le problème que je souhaite adresser (plutôt que développer mon projet en chambre) +J'ai effectué quelques entretiens avec des personnes sujettes à des troubles de l'humeur. Je compte en faire également avec des aidants, ainsi qu'avec des professionnels de santé. + +Y aurait-il des personnes de votre équipe qui seraient d'accord pour répondre à mes questions ? + +Au plaisir de vous lire, + +Christophe Robillard diff --git a/waybar/gh.json b/waybar/gh.json new file mode 100644 index 0000000..f08d37c --- /dev/null +++ b/waybar/gh.json @@ -0,0 +1 @@ +[{"id":"14162029438","unread":true,"reason":"mention","updated_at":"2025-02-19T10:21:05Z","last_read_at":"2025-02-10T11:36:01Z","subject":{"title":"ETQ instructeur, sur la liste des démarches, je peux accéder directement à une démarche via une dropdown","url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/pulls/11193","latest_comment_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/pulls/11193","type":"PullRequest"},"repository":{"id":44167674,"node_id":"MDEwOlJlcG9zaXRvcnk0NDE2NzY3NA==","name":"demarches-simplifiees.fr","full_name":"demarches-simplifiees/demarches-simplifiees.fr","private":false,"owner":{"login":"demarches-simplifiees","id":116638858,"node_id":"O_kgDOBvPEig","avatar_url":"https://avatars.githubusercontent.com/u/116638858?v=4","gravatar_id":"","url":"https://api.github.com/users/demarches-simplifiees","html_url":"https://github.com/demarches-simplifiees","followers_url":"https://api.github.com/users/demarches-simplifiees/followers","following_url":"https://api.github.com/users/demarches-simplifiees/following{/other_user}","gists_url":"https://api.github.com/users/demarches-simplifiees/gists{/gist_id}","starred_url":"https://api.github.com/users/demarches-simplifiees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demarches-simplifiees/subscriptions","organizations_url":"https://api.github.com/users/demarches-simplifiees/orgs","repos_url":"https://api.github.com/users/demarches-simplifiees/repos","events_url":"https://api.github.com/users/demarches-simplifiees/events{/privacy}","received_events_url":"https://api.github.com/users/demarches-simplifiees/received_events","type":"Organization","user_view_type":"public","site_admin":false},"html_url":"https://github.com/demarches-simplifiees/demarches-simplifiees.fr","description":"Dématérialiser et simplifier les démarches administratives ","fork":false,"url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr","forks_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/forks","keys_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/teams","hooks_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/hooks","issue_events_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/issues/events{/number}","events_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/events","assignees_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/assignees{/user}","branches_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/branches{/branch}","tags_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/tags","blobs_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/git/refs{/sha}","trees_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/statuses/{sha}","languages_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/languages","stargazers_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/stargazers","contributors_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/contributors","subscribers_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/subscribers","subscription_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/subscription","commits_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/commits{/sha}","git_commits_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/git/commits{/sha}","comments_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/comments{/number}","issue_comment_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/issues/comments{/number}","contents_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/contents/{+path}","compare_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/merges","archive_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/downloads","issues_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/issues{/number}","pulls_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/pulls{/number}","milestones_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/milestones{/number}","notifications_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/labels{/name}","releases_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/releases{/id}","deployments_url":"https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/deployments"},"url":"https://api.github.com/notifications/threads/14162029438","subscription_url":"https://api.github.com/notifications/threads/14162029438/subscription"}] \ No newline at end of file diff --git a/waybar/mocha.css b/waybar/mocha.css new file mode 100644 index 0000000..0eb6a82 --- /dev/null +++ b/waybar/mocha.css @@ -0,0 +1,26 @@ +@define-color rosewater #f5e0dc; +@define-color flamingo #f2cdcd; +@define-color pink #f5c2e7; +@define-color mauve #cba6f7; +@define-color red #f38ba8; +@define-color maroon #eba0ac; +@define-color peach #fab387; +@define-color yellow #f9e2af; +@define-color green #a6e3a1; +@define-color teal #94e2d5; +@define-color sky #89dceb; +@define-color sapphire #74c7ec; +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color text #cdd6f4; +@define-color subtext1 #bac2de; +@define-color subtext0 #a6adc8; +@define-color overlay2 #9399b2; +@define-color overlay1 #7f849c; +@define-color overlay0 #6c7086; +@define-color surface2 #585b70; +@define-color surface1 #45475a; +@define-color surface0 #313244; +@define-color base #1e1e2e; +@define-color mantle #181825; +@define-color crust #11111b; diff --git a/waybar/style.css b/waybar/style.css index cec8191..9719275 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1 +1,4 @@ -@import "/usr/share/sway/templates/waybar/style.css"; \ No newline at end of file +@import "/usr/share/sway/templates/waybar/style.css"; +#custom-uair.resumed { + color: #f87171; +} diff --git a/waybar/style_mocha.css b/waybar/style_mocha.css new file mode 100644 index 0000000..d31e4de --- /dev/null +++ b/waybar/style_mocha.css @@ -0,0 +1,217 @@ +@import "mocha.css"; +/* ============================================================================= + * + * Waybar configuration + * + * Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration + * + * =========================================================================== */ + +/* import css definitions for current theme */ + +/* ----------------------------------------------------------------------------- + * Keyframes + * -------------------------------------------------------------------------- */ + +@keyframes blink-warning { + 70% { + color: @wm_icon_bg; + } + + to { + color: @wm_icon_bg; + background-color: @warning_color; + } +} + +@keyframes blink-critical { + 70% { + color: @wm_icon_bg; + } + + to { + color: @wm_icon_bg; + background-color: @error_color; + } +} + +/* ----------------------------------------------------------------------------- + * Base styles + * -------------------------------------------------------------------------- */ + +/* Reset all styles */ +* { + border: none; + border-radius: 0; + min-height: 0; + margin: 0; + padding: 0; + font-family: "JetBrainsMono NF", "Roboto Mono", sans-serif; + color: @text; +} + +window#waybar { + /* you can also GTK3 CSS functions! */ + background-color: shade(@base, 0.9); + border: 2px solid alpha(@crust, 0.3); +} + + +/* Each module */ +#custom-pacman, +#custom-menu, +#custom-help, +#custom-scratchpad, +#custom-github, +#custom-clipboard, +#custom-zeit, +#custom-dnd, +#custom-valent, +#custom-idle_inhibitor, +#bluetooth, +#battery, +#clock, +#cpu, +#memory, +#mode, +#network, +#pulseaudio, +#temperature, +#backlight, +#language, +#custom-adaptive-light, +#custom-sunset, +#custom-playerctl, +#custom-weather, +#tray { + padding-left: 10px; + padding-right: 10px; +} + +/* ----------------------------------------------------------------------------- + * Module styles + * -------------------------------------------------------------------------- */ + +#custom-scratchpad, +#custom-menu, +#workspaces button.focused, +#clock { + color: @theme_bg_color; + background-color: @theme_selected_bg_color; +} + +#custom-zeit.tracking { + background-color: @warning_color; +} + +#battery { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#battery.warning { + color: @warning_color; +} + +#battery.critical { + color: @error_color; +} + +#battery.warning.discharging { + animation-name: blink-warning; + animation-duration: 3s; +} + +#battery.critical.discharging { + animation-name: blink-critical; + animation-duration: 2s; +} + +#clock { + font-weight: bold; +} + +#cpu.warning { + color: @warning_color; +} + +#cpu.critical { + color: @error_color; +} + +#custom-menu { + padding-left: 8px; + padding-right: 13px; +} + +#memory { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#memory.warning { + color: @warning_color; +} + +#memory.critical { + color: @error_color; + animation-name: blink-critical; + animation-duration: 2s; +} + +#mode { + background: @background_color; +} + +#network.disconnected { + color: @warning_color; +} + +#pulseaudio.muted { + color: @warning_color; +} + +#temperature.critical { + color: @error_color; +} + +#workspaces button { + border-top: 2px solid transparent; + /* To compensate for the top border and still have vertical centering */ + padding-bottom: 2px; + padding-left: 10px; + padding-right: 10px; + color: @theme_selected_bg_color; +} + +#workspaces button.focused { + border-color: @theme_selected_bg_color; +} + +#workspaces button.urgent { + border-color: @error_color; + color: @error_color; +} + +#workspaces button:hover { + color: @theme_bg_color; +} + +#custom-pacman { + color: @warning_color; +} + +#bluetooth.disabled { + color: @warning_color; +} + +#custom-wf-recorder { + color: @error_color; + padding-right: 10px; +} + +#custom-valent.dangerously-empty { + color: @warning_color; +} diff --git a/waybar/zeit.sh b/waybar/zeit.sh new file mode 100755 index 0000000..2f40351 --- /dev/null +++ b/waybar/zeit.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env sh +tracking=$(zeit tracking --no-colors) + +case $1'' in +'status') + text=$(echo "$tracking" | sed -z 's/\n/\\n/g' | grep -q 'tracking' && echo "tracking" || echo "stopped") + tooltip=$tracking'\r(zeit time tracker)' + echo "{\"text\":\"$text\",\"tooltip\":\"$tooltip\",\"class\":\"$text\",\"alt\":\"$text\"}" + ;; +'click') + if echo "$tracking" | grep -q 'tracking'; then + zeit finish + else + swaymsg exec \$zeit_list + fi + ;; +'light-status') + text=$(echo "$tracking" | sed -z 's/\n/\\n/g' | grep -q 'tracking' && echo "tracking" || echo "stopped") + echo "{\"text\":\"$tracking\",\"class\":\"$text\",\"alt\":\"$text\"}" + ;; +'track') + input=$(cat -) + task=$(echo $input | pcregrep -io1 '└── (.+) \[.+') + project=$(echo $input | pcregrep -io1 '.+\[(.+)\]') + + if [ "$task" = "" ] || [ "$project" = "" ]; then + notify-send "You did not select a task!" + exit 1 + fi + + zeit track -p "$project" -t "$task" + notify-send "Tracking $task in $project" + ;; +esac