This commit is contained in:
Matthieu Fortin (CPC/CCP) 2024-11-07 13:38:55 -05:00
parent 18dc031492
commit fc96f1ddc0
6 changed files with 211 additions and 25 deletions

View file

@ -443,5 +443,5 @@ export PATH=$PATH:"$HOME/.local/bin:/var/lib/flatpak/exports/bin:$HOME/.local/sh
# Install Starship - curl -sS https://starship.rs/install.sh | sh
eval "$(starship init bash)"
#eval "$(oh-my-posh init bash --config "~/.cache/oh-my-posh/themes/catppuccin_mocha.omp.json")"
#eval "$(oh-my-posh init bash --config "~/.cache/oh-my-posh/themes/catppuccin_macchiato.omp.json")"
eval "$(zoxide init bash)"

View file

@ -0,0 +1,142 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"display": {
"separator": " : "
},
"logo": {
"source": "~/Pictures/profile_icon.png",
"type": "kitty",
"height": 18,
"padding": {
"top": 2
}
},
"modules": [
{
"type": "custom",
"format": " \u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m "
},
{
"type": "custom",
"format": ""
},
{
"type": "custom",
"format": "  We thirst for the seven wailings. "
},
{
"type": "custom",
"format": " We bear the koan of Jericho. "
},
{
"type": "custom",
"format": ""
},
{
"type": "host",
"key": "  PC",
"keyColor": "magenta"
},
{
"type": "os",
"key": "  OS",
"keyColor": "blue"
},
{
"type": "kernel",
"key": "  Kernel",
"keyColor": "green"
},
{
"type": "packages",
"key": " 󰏗 Packages",
"keyColor": "34"
},
{
"type": "display",
"key": " 󱍜 Display",
"keyColor": "38;5;208"
},
{
"type": "wm",
"key": "  WM",
"keyColor": "38;5;81"
},
{
"type": "terminal",
"key": "  Terminal",
"keyColor": "38;5;81"
},
{
"type": "media",
"key": " 󰝚 Music",
"keyColor": "34"
},
{
"type": "command",
"key": " 󱦟 OS Age ",
"keyColor": "31",
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days"
},
{
"type": "uptime",
"key": " ",
"keyColor": "34"
},
{
"type": "custom",
"format": " 󰊤 GitHub : yurihikari",
"keyColor": "\u001b[38;5;75m"
},
{
"type": "battery",
"key": "  Battery",
"keyColor": "38;5;228" // Light Yellow
},
"break",
{
"type": "title",
"key": "  User",
"keyColor": "38;5;250" // Black
},
{
"type": "custom",
"format": ""
},
{
"type": "cpu",
"format": "{1}",
"key": "  CPU",
"keyColor": "38;5;118" // Bright Green
},
{
"type": "gpu",
"format": "{2}",
"key": "  GPU",
"keyColor": "38;5;220" // Yellow
},
{
"type": "gpu",
"format": "{3}",
"key": "  GPU Driver",
"keyColor": "38;5;27" // Cyan
},
{
"type": "memory",
"key": "  Memory",
"keyColor": "38;5;99" // Pinkish Purple
},
{
"type": "custom",
"format": ""
},
"break",
{
"type": "custom",
"format": " \u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m "
},
"break"
]
}

View file

@ -0,0 +1,33 @@
#!/bin/bash
timeout=0
handle() {
case $1 in
windowtitle*)
# Extract the window ID from the line
window_id=${1#*>>}
# Fetch the list of windows and parse it using jq to find the window by its decimal ID
window_info=$(hyprctl clients -j | jq --arg id "0x$window_id" '.[] | select(.address == ($id))')
# Extract the title from the window info
window_title=$(echo "$window_info" | jq -r '.title')
# Check if the title matches the characteristics of the Bitwarden popup window
if [[ "$window_title" == *"(Bitwarden"*"Password Manager) - Bitwarden"* ]]; then
# in case of double rename only allow once per second
if ((SECONDS < timeout)); then
return
fi
timeout=$((SECONDS + 1))
# echo "$window_id", "$window_title"
hyprctl --batch "dispatch togglefloating address:0x$window_id; dispatch resizewindowpixel exact 20% 54%,address:0x$window_id; dispatch centerwindow"
fi
;;
esac
}
# Listen to the Hyprland socket for events and process each line with the handle function
socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock | while read -r line; do handle "$line"; done

