commit 830d8f02f9f1089c885940af6e65ac3412dff00d Author: Didictateur Date: Wed May 13 21:05:39 2026 +0200 init commit diff --git a/config b/config new file mode 100644 index 0000000..57ac116 --- /dev/null +++ b/config @@ -0,0 +1,67 @@ +Host Ersa + HostName didictateur.duckdns.org + User droidian + Port 25025 + +Host ens + SetEnv TERM=xterm + HostName ssh.eleves.ens-rennes.fr + User adeco866 + Port 22022 + +Host Io + HostName cosmoris.duckdns.org + User io + Port 24024 + +Host Europa + HostName cosmoris.fr + User ubuntu + Port 22 + +Host github + HostName github.com + User git + IdentityFile ~/.ssh/id_ed25519 + +Host github-aur + HostName aur.archlinux.org + User aur + IdentityFile ~/.ssh/id_aur + +Host github-uga + HostName github.com + User git + IdentityFile ~/.ssh/id_rsa + +Host github-pro + HostName github.com + User git + IdentityFile ~/.ssh/id_cosmoris + +Host gitlab-uga + HostName im2ag-gitlab.univ-grenoble-alpes.fr + User git + IdentityFile ~/.ssh/id_gitlab_uga + Port 2222 + +Host oracle + SetEnv TERM=xterm + HostName im2ag-tpora-08.u-ga.fr + User oracle + +Host ssh-gra.inria.fr + User adecosse + IdentityFile ~/.ssh/id_inria + +Host paon + HostName paon + User adecosse + ProxyJump adecosse@ssh-gra.inria.fr + IdentityFile ~/.ssh/id_inria + +Host verseau + HostName verseau + User adecosse + ProxyJump adecosse@ssh-gra.inria.fr + IdentityFile ~/.ssh/id_inria diff --git a/foot/foot.ini b/foot/foot.ini new file mode 100644 index 0000000..eb448f3 --- /dev/null +++ b/foot/foot.ini @@ -0,0 +1,11 @@ +font=JetBrainsMono Nerd Font:size=15 +# font=FiraCode:size=15,Noto Sans CJK SC,Noto Color Emoji +# font=mono-space:size=15 +# font=minecraft:size=12 + +[tweak] +font-monospace-warn=no + +[colors-dark] +alpha=0.4 +background=2d0c24 diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf new file mode 100644 index 0000000..5b3ea1a --- /dev/null +++ b/hypr/hypridle.conf @@ -0,0 +1,34 @@ +general { + lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. + before_sleep_cmd = hyprlock # lock before suspend. + after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. +} + +listener { + timeout = 300 # 5min. + on-timeout = brightnessctl -s set 5 # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = brightnessctl -r # monitor backlight restore. +} + +# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight. +listener { + timeout = 300 # 5min. + on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. + on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. +} + +listener { + timeout = 600 # 10min + on-timeout = hyprlock # lock screen when timeout has passed +} + +listener { + timeout = 630 # 10.5min + on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed + on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected after timeout has fired. +} + +#listener { +# timeout = 900 # 15min +# on-timeout = loginctl suspend # suspend pc +#} diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf new file mode 100644 index 0000000..f9cd3fb --- /dev/null +++ b/hypr/hyprland.conf @@ -0,0 +1,356 @@ +# This is an example Hyprland config file. +# Refer to the wiki for more information. +# https://wiki.hypr.land/Configuring/ + +# Please note not all available settings / options are set here. +# For a full list, see the wiki + +# You can split this configuration into multiple files +# Create your files separately and then link them to this file like this: +# source = ~/.config/hypr/myColors.conf + + +################ +### MONITORS ### +################ + +# See https://wiki.hypr.land/Configuring/Monitors/ +monitor=,preferred,auto,1 + + +################### +### MY PROGRAMS ### +################### + +$fileManager = thunar +$terminal = foot +$menu = fuzzel +$browser = firefox + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +# exec-once = $terminal +# exec-once = nm-applet & +exec-once = hyprpaper +exec-once = yambar +exec-once = hypridle +exec-once = swaync +exec-once = udiskie --automount --notify + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hypr.land/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 + + +################### +### PERMISSIONS ### +################### + +# See https://wiki.hypr.land/Configuring/Permissions/ +# Please note permission changes here require a Hyprland restart and are not applied on-the-fly +# for security reasons + +# ecosystem { +# enforce_permissions = 1 +# } + +# permission = /usr/(bin|local/bin)/grim, screencopy, allow +# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow +# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hypr.land/Configuring/Variables/ + +# https://wiki.hypr.land/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 20 + + border_size = 2 + + # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors + col.active_border = rgba(ee44eeee) rgba(33ccffee) 45deg + col.inactive_border = rgba(595959aa) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = true + + # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hypr.land/Configuring/Variables/#decoration +decoration { + rounding = 10 + rounding_power = 2 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 1.0 + + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(1a1a1aee) + } + + # https://wiki.hypr.land/Configuring/Variables/#blur + blur { + enabled = true + size = 3 + passes = 1 + + vibrancy = 0.1696 + } +} + +# https://wiki.hypr.land/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves + # NAME, X0, Y0, X1, Y1 + bezier = easeOutQuint, 0.23, 1, 0.32, 1 + bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 + bezier = linear, 0, 0, 1, 1 + bezier = almostLinear, 0.5, 0.5, 0.75, 1 + bezier = quick, 0.15, 0, 0.1, 1 + + # Default animations, see https://wiki.hypr.land/Configuring/Animations/ + # NAME, ONOFF, SPEED, CURVE, [STYLE] + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + animation = zoomFactor, 1, 7, quick +} + +# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/ +# "Smart gaps" / "No gaps when only" +# uncomment all if you wish to use that. +# workspace = w[tv1], gapsout:0, gapsin:0 +# workspace = f[1], gapsout:0, gapsin:0 +# windowrule { +# name = no-gaps-wtv1 +# match:float = false +# match:workspace = w[tv1] +# +# border_size = 0 +# rounding = 0 +# } +# +# windowrule { +# name = no-gaps-f1 +# match:float = false +# match:workspace = f[1] +# +# border_size = 0 +# rounding = 0 +# } + +# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hypr.land/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hypr.land/Configuring/Variables/#misc +misc { + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( +} + +############# +### INPUT ### +############# + +# https://wiki.hypr.land/Configuring/Variables/#input +input { + kb_layout = fr + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = true + } + + numlock_by_default = true +} + +# See https://wiki.hypr.land/Configuring/Gestures +gesture = 3, horizontal, workspace + +# Example per-device config +# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more +bind = $mainMod, Return, exec, $terminal +bind = $mainMod, Q, killactive, +bind = $mainMod, X, exec, command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, T, exec, typora +bind = $mainMod, V, togglefloating, +bind = $mainMod, R, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, Backspace, exec, hyprlock +# bind = $mainMod, S, togglesplit, # dwindle +bind = $mainMod, D, exec, discord +bind = $mainMod, F, exec, $browser +bind = $mainMod, C, exec, code +bind = $mainMod, O, exec, obsidian +bind = $mainMod, L, exec, libreoffice +bind = $mainMod, A, fullscreen +bind = ,code:107, exec, command hyprshot -o ~/images/screenshot -m window +bind = $mainMod, code:107, exec, command hyprshot -o ~/images/screenshot -m region + +# Move focus with mainMod + arrow keys +bind = $mainMod, H, movefocus, l +bind = $mainMod, L, movefocus, r +bind = $mainMod, K, movefocus, u +bind = $mainMod, J, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, code:87, workspace, 2 # 1 +bind = $mainMod, code:88, workspace, 3 # 2 +bind = $mainMod, code:89, workspace, 4 # 3 +bind = $mainMod, code:83, workspace, 5 # 4 +bind = $mainMod, code:84, workspace, 6 # 5 +bind = $mainMod, code:85, workspace, 7 # 6 +bind = $mainMod, code:79, workspace, 8 # 7 +bind = $mainMod, code:80, workspace, 9 # 8 +bind = $mainMod, code:81, workspace, 10 # 9 +bind = $mainMod, code:90, workspace, 1 # 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, code:87, movetoworkspace, 2 # 1 +bind = $mainMod SHIFT, code:88, movetoworkspace, 3 # 2 +bind = $mainMod SHIFT, code:89, movetoworkspace, 4 # 3 +bind = $mainMod SHIFT, code:83, movetoworkspace, 5 # 4 +bind = $mainMod SHIFT, code:84, movetoworkspace, 6 # 5 +bind = $mainMod SHIFT, code:85, movetoworkspace, 7 # 6 +bind = $mainMod SHIFT, code:79, movetoworkspace, 8 # 7 +bind = $mainMod SHIFT, code:80, movetoworkspace, 9 # 8 +bind = $mainMod SHIFT, code:81, movetoworkspace, 10 # 9 +bind = $mainMod SHIFT, code:90, movetoworkspace, 1 # 10 + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- + +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hypr.land/Configuring/Window-Rules/ for more +# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrules that are useful + +windowrule { + # Ignore maximize requests from all apps. You'll probably like this. + name = suppress-maximize-events + match:class = .* + + suppress_event = maximize +} + +windowrule { + # Fix some dragging issues with XWayland + name = fix-xwayland-drags + match:class = ^$ + match:title = ^$ + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + + no_focus = true +} + +xwayland { + force_zero_scaling = true +} + +# Hyprland-run windowrule +windowrule { + name = move-hyprland-run + + match:class = hyprland-run + + move = 20 monitor_h-120 + float = yes +} diff --git a/hypr/hyprlauncher.conf b/hypr/hyprlauncher.conf new file mode 100644 index 0000000..2fdcfbd --- /dev/null +++ b/hypr/hyprlauncher.conf @@ -0,0 +1,34 @@ +general { + grab_focus = true + hide_on_lost_focus = true +} + +cache { + enabled = true + path = ~/.cache/hyprlauncher +} + +finders { + default_finder = desktop + desktop_prefix = + unicode_prefix = : # ":" pour emojis (plus intuitif que ".") + math_prefix = = # Calculatrice + font_prefix = ' + desktop_launch_prefix = + desktop_icons = true + fuzzy = true # Recherche floue pour tes scripts/custom apps +} + +ui { + window_size = 550 380 # Plus grand que default (400 260) + font = "JetBrainsMono Nerd Font:13" # Parfait pour ton style terminal + rounding = 12 # Coins arrondis + blur = 8 # Si tu as blur dans Hyprland + + # Thème sombre cohérent avec Hyprland + col.active = rgba(59d2ffdd) rgba(00ff88dd) 45deg + col.inactive = rgba(404040aa) rgba(1a1a1aee) 45deg + col.text = rgba(ffffffff) + col.text-alt = rgba(ccccccff) +} + diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf new file mode 100644 index 0000000..46916ec --- /dev/null +++ b/hypr/hyprlock.conf @@ -0,0 +1,105 @@ +# sample hyprlock.conf +# for more configuration options, refer https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock +# +# rendered text in all widgets supports pango markup (e.g. or tags) +# ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#general-remarks +# +# shortcuts to clear password buffer: ESC, Ctrl+U, Ctrl+Backspace +# +# you can get started by copying this config to ~/.config/hypr/hyprlock.conf +# + +$font = Monospace + +general { + hide_cursor = false +} + +# uncomment to enable fingerprint authentication +# auth { +# fingerprint { +# enabled = true +# ready_message = Scan fingerprint to unlock +# present_message = Scanning... +# retry_delay = 250 # in milliseconds +# } +# } + +animations { + enabled = true + bezier = linear, 1, 1, 0, 0 + animation = fadeIn, 1, 5, linear + animation = fadeOut, 1, 5, linear + animation = inputFieldDots, 1, 2, linear +} + +background { + monitor = + path = ~/.config/hypr/wallpaper/moon.jpg +} + +input-field { + monitor = + size = 20%, 5% + outline_thickness = 3 + inner_color = rgba(0, 0, 0, 0.0) # no fill + + outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg + check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg + fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg + + font_color = rgb(143, 143, 143) + fade_on_empty = false + rounding = 15 + + font_family = $font + placeholder_text = Input password... + fail_text = $PAMFAIL + + # uncomment to use a letter instead of a dot to indicate the typed password + # dots_text_format = * + # dots_size = 0.4 + dots_spacing = 0.3 + + # uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator) + hide_input = true + + position = 0, -20 + halign = center + valign = center +} + +# TIME +label { + monitor = + text = $TIME # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution + font_size = 90 + font_family = $font + + position = -30, 0 + halign = right + valign = top +} + +# DATE +label { + monitor = + text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds + font_size = 25 + font_family = $font + + position = -30, -150 + halign = right + valign = top +} + +label { + monitor = + text = + font_size = 24 + onclick = hyprctl switchxkblayout all next + + position = 250, -20 + halign = center + valign = center +} diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf new file mode 100644 index 0000000..9b73e6d --- /dev/null +++ b/hypr/hyprpaper.conf @@ -0,0 +1,6 @@ +wallpaper { + monitor = eDP-1 + path = /home/pluto/.config/hypr/wallpaper/space.jpeg + fit_mode = cover +} +splash = false diff --git a/hypr/wallpaper/moon.jpg b/hypr/wallpaper/moon.jpg new file mode 100644 index 0000000..ebc822e Binary files /dev/null and b/hypr/wallpaper/moon.jpg differ diff --git a/hypr/wallpaper/pluto.jpg b/hypr/wallpaper/pluto.jpg new file mode 100644 index 0000000..a06f701 Binary files /dev/null and b/hypr/wallpaper/pluto.jpg differ diff --git a/hypr/wallpaper/space.jpeg b/hypr/wallpaper/space.jpeg new file mode 100644 index 0000000..4bd551c Binary files /dev/null and b/hypr/wallpaper/space.jpeg differ diff --git a/nvim b/nvim new file mode 160000 index 0000000..652e95b --- /dev/null +++ b/nvim @@ -0,0 +1 @@ +Subproject commit 652e95b4c17c4737ef6a214fbe4473e29342da9a diff --git a/waybar/config b/waybar/config new file mode 100644 index 0000000..0d333ff --- /dev/null +++ b/waybar/config @@ -0,0 +1,15 @@ +{ + "layer": "top", + "position": "bottom", + "height": 30, + "modules-left": [], + "modules-center": ["custom/civilization"], + "modules-right": [], + "custom/civilization": { + "format": "{}", + "exec": "python3 /home/pluto/Desktop/miniciv.py", + "return-type": "json", + "interval": 5 + } +} + diff --git a/waybar/style.css b/waybar/style.css new file mode 100644 index 0000000..9005fd2 --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,23 @@ +/* Style pour toute la barre Waybar */ +window#waybar { + background-image: linear-gradient(to top, rgba(0, 0, 255, 0.7), rgba(138, 43, 226, 0.7)); +} + +/* Style spécifique pour le module custom-civilization */ +#custom-civilization { + color: white; + padding: 0 10px; + /* Rendre le fond transparent pour laisser voir le dégradé */ + background-color: transparent; +} + +/* Style pour tous les modules pour assurer la lisibilité */ +.modules-left, +.modules-center, +.modules-right { + background-color: rgba(0, 0, 0, 0); + border-radius: 10px; + margin: 5px; + padding: 2px 10px; +} + diff --git a/yambar/config.yml b/yambar/config.yml new file mode 100644 index 0000000..becf731 --- /dev/null +++ b/yambar/config.yml @@ -0,0 +1,199 @@ +# Typical laptop setup, with wifi, brightness, battery etc, for +# i3/Sway. + +# For X11/i3, you'll want to replace calls to swaymsg with i3-msg, and +# the sway-xkb module with the xkb module. + +# fonts we'll be re-using here and there +awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=14 +awesome_brands: &awesome_brands Font Awesome 6 Brands:pixelsize=16 + +std_underline: &std_underline {underline: { size: 2, color: ff0000ff}} + +# This is THE bar configuration +bar: + height: 26 + location: top + spacing: 5 + margin: 7 + + # Default font + font: Adobe Helvetica:pixelsize=12 + + foreground: ffffffff + background: 9636C088 + + border: + width: 1 + color: 999999cc + + margin: 5 + top-margin: 0 + + left: + - script: + path: ~/.config/yambar/scripts/hyprland_ws.sh + args: [] + content: + {string: {text: "WorkSpace: {ws}"}} + #- foreign-toplevel: + #content: + #map: + #conditions: + #~activated: {empty: {}} + #activated: + #- string: {text: "{app-id}", foreground: ffa0a0ff} + #- string: {text: ": {title}"} + center: + - mpd: + host: /run/mpd/socket + anchors: + list: &artist_album_title + spacing: 0 + items: + - map: + conditions: + state == playing: {string: {text: "{artist}"}} + state == paused: {string: {text: "{artist}", foreground: ffffff66}} + - string: {text: " | ", foreground: ffffff66} + - map: + conditions: + state == playing: {string: {text: "{album}"}} + state == paused: {string: {text: "{album}", foreground: ffffff66}} + - string: {text: " | ", foreground: ffffff66} + - map: + conditions: + state == playing: {string: {text: "{title}", foreground: ffa0a0ff}} + state == paused: {string: {text: "{title}", foreground: ffffff66}} + + content: + map: + margin: 10 + conditions: + state == stopped: {string: {text: stopped}} + state == paused: {list: *artist_album_title} + state == playing: {list: *artist_album_title} + + right: + - removables: + anchors: + drive: &drive { text: "💿", font: *awesome} + optical: &optical {text: "💿", font: *awesome} + spacing: 5 + content: + map: + conditions: + ~mounted: + map: + on-click: udisksctl mount -b {device} + conditions: + ~optical: [{string: *drive}, {string: {text: "{label}"}}] + optical: [{string: *optical}, {string: {text: "{label}"}}] + mounted: + map: + on-click: udisksctl unmount -b {device} + conditions: + ~optical: + - string: {<<: *drive, deco: *std_underline} + - string: {text: "{label}"} + optical: + - string: {<<: *optical, deco: *std_underline} + - string: {text: "{label}"} + # - sway-xkb: + # identifiers: [1:1:AT_Translated_Set_2_keyboard] + # content: + # - string: {text: "", font: *awesome} + # - string: {text: "{layout}"} + - network: + content: + map: + default: + string: {text: "🛜 {ssid} ({quality}%) {signal}dBm"} + conditions: + name == "eno1" && name == "Io": # || name == "lo": + string: {text: ""} + ipv4 == "": + string: {text: "{name}: {state} {ssid}"} + - alsa: + card: hw:PCH + mixer: Master + content: + map: + conditions: + ~online: {string: {text: "", font: *awesome, foreground: ff0000ff}} + online: + map: + on-click: /bin/sh -c "amixer -q sset Speaker unmute && amixer -q sset Headphone unmute && amixer -q sset Master toggle" + conditions: + muted: {string: {text: "🔇", font: *awesome, foreground: ffffff66}} + ~muted: + ramp: + tag: percent + items: + - string: {text: "🔈", font: *awesome} + - string: {text: "🔉", font: *awesome} + - string: {text: "🔊", font: *awesome} + - battery: + name: BAT0 + poll-interval: 30000 + anchors: + discharging: &discharging + list: + items: + - ramp: + tag: capacity + items: + - string: {text: "", foreground: ff0000ff, font: *awesome} + - string: {text: "", foreground: ffa600ff, font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "🔋{capacity}% {state} {estimate}"} + content: + map: + conditions: + state == unknown: + <<: *discharging + state == discharging: + <<: *discharging + state == charging: + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}% {estimate}"} + state == full: + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}% full"} + state == "not charging": + - ramp: + tag: capacity + items: + - string: {text: "", foreground: ff0000ff, font: *awesome} + - string: {text: "", foreground: ffa600ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}%"} + - clock: + time-format: "%H:%M:%S" + date-format: "%d/%m/%Y" + content: + - string: {text: "📅", font: *awesome} + - string: {text: "{date}", right-margin: 5} + - string: {text: "🕓", font: *awesome} + - string: {text: "{time}"} + - label: + content: + string: + on-click: systemctl poweroff + text: "♇" + font: *awesome + diff --git a/yambar/config.yml.save b/yambar/config.yml.save new file mode 100644 index 0000000..7eb4147 --- /dev/null +++ b/yambar/config.yml.save @@ -0,0 +1,277 @@ +# Typical laptop setup, with wifi, brightness, battery etc, for +# i3/Sway. + +# For X11/i3, you'll want to replace calls to swaymsg with i3-msg, and +# the sway-xkb module with the xkb module. + +# fonts we'll be re-using here and there +awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=14 +awesome_brands: &awesome_brands Font Awesome 6 Brands:pixelsize=16 + +std_underline: &std_underline {underline: { size: 2, color: ff0000ff}} + +sensor: + - platform: template + sensors: + network_download_speed: + friendly_name: "Download Speed" + value_template: "{{ states('sensor.speedtest_download') }}" + unit_of_measurement: "Mbps" + network_upload_speed: + friendly_name: "Upload Speed" + value_template: "{{ states('sensor.speedtest_upload') }}" + unit_of_measurement: "Mbps" + +# This is THE bar configuration +bar: + height: 26 + location: top + spacing: 5 + margin: 7 + + # Default font + font: Adobe Helvetica:pixelsize=12 + + foreground: ffffffff + background: 9636C088 + + border: + width: 1 + color: 999999cc + + margin: 5 + top-margin: 0 + + left: + - i3: + anchors: # Not used (directly) by f00bar; used here to avoid duplication + - string: &i3_common {margin: 5, on-click: "swaymsg --quiet workspace {name}"} + - string: &default {<<: *i3_common, text: "? {name}", font: *awesome} + - string: &main {<<: *i3_common, text: "", font: *awesome} + - string: &surfing {<<: *i3_common, text: "", font: *awesome} + - string: &misc {<<: *i3_common, text: "", font: *awesome} + - string: &mail {<<: *i3_common, text: "", font: *awesome} + - string: &music {<<: *i3_common, text: "", font: *awesome} + - focused: &focused + deco: {stack: [background: {color: ffa0a04c}, <<: *std_underline]} + - invisible: &invisible {foreground: ffffff55} + - urgent: &urgent + foreground: 000000ff + deco: {stack: [background: {color: bc2b3fff}, <<: *std_underline]} + - map: &i3_mode + default: + - string: + margin: 5 + text: "{mode}" + deco: {background: {color: cc421dff}} + - empty: {right-margin: 7} + conditions: + mode == default: {empty: {}} + content: + "": + map: + conditions: + state == focused: {string: {<<: [*default, *focused]}} + state == unfocused: {string: {<<: *default}} + state == invisible: {string: {<<: [*default, *invisible]}} + state == urgent: {string: {<<: [*default, *urgent]}} + main: + map: + conditions: + state == focused: {string: {<<: [*main, *focused]}} + state == unfocused: {string: {<<: *main}} + state == invisible: {string: {<<: [*main, *invisible]}} + state == urgent: {string: {<<: [*main, *urgent]}} + surfing: + map: + conditions: + state == focused: {string: {<<: [*surfing, *focused]}} + state == unfocused: {string: {<<: *surfing}} + state == invisible: {string: {<<: [*surfing, *invisible]}} + state == urgent: {string: {<<: [*surfing, *urgent]}} + misc: + map: + conditions: + state == focused: {string: {<<: [*misc, *focused]}} + state == unfocused: {string: {<<: *misc}} + state == invisible: {string: {<<: [*misc, *invisible]}} + state == urgent: {string: {<<: [*misc, *urgent]}} + + mail: + map: + conditions: + state == focused: {string: {<<: [*mail, *focused]}} + state == unfocused: {string: {<<: *mail}} + state == invisible: {string: {<<: [*mail, *invisible]}} + state == urgent: {string: {<<: [*mail, *urgent]}} + music: + map: + conditions: + state == focused: {string: {<<: [*music, *focused]}} + state == unfocused: {string: {<<: *music}} + state == invisible: {string: {<<: [*music, *invisible]}} + state == urgent: {string: {<<: [*music, *urgent]}} + + - foreign-toplevel: + content: + map: + conditions: + ~activated: {empty: {}} + activated: + - string: {text: "{app-id}", foreground: ffa0a0ff} + - string: {text: ": {title}"} + center: + - mpd: + host: /run/mpd/socket + anchors: + list: &artist_album_title + spacing: 0 + items: + - map: + conditions: + state == playing: {string: {text: "{artist}"}} + state == paused: {string: {text: "{artist}", foreground: ffffff66}} + - string: {text: " | ", foreground: ffffff66} + - map: + conditions: + state == playing: {string: {text: "{album}"}} + state == paused: {string: {text: "{album}", foreground: ffffff66}} + - string: {text: " | ", foreground: ffffff66} + - map: + conditions: + state == playing: {string: {text: "{title}", foreground: ffa0a0ff}} + state == paused: {string: {text: "{title}", foreground: ffffff66}} + + content: + map: + margin: 10 + conditions: + state == stopped: {string: {text: stopped}} + state == paused: {list: *artist_album_title} + state == playing: {list: *artist_album_title} + + right: + - removables: + anchors: + drive: &drive { text: "", font: *awesome} + optical: &optical {text: "", font: *awesome} + spacing: 5 + content: + map: + conditions: + ~mounted: + map: + on-click: udisksctl mount -b {device} + conditions: + ~optical: [{string: *drive}, {string: {text: "{label}"}}] + optical: [{string: *optical}, {string: {text: "{label}"}}] + mounted: + map: + on-click: udisksctl unmount -b {device} + conditions: + ~optical: + - string: {<<: *drive, deco: *std_underline} + - string: {text: "{label}"} + optical: + - string: {<<: *optical, deco: *std_underline} + - string: {text: "{label}"} + - sway-xkb: + identifiers: [1:1:AT_Translated_Set_2_keyboard] + content: + - string: {text: "", font: *awesome} + - string: {text: "{layout}"} + - network: + content: + map: + default: + string: + text: > + {name} ({ipv4}) - {ssid} + ↓{{ states('sensor.network_download_speed') }} Mbps + ↑{{ states('sensor.network_upload_speed') }} Mbps + conditions: + ipv4 == "": + string: {text: "{name}: {state} - {ssid} ↓{download_speed} Mbps ↑{upload_speed} Mbps"} + - alsa: + card: hw:PCH + mixer: Master + content: + map: + conditions: + ~online: {string: {text: "", font: *awesome, foreground: ff0000ff}} + online: + map: + on-click: /bin/sh -c "amixer -q sset Speaker unmute && amixer -q sset Headphone unmute && amixer -q sset Master toggle" + conditions: + muted: {string: {text: "", font: *awesome, foreground: ffffff66}} + ~muted: + ramp: + tag: percent + items: + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - battery: + name: BAT0 + poll-interval: 30000 + anchors: + discharging: &discharging + list: + items: + - ramp: + tag: capacity + items: + - string: {text: "", foreground: ff0000ff, font: *awesome} + - string: {text: "", foreground: ffa600ff, font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}% {estimate}"} + content: + map: + conditions: + state == unknown: + <<: *discharging + state == discharging: + <<: *discharging + state == charging: + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}% {estimate}"} + state == full: + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}% full"} + state == "not charging": + - ramp: + tag: capacity + items: + - string: {text: "", foreground: ff0000ff, font: *awesome} + - string: {text: "", foreground: ffa600ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "", foreground: 00ff00ff, font: *awesome} + - string: {text: "{capacity}%"} + - clock: + time-format: "%H:%M:%S" + date-format: "%d/%m/%Y" + content: + - string: {text: "", font: *awesome} + - string: {text: "{date}", right-margin: 5} + - string: {text: "", font: *awesome} + - string: {text: "{time}"} + - label: + content: + string: + on-click: systemctl poweroff + text: "" + font: *awesome + diff --git a/yambar/scripts/hyprland_ws.sh b/yambar/scripts/hyprland_ws.sh new file mode 100755 index 0000000..ae9b291 --- /dev/null +++ b/yambar/scripts/hyprland_ws.sh @@ -0,0 +1,15 @@ +#!/bin/sh +while true; do + special=$(hyprctl monitors -j | jq -r '.[] | select(.name == "eDP-1") | .specialWorkspace.name // empty') + + if [ -n "$special"]; then + ws=$(hyprctl activeworkspace -j 2>/dev/null | jq -r '.id') + ws_display=$((ws - 1)) # ← SOUMI 1 pour index 0-based + echo "ws|string|$ws_display" + echo "" + else + echo "ws|string|🌌" + echo "" + fi + sleep 0.25 +done