View file

@ -30,11 +30,12 @@ $colorPicker = hyprpicker
exec-once=wl-paste --type text --watch cliphist store # clipboard
exec-once=wl-paste --type image --watch cliphist store
exec-once=swaync
#exec-once=/usr/lib/polkit-kde-authentication-agent-1
exec-once=/usr/lib/polkit-kde-authentication-agent-1
#exec-once=/usr/lib/xfce-polkit/xfce-polkit
exec-once = systemctl --user start hyprpolkitagent
#exec-once = systemctl --user start hyprpolkitagent
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=hyprpaper
exec-once=~/.local/bin/hyprpaperchanger
exec-once=hypridle
exec-once=waybar
exec-once=./xdg-desktop-portal.sh
@ -315,6 +316,10 @@ windowrulev2 = pin, title:(Picture-in-Picture)
windowrule = float,^(jome)$
# Fix Bitwarden Window
windowrulev2 = suppressevent maximize, class:^(firefox)$
exec-once = ./hyprland-bitwarden-resize.sh
layerrule = ignorezero,wofi
layerrule = ignorezero,swaync
layerrule = blur,swaync

View file

@ -5,9 +5,9 @@
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"height": 0,
"height": 40,
"modules-left": [
"clock",
"custom/launcher",
"hyprland/workspaces"
],
"modules-center": ["hyprland/window"],
@ -21,9 +21,9 @@
// "backlight",
"idle_inhibitor",
"pulseaudio",
"pulseaudio#microphone"
// "wireplumber",
// "wireplumber#microphone"
"pulseaudio#microphone",
"clock",
"custom/power",
],
"custom/updates": {
@ -37,17 +37,6 @@
"exec": "waybar-module-pacman-updates --interval-seconds 5 --network-interval-seconds 300"
},
// "format": "{icon}{}",
// "return-type": "json",
// "format-icons": {
// "pending-updates": " ",
// "updated": " ",
// },
// "exec-if": "which waybar-updates",
// "exec": "waybar-updates"
// },
"hyprland/window": {
"format": "󰣇 {}"
},
@ -55,17 +44,16 @@
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"on-click": "activate"
//"format": "{icon}",
"on-click": "activate",
// "format": "{icon}",
},
"tray": {
"icon-size": 13,
"icon-size": 24,
"spacing": 10
},
"clock": {
//"format": "{:%A  %Y-%m-%d  %H:%M:%S %p}",
"format": " {:%H:%M}",
"format-alt": " {:%Y-%m-%d  %H:%M}",
"interval": 1,
@ -191,5 +179,16 @@
"tooltip-format-disconnected": "Disconnected",
"format-alt": "<span foreground='#99ffdd'> {bandwidthDownBytes}</span> <span foreground='#ffcc66'> {bandwidthUpBytes}</span>",
"interval": 2
}
},
"custom/launcher": {
"format": " ",
"on-click": "exec nwg-drawer -c 7 -is 96 -spacing 24",
"tooltip": false
},
"custom/power": {
"format": "⏻",
"on-click": "nwgbar",
"tooltip": false
},
}

View file

@ -51,6 +51,7 @@ window#waybar {
#workspaces,
#tray,
#custom-updates,
#custom-launcher,
#backlight {
background: #1e1e2e;
padding: 0px 10px;
@ -63,6 +64,10 @@ window#waybar {
border-radius: 10px 0px 0px 10px;
}
#custom-launcher {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
#tray {
border-radius: 10px;
margin-right: 10px;
@ -93,7 +98,9 @@ window#waybar {
#clock {
color: #a6adc8;
border-radius: 10px 10px 10px 10px;
/*border-radius: 10px 10px 10px 10px;*/
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
margin-left: 5px;
border-right: 0px;
}