diff --git a/hypr/.config/hypr/hyprland.conf b/hypr/.config/hypr/hyprland.conf new file mode 100644 index 0000000..c82d9b7 --- /dev/null +++ b/hypr/.config/hypr/hyprland.conf @@ -0,0 +1,193 @@ + +# ####################################################################################### +# AUTOGENERATED HYPR CONFIG. +# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, +# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +# +# Please note not all available settings / options are set here. +# For a full list, see the wiki +# + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,auto +monitor = DP-1, 1920x1080@144, auto, auto + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more + +# Execute your favorite apps at launch +# exec-once = waybar & hyprpaper & firefox +exec-once = waybar +exec-once = hyprpaper + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +# Set programs that you use +$terminal = kitty +$fileManager = nautilus +$menu = sh /home/pjark/.config/wofi/run.sh + +# Some default env vars. +env = XCURSOR_THEME,oreo_red +env = XCURSOR_SIZE,24 +env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that +env = WLR_NO_HARDWARE_CURSORS,1 + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = -0.1 # -1.0 to 1.0, 0 means no modification. + accel_profile = flat +} + + +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 6 + gaps_out = 14 + border_size = 4 + col.active_border = rgba(e78284ff) rgba(85c1dcff) rgba(ea999cff) rgba(ca9ee6ff) 45deg + col.inactive_border = rgba(1e1e2eff) + + layout = dwindle + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false +} + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + rounding = 10 + + blur { + enabled = true + size = 3 + passes = 1 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = true +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = off +} + +misc { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Q, exec, $terminal +bind = $mainMod, C, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, space, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, R, togglesplit, # dwindle + +# 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, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 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 diff --git a/hypr/.config/hypr/hyprpaper.conf b/hypr/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..74256f0 --- /dev/null +++ b/hypr/.config/hypr/hyprpaper.conf @@ -0,0 +1,3 @@ +preload = /home/pjark/.wallpapers/catppuccin_waves.png +wallpaper = , /home/pjark/.wallpapers/catppuccin_waves.png +splash = false diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf new file mode 100644 index 0000000..25d25cb --- /dev/null +++ b/kitty/.config/kitty/kitty.conf @@ -0,0 +1,90 @@ +# vim:ft=kitty + +shell zsh + + +# The basic colors +foreground #cdd6f4 +background #1e1e2e +selection_foreground #1e1e2e +selection_background #f5e0dc + +# Cursor colors +cursor #f5e0dc +cursor_text_color #1e1e2e + +# URL underline color when hovering with mouse +url_color #f5e0dc + +# Kitty window border colors +active_border_color #b4befe +inactive_border_color #6c7086 +bell_border_color #f9e2af + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111b +active_tab_background #cba6f7 +inactive_tab_foreground #cdd6f4 +inactive_tab_background #181825 +tab_bar_background #11111b + +# Colors for marks (marked text in the terminal) +mark1_foreground #1e1e2e +mark1_background #b4befe +mark2_foreground #1e1e2e +mark2_background #cba6f7 +mark3_foreground #1e1e2e +mark3_background #74c7ec + +# The 16 terminal colors + +# black +color0 #45475a +color8 #585b70 + +# red +color1 #f38ba8 +color9 #f38ba8 + +# green +color2 #a6e3a1 +color10 #a6e3a1 + +# yellow +color3 #f9e2af +color11 #f9e2af + +# blue +color4 #89b4fa +color12 #89b4fa + +# magenta +color5 #f5c2e7 +color13 #f5c2e7 + +# cyan +color6 #94e2d5 +color14 #94e2d5 + +# white +color7 #bac2de +color15 #a6adc8 + +# fonts +font_family JetBrainsMono Nerd Font Mono +bold_font auto +bold_italic_font auto +italic_font auto + +# tab bar +tab_bar_edge bottom + +# tabs +map alt+c new_tab +map alt+x close_tab +map alt+n next_tab +map alt+b previous_tab diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index eaf8c81..9f71f37 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -6,7 +6,6 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "coc.nvim": { "branch": "master", "commit": "f3406e06421eae672f1e990d8ac5a8b32b3190b9" }, "conform.nvim": { "branch": "master", "commit": "62eba813b7501b39612146cbf29cd07f1d4ac29c" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" }, diff --git a/wallpapers/.wallpapers/catppuccin_waves.png b/wallpapers/.wallpapers/catppuccin_waves.png new file mode 100644 index 0000000..65f9caf Binary files /dev/null and b/wallpapers/.wallpapers/catppuccin_waves.png differ diff --git "a/waybar/.config/waybar/\\" "b/waybar/.config/waybar/\\" new file mode 100644 index 0000000..2116a0d --- /dev/null +++ "b/waybar/.config/waybar/\\" @@ -0,0 +1,192 @@ + +# ####################################################################################### +# AUTOGENERATED HYPR CONFIG. +# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, +# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +# +# Please note not all available settings / options are set here. +# For a full list, see the wiki +# + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,auto +monitor = DP-1, 1920x1080@144, auto, auto + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more + +# Execute your favorite apps at launch +# exec-once = waybar & hyprpaper & firefox +exec-once = waybar +exec-once = hyperpaper + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +# Set programs that you use +$terminal = kitty +$fileManager = nautilus +$menu = wofi --show drun + +# Some default env vars. +env = XCURSOR_THEME,oreo_red +env = XCURSOR_SIZE,24 +env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = -0.1 # -1.0 to 1.0, 0 means no modification. + accel_profile = flat +} + + +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 6 + gaps_out = 14 + border_size = 2 + col.active_border = rgba(e78284ff) rgba(85c1dcff) rgba(ca9ee6ff) rgba(ea999cff) 45deg + col.inactive_border = rgba(1e1e2eff) + + layout = dwindle + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false +} + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + rounding = 10 + + blur { + enabled = true + size = 3 + passes = 1 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = true +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = off +} + +misc { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Q, exec, $terminal +bind = $mainMod, C, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, space, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, R, togglesplit, # dwindle + +# 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, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 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 diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config new file mode 100644 index 0000000..846609d --- /dev/null +++ b/waybar/.config/waybar/config @@ -0,0 +1,215 @@ +{ + "layer": "top", + "output": "DP-1", + "position": "top", + "spacing": 4, + "margin-top": 8, + "margin-bottom": 0, + "margin-left": 12, + "margin-right": 12, + + "modules-left": [ + "hyprland/workspaces", + "custom/spotify", + ], + + "modules-center": [ + "clock" + ], + + "modules-right": [ + "backlight", + "pulseaudio", + "network", + "battery", + ], + + "custom/icon": { + "format": "󰣇", + "on-click": "~/.config/rofi/bin/launcher", + "tooltip": false + }, + + "cpu": { + "interval": 10, + "format": " {usage}%", + "max-length": 10, + "tooltip": false + }, + + "clock": { + "format": "󰥔 {:%H:%M 󰃭 %d/%m} ", + //"format": "{:%a}", + "tooltip-format": "{calendar}", + "calendar": { + "mode" : "month", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + }, + + "memory": { + "interval": 30, + "format": " {used}GiB", + "format-alt": " {used:0.1f}G", + "max-length": 10 + }, + + "temperature": { + "format": " {temperatureF}°F" + }, + + "hyprland/window": { + "format": " {}", + "rewrite": { + "(.*) - NVIM": " NeoVim", + "(.*) — Mozilla Firefox": "󰈹 Firefox", + " ": "󰇄 Desktop", + "(.*) Spotify Free": "󰓇 Spotify", + "(.*) Spotify": "󰓇 Spotify", + " ~": " l6174@Radon", + "(.*) - Obsidian(.*)": "󱓧 Obsidian", + } + }, + + "hyprland/workspaces" : { + "on-click": "activate", + "active-only": false, + "all-outputs": true, + "format": "{icon}", + "format-icons": { + "urgent": "", + "active": "", + "default": "" + }, + "persistent-workspaces": { + "*": 4 + } + }, + + "backlight": { + "format": "{icon} {percent}%", + "format-icons": ["󰃞", "󰃟", "󰃠"], + "tooltip": false, + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon}  {volume}%", + "format-bluetooth-muted": "󰝟 ", + "format-muted": " 󰝟 ", + "format-icons": { + "headset": "", + "default": ["󰕿", "󰖀", "󰕾"], + }, + "tooltip": false, + "on-click": "pavucontrol", + }, + + "network": { + "interval": 30, + "format-wifi": "󰤨 {essid}", + "format-ethernet": "󰈀 Wired", + "fomat-disconnected": "󱚵 Disconnected", + "tooltip-format-wifi": "{essid} ({signalStrength}%)", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-icons": ["󰂎", "󰁻", "󰁽", "󰁿", "󰂁", "󰁹"], + "max-length": 25, + "tooltip": false, + }, + + + "tray": { + "icon-size": 20, + "spacing": 10, + }, + + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "󰈈 ", + "deactivated": "󰈉 " + }, + }, + + "custom/separator-space": { + "format": " ", + "tooltip": false, + }, + + "custom/separator-gap": { + "format": " ", + "tooltip": false, + }, + + "custom/separator-arrow": { + "format": "  ", + "tooltip": false, + }, + + "custom/spotify": { + "format": "{} ", + "max-length": 60, + "interval": "once", + "return-type": "json", + "exec": "~/.local/bin/spotifyctl", + "on-click": "playerctl --player=spotify play-pause && pkill -RTMIN+30 waybar", + "on-click-right": "playerctl --player=spotify loop track", + "on-scroll-down": "playerctl --player=spotify previous && pkill -RTMIN+30 waybar", + "on-scroll-up": "playerctl --player=spotify next && pkill -RTMIN+30 waybar", + "on-click-middle": "pkill --signal TERM spotify", + "signal": 30, + "smooth-scrolling-threshold": 1.0, + }, + + "custom/power": { + "format": "󰐥", + "on-click": "~/.config/rofi/bin/power.sh", + "tooltip": false, + }, + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "󱅫 ", + "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": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, + + "custom/updates": { + "format": " {}", + "tooltip-format": "{}", + "escape": true, + "return-type": "json", + "exec": "~/.config/waybar/custom-scripts/updates", + "restart-interval": 60, + "on-click": "kitty -e ~/.config/waybar/custom-scripts/update", + "tooltip": false + }, + +} diff --git a/waybar/.config/waybar/config.save b/waybar/.config/waybar/config.save new file mode 100644 index 0000000..0c31c56 --- /dev/null +++ b/waybar/.config/waybar/config.save @@ -0,0 +1,152 @@ +{ + "layer": "top", + "position": "top", + "spacing": 4, + "margin-top": 5, + "margin-bottom": 0, + "margin-left": 5, + "margin-right": 5, + + "modules-left": [ + "custom/icon", + "custom/separator-gap", + "cpu", + "memory", + "temperature", + "custom/separator-arrow", + "hyprland/window", + ], + + "modules-center": [ + "hyprland/workspaces", + ], + + "modules-right": [ + "backlight", + "pulseaudio", + "network", + "battery", + "tray", + "custom/separator-dot", + "clock", + "custom/power", + ], + + "custom/icon": { + "format": "󰣇" + }, + + "cpu": { + "interval": 10, + "format": " {usage}%", + "max-length": 10, + "tooltip": false + }, + + "memory": { + "interval": 30, + "format": " {used}GiB", + "format-alt": " {used:0.1f}G", + "max-length": 10 + }, + + "temperature": { + "format": " {temperatureF}°F" + }, + + "hyprland/window": { + "format": " {}", + "rewrite": { + "(.*) - NVIM": " NeoVim", + "(.*) — Mozilla Firefox": "󰈹 Mozilla Firefox", + } + }, + + "hyprland/workspaces": { + "all-outputs": true, + "format": "{icon}", + "format-icons": { + "1": "", + "2": "", + "3": "", + "urgent": "", + "active": "", + "default": "" + } + }, + + "backlight": { + "format": "{icon} {percent}", + "format-icons": ["󰃟", "󰃠"], + "tooltip": false, + }, + + "pulseaudio": { + "format": "{icon} {volume}", + "format-bluetooth": "{icon}  {volume}%", + "format-bluetooth-muted": "󰝟 ", + "format-muted": " 󰝟 ", + "format-icons": { + "headph": "", + "default": ["󰝟 ", ""], + }, + "tooltip": false, + "on-click": "pavucontrol", + }, + + "network": { + "interval": 30, + "format-wifi": "󰖩 {essid}", + "format-ethernet": "󰈀 Wired", + "fomat-disconnected": "󱚵 Disconnected", + "tooltip-format-wifi": "{essid} ({signalStrength}%)", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + }, + + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-icons": [" ", " ", " ", " ", " "], + "max-length": 25, + "tooltip": false, + }, + + "tray": { + "icon-size": 20, + "spacing": 10, + }, + + "custom/separator-dot": { + "format": "  ", + "tooltip": false, + "on-click": "$HOME/.config/hypr/scripts/random-wallpaper" + }, + + "custom/separator-gap": { + "format": " ", + "tooltip": false, + }, + + "custom/separator-arrow": { + "format": "  ", + "tooltip": false, + }, + + "custom/spotify": { + "exec": "/usr/bin/python3 $HOME/.config/waybar/custom-scripts/mediaplayer.py --player spotify --verbose", + "format": "{} ", + "return-type": "json", + "on-click": "playerctl play-pause", + "on-scroll-up": "playerctl next", + "on-scroll-down": "playerctl previous" + }, + "custom/power": { + "format": "", + "on-click": "~/.config/rofi/bin/powermenu", + "tooltip": false, + }, +} diff --git a/waybar/.config/waybar/config.save.1 b/waybar/.config/waybar/config.save.1 new file mode 100644 index 0000000..6d31d6e --- /dev/null +++ b/waybar/.config/waybar/config.save.1 @@ -0,0 +1,170 @@ +{ + "layer": "top", + "position": "top", + "spacing": 4, + "margin-top": 5, + "margin-bottom": 0, + "margin-left": 5, + "margin-right": 5, + + "modules-left": [ + "custom/icon", + "clock", + "custom/spotify", + ], + + "modules-center": [ + "hyprland/window", + "custom/separator-arrow", + "hyprland/workspaces", + ], + + "modules-right": [ + "backlight", + "pulseaudio", + "network", + "battery", + "tray", + "custom/power", + ], + + "custom/icon": { + "format": "󰣇", + "on-click": "~/.config/rofi/bin/launcher", + "tooltip": false + }, + + "cpu": { + "interval": 10, + "format": " {usage}%", + "max-length": 10, + "tooltip": false + }, + + clock": { + "format": "{: %d-%m-24  %H:%M}", + //"format": "{:%a}", + "tooltip-format": "{calendar}", + "calendar": { + "mode" : "month", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + }, + + "memory": { + "interval": 30, + "format": " {used}GiB", + "format-alt": " {used:0.1f}G", + "max-length": 10 + }, + + "temperature": { + "format": " {temperatureF}°F" + }, + + "hyprland/window": { + "format": " {}", + "rewrite": { + "(.*) - NVIM": " NeoVim", + "(.*) — Mozilla Firefox": "󰈹 Mozilla Firefox", + " ": "󰇄 Desktop", + "(.*) Spotify Free": "󰓇 Spotify", + "(.*) Spotify": "󰓇 Spotify", + " ~": " l6174@Radon", + "(.*) - Obsidian(.*)": "󱓧 Obsidian", + } + }, + + "hyprland/workspaces": { + "all-outputs": true, + "format": "{icon}", + "format-icons": { + "1": "", + "2": "", + "3": "", + "urgent": "", + "active": "", + "default": "" + } + }, + + "backlight": { + "format": "{icon} {percent}", + "format-icons": ["󰃟", "󰃠"], + "tooltip": false, + }, + + "pulseaudio": { + "format": "{icon} {volume}", + "format-bluetooth": "{icon}  {volume}%", + "format-bluetooth-muted": "󰝟 ", + "format-muted": " 󰝟 ", + "format-icons": { + "headset": "", + "default": ["", ""], + }, + "tooltip": false, + "on-click": "pavucontrol", + }, + + "network": { + "interval": 30, + "format-wifi": "󰖩 {essid}", + "format-ethernet": "󰈀 Wired", + "fomat-disconnected": "󱚵 Disconnected", + "tooltip-format-wifi": "{essid} ({signalStrength}%)", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-icons": [" ", " ", " ", " ", " "], + "max-length": 25, + "tooltip": false, + }, + + "tray": { + "icon-size": 20, + "spacing": 10, + }, + + "custom/separator-dot": { + "format": "  ", + "tooltip": false, + "on-click": "$HOME/.config/hypr/scripts/random-wallpaper" + }, + + "custom/separator-gap": { + "format": " ", + "tooltip": false, + }, + + "custom/separator-arrow": { + "format": "  ", + "tooltip": false, + }, + + "custom/spotify": { + "exec": "/usr/bin/python3 $HOME/.config/waybar/custom-scripts/mediaplayer.py --player spotify --verbose", + "format": " {}  ", + "return-type": "json", + "on-click": "playerctl play-pause", + "on-scroll-up": "playerctl next", + "on-scroll-down": "playerctl previous" + }, + "custom/power": { + "format": "󰐥", + "on-click": "~/.config/rofi/bin/powermenu", + "tooltip": false, + }, +} diff --git a/waybar/.config/waybar/config.save.2 b/waybar/.config/waybar/config.save.2 new file mode 100644 index 0000000..effd104 --- /dev/null +++ b/waybar/.config/waybar/config.save.2 @@ -0,0 +1,207 @@ +{ + "layer": "top", + "position": "top", + "spacing": 4, + "margin-top": 5, + "margin-bottom": 0, + "margin-left": 5, + "margin-right": 5, + + "modules-left": [ + "custom/icon", + "custom/separator-space", + "hyprland/workspaces", + "custom/spotify",2 + "custom/separator-arrow", + "hyprland/window", + ], + + "modules-center": [ + "clock" + ], + + "modules-right": [ + "backlight", + "pulseaudio", + "network", + "battery", + "tray", + "custom/inhibitor", + "custom/notification", + "custom/power", + ], + + "custom/icon": { + "format": "󰣇", + "on-click": "~/.config/rofi/bin/launcher", + "tooltip": false + }, + + "cpu": { + "interval": 10, + "format": " {usage}%", + "max-length": 10, + "tooltip": false + }, + + "clock": { + "format": "󰥔 {:%H:%M 󰃭 %d/%m} ", + //"format": "{:%a}", + "tooltip-format": "{calendar}", + "calendar": { + "mode" : "month", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + }, + + "memory": { + "interval": 30, + "format": " {used}GiB", + "format-alt": " {used:0.1f}G", + "max-length": 10 + }, + + "temperature": { + "format": " {temperatureF}°F" + }, + + "hyprland/window": { + "format": " {}", + "rewrite": { + "(.*) - NVIM": " NeoVim", + "(.*) — Mozilla Firefox": "󰈹 Firefox", + " ": "󰇄 Desktop", + "(.*) Spotify Free": "󰓇 Spotify", + "(.*) Spotify": "󰓇 Spotify", + " ~": " l6174@Radon", + "(.*) - Obsidian(.*)": "󱓧 Obsidian", + } + }, + + "hyprland/workspaces": { + "all-outputs": false, + "format": "{icon}", + "format-icons": { + "urgent": " ", + "persistent": " ", + "active": " ", + "empty": " " + }, + "persistent-workspaces": { + "1": [], + "2": [], + "3": [], + "4": [] + } + }, + + "backlight": { + "format": "{icon} {percent}", + "format-icons": ["󰃞", "󰃟", "󰃠"], + "tooltip": false, + }, + + "pulseaudio": { + "format": "{icon} {volume}", + "format-bluetooth": "{icon}  {volume}%", + "format-bluetooth-muted": "󰝟 ", + "format-muted": " 󰝟 ", + "format-icons": { + "headset": "", + "default": ["󰕿", "󰖀", "󰕾"], + }, + "tooltip": false, + "on-click": "pavucontrol", + }, + + "network": { + "interval": 30, + "format-wifi": "󰤨 {essid}", + "format-ethernet": "󰈀 Wired", + "fomat-disconnected": "󱚵 Disconnected", + "tooltip-format-wifi": "{essid} ({signalStrength}%)", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-icons": ["󰂎", "󰁻", "󰁽", "󰁿", "󰂁", "󰁹"], + "max-length": 25, + "tooltip": false, + }, + + "tray": { + "icon-size": 20, + "spacing": 10, + }, + + "custom/inhibitor": { + "exec": "~/.local/bin/waybar-inhibitor", + "interval": 5, + "return-type": "json", + "tooltip": true, + "on-click": "~/.local/bin/inhibitor", + "signal": 10 + }, + + + "custom/separator-dot": { + "format": "  ", + "tooltip": false, + "on-click": "$HOME/.config/hypr/scripts/random-wallpaper" + }, + + "custom/separator-gap": { + "format": " ", + "tooltip": false, + }, + + "custom/separator-arrow": { + "format": "  ", + "tooltip": false, + }, + + "custom/spotify": { + "exec": "/usr/bin/python3 $HOME/.config/waybar/custom-scripts/mediaplayer.py --player spotify --verbose", + "format": " {}  ", + "return-type": "json", + "on-click": "playerctl play-pause", + "on-scroll-up": "playerctl next", + "on-scroll-down": "playerctl previous" + }, + "custom/power": { + "format": "󰐥", + "on-click": "~/.config/rofi/bin/powermenu", + "tooltip": false, + }, + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "󱅫 ", + "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": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, +} diff --git a/waybar/.config/waybar/custom-scripts/mediaplayer.py b/waybar/.config/waybar/custom-scripts/mediaplayer.py new file mode 100644 index 0000000..3da53e9 --- /dev/null +++ b/waybar/.config/waybar/custom-scripts/mediaplayer.py @@ -0,0 +1,179 @@ +#!/usr/bin/env python3 +import gi +gi.require_version("Playerctl", "2.0") +from gi.repository import Playerctl, GLib +from gi.repository.Playerctl import Player +import argparse +import logging +import sys +import signal +import gi +import json +import os +from typing import List + +logger = logging.getLogger(__name__) + +def signal_handler(sig, frame): + logger.info("Received signal to stop, exiting") + sys.stdout.write("\n") + sys.stdout.flush() + # loop.quit() + sys.exit(0) + + +class PlayerManager: + def __init__(self, selected_player=None): + self.manager = Playerctl.PlayerManager() + self.loop = GLib.MainLoop() + self.manager.connect( + "name-appeared", lambda *args: self.on_player_appeared(*args)) + self.manager.connect( + "player-vanished", lambda *args: self.on_player_vanished(*args)) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + signal.signal(signal.SIGPIPE, signal.SIG_DFL) + self.selected_player = selected_player + + self.init_players() + + def init_players(self): + for player in self.manager.props.player_names: + if self.selected_player is not None and self.selected_player != player.name: + logger.debug(f"{player.name} is not the filtered player, skipping it") + continue + self.init_player(player) + + def run(self): + logger.info("Starting main loop") + self.loop.run() + + def init_player(self, player): + logger.info(f"Initialize new player: {player.name}") + player = Playerctl.Player.new_from_name(player) + player.connect("playback-status", + self.on_playback_status_changed, None) + player.connect("metadata", self.on_metadata_changed, None) + self.manager.manage_player(player) + self.on_metadata_changed(player, player.props.metadata) + + def get_players(self) -> List[Player]: + return self.manager.props.players + + def write_output(self, text, player): + logger.debug(f"Writing output: {text}") + + output = {"text": text, + "class": "custom-" + player.props.player_name, + "alt": player.props.player_name} + + sys.stdout.write(json.dumps(output) + "\n") + sys.stdout.flush() + + def clear_output(self): + sys.stdout.write("\n") + sys.stdout.flush() + + def on_playback_status_changed(self, player, status, _=None): + logger.debug(f"Playback status changed for player {player.props.player_name}: {status}") + self.on_metadata_changed(player, player.props.metadata) + + def get_first_playing_player(self): + players = self.get_players() + logger.debug(f"Getting first playing player from {len(players)} players") + if len(players) > 0: + # if any are playing, show the first one that is playing + # reverse order, so that the most recently added ones are preferred + for player in players[::-1]: + if player.props.status == "Playing": + return player + # if none are playing, show the first one + return players[0] + else: + logger.debug("No players found") + return None + + def show_most_important_player(self): + logger.debug("Showing most important player") + # show the currently playing player + # or else show the first paused player + # or else show nothing + current_player = self.get_first_playing_player() + if current_player is not None: + self.on_metadata_changed(current_player, current_player.props.metadata) + else: + self.clear_output() + + def on_metadata_changed(self, player, metadata, _=None): + logger.debug(f"Metadata changed for player {player.props.player_name}") + player_name = player.props.player_name + title = player.get_title() + + track_info = "" + if player_name == "spotify" and "mpris:trackid" in metadata.keys() and ":ad:" in player.props.metadata["mpris:trackid"]: + track_info = "Advertisement" + else: + track_info = title + + if track_info: + if player.props.status == "Playing": + track_info = " " + track_info + else: + track_info = " " + track_info + # only print output if no other player is playing + current_playing = self.get_first_playing_player() + if current_playing is None or current_playing.props.player_name == player.props.player_name: + self.write_output(track_info, player) + else: + logger.debug(f"Other player {current_playing.props.player_name} is playing, skipping") + + def on_player_appeared(self, _, player): + logger.info(f"Player has appeared: {player.name}") + if player is not None and (self.selected_player is None or player.name == self.selected_player): + self.init_player(player) + else: + logger.debug( + "New player appeared, but it's not the selected player, skipping") + + def on_player_vanished(self, _, player): + logger.info(f"Player {player.props.player_name} has vanished") + self.show_most_important_player() + +def parse_arguments(): + parser = argparse.ArgumentParser() + + # Increase verbosity with every occurrence of -v + parser.add_argument("-v", "--verbose", action="count", default=0) + + # Define for which player we"re listening + parser.add_argument("--player") + + parser.add_argument("--enable-logging", action="store_true") + + return parser.parse_args() + + +def main(): + arguments = parse_arguments() + + # Initialize logging + if arguments.enable_logging: + logfile = os.path.join(os.path.dirname( + os.path.realpath(__file__)), "media-player.log") + logging.basicConfig(filename=logfile, level=logging.DEBUG, + format="%(asctime)s %(name)s %(levelname)s:%(lineno)d %(message)s") + + # Logging is set by default to WARN and higher. + # With every occurrence of -v it's lowered by one + logger.setLevel(max((3 - arguments.verbose) * 10, 0)) + + logger.info("Creating player manager") + if arguments.player: + logger.info(f"Filtering for player: {arguments.player}") + player = PlayerManager(arguments.player) + player.run() + + +if __name__ == "__main__": + main() diff --git a/waybar/.config/waybar/custom-scripts/update b/waybar/.config/waybar/custom-scripts/update new file mode 100755 index 0000000..61a35dc --- /dev/null +++ b/waybar/.config/waybar/custom-scripts/update @@ -0,0 +1,11 @@ +#!/bin/bash +sleep 1 +figlet "Update" +sleep 0.5 +echo "." +sleep 0.5 +echo "." +sleep 0.5 +echo "." +sleep 0.5 +arch-update diff --git a/waybar/.config/waybar/custom-scripts/updates b/waybar/.config/waybar/custom-scripts/updates new file mode 100755 index 0000000..b6b0be5 --- /dev/null +++ b/waybar/.config/waybar/custom-scripts/updates @@ -0,0 +1,63 @@ +#!/bin/bash +# _ _ _ _ +# | | | |_ __ __| | __ _| |_ ___ ___ +# | | | | '_ \ / _` |/ _` | __/ _ \/ __| +# | |_| | |_) | (_| | (_| | || __/\__ \ +# \___/| .__/ \__,_|\__,_|\__\___||___/ +# |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# ----------------------------------------------------- +# Define threshholds for color indicators +# ----------------------------------------------------- + +threshhold_green=0 +threshhold_yellow=25 +threshhold_red=100 + +# ----------------------------------------------------- +# Calculate available updates pacman and aur (with aur) +# ----------------------------------------------------- + +if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 +fi + +if ! updates_aur=$(paru -Qua | wc -l); then + updates_aur=0 +fi + +updates=$(("$updates_arch" + "$updates_aur")) + +# ----------------------------------------------------- +# Testing +# ----------------------------------------------------- + +# Overwrite updates with numbers for testing +# updates=50 + +# test JSON output +# printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "red"}' +# exit + +# ----------------------------------------------------- +# Output in JSON format for Waybar Module custom-updates +# ----------------------------------------------------- + +css_class="green" + +if [ "$updates" -gt $threshhold_yellow ]; then + css_class="yellow" +fi + +if [ "$updates" -gt $threshhold_red ]; then + css_class="red" +fi + +if [ "$updates" -gt $threshhold_green ]; then + printf '{"text": "%s", "alt": "%s", "tooltip": "%s Updates", "class": "%s"}' "$updates" "$updates" "$updates" "$css_class" +else + printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "green"}' +fi diff --git a/waybar/.config/waybar/mocha.css b/waybar/.config/waybar/mocha.css new file mode 100644 index 0000000..98e218a --- /dev/null +++ b/waybar/.config/waybar/mocha.css @@ -0,0 +1,37 @@ +/* +* +* Catppuccin Mocha palette +* Maintainer: rubyowo +* +*/ + +@define-color base #1e1e2e; +@define-color mantle #181825; +@define-color crust #11111b; + +@define-color text #cdd6f4; +@define-color subtext0 #a6adc8; +@define-color subtext1 #bac2de; + +@define-color surface0 #313244; +@define-color surface1 #45475a; +@define-color surface2 #585b70; + +@define-color overlay0 #6c7086; +@define-color overlay1 #7f849c; +@define-color overlay2 #9399b2; + +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color sapphire #74c7ec; +@define-color sky #89dceb; +@define-color teal #94e2d5; +@define-color green #a6e3a1; +@define-color yellow #f9e2af; +@define-color peach #fab387; +@define-color maroon #eba0ac; +@define-color red #f38ba8; +@define-color mauve #cba6f7; +@define-color pink #f5c2e7; +@define-color flamingo #f2cdcd; +@define-color rosewater #f5e0dc; diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css new file mode 100644 index 0000000..00c4f66 --- /dev/null +++ b/waybar/.config/waybar/style.css @@ -0,0 +1,181 @@ +@import "mocha.css"; + +* { + padding: 1px; + margin: 0px; + font-family: "Overpass", "JetBrains Mono Nerd Font"; + font-size: 12px; +} + +/* ------ Set a Uniform Border Radius ------ */ +.modules-left, .modules-center, .modules-right, #cpu, #memory, #temperature, #pulseaudio, #backlight, #custom-spotify, #custom-icon, #custom-updates, #network, #battery, #tray, #idle_inhibitor, #custom-power, #custom-notification { + border-radius: 99px; +} + +/* ------ Modules Left ------ */ +.modules-left { + background-color: @base; + padding-right: 5px; + padding-left: 12px; +} + +/* ------ Modules Center ------ */ +.modules-center { + background-color: @base; + padding-right: 5px; + padding-left: 5px; +} + +/* ------ Modules Right ------ */ +.modules-right { + background-color: @base; + padding-right: 5px; + padding-left: 5px; +} + +/* ------ Cpu Usage, Temperature, and Memory ------ */ +#cpu, #temperature, #memory { + background-color: @surface1; + padding: 2px 5px; + margin: 4px 2px; +} + +#cpu { color: @peach; } +#memory { color: @mauve; } +#temperature { color: @maroon; } + +/* ------ Window Title ------ */ +#window { + color: @text; + padding-right: 4px; +} + +window#waybar { + background-color: rgba(0, 0, 0, 0); + border-bottom: 0px solid #ffffff; + /* color: #FFFFFF; */ + background: transparent; + transition-property: background-color; + transition-duration: .5s; +} + +/* ----------------------------------------------------- + * Workspaces + * ----------------------------------------------------- */ + +#workspaces button.empty { + color: @surface2; + font-family: JetBrainsMono Nerd Font; +} + +#workspaces { + margin: 0px 1px 0px 1px; + padding: 0px 12px 0px 0px; + font-family: JetBrainsMono Nerd Font; +} + +#workspaces button { + padding: 0px 2px; + margin: 4px 2px; + color: @yellow; + font-family: JetBrainsMono Nerd Font; +} + +#workspaces button:hover { + opacity:0.5; +} + +/* ------ Pulseaudio ------ */ +#pulseaudio { + color: @peach; + background-color: @surface1; + padding: 2px 8px; + margin: 4px 2px; +} + +/* ------ Backlight ------ */ +#backlight { + color: @sky; + background-color: @surface1; + padding: 2px 5px; + margin: 4px 2px; +} + +/* ------ Network ------ */ +#network { + color: @mauve; + background-color: @surface1; + padding: 2px 8px; + margin: 4px 2px; +} + +/* ------ Battery ------ */ +#battery { + color: @maroon; + background-color: @surface1; + padding: 2px 5px; + margin: 4px 2px; +} + +/* ------ Clock ------ */ +#clock { + padding-left: 10px; + color: @text; + font-weight: bold; + font-size: 13px; +} + +/* ------ System Tray ------ */ +#tray { + background-color: @surface1; + padding: 2px 5px; + margin: 4px 2px; +} + +/* ------ Custom Modules ------ */ +#custom-separator-arrow { + font-size: 14px; + color: @text; +} + +#custom-separator-dot { + font-size: 15px; + color: @text; +} + +#custom-spotify { + color: @mauve; + background-color: @surface1; + padding: 2px 9px; + margin: 4px 2px; +} + +#custom-power { + color: @red; + background-color: @surface1; + padding: 2px 9px; + margin: 4px 2px; + font-size: 15px; +} + +/* +#idle_inhibitor { + color: @green; + background-color: @surface1; + padding: 2px 9px; + margin: 4px 2px; + font-size: 15px; +}*/ + +#custom-notification { + color: @teal; + background-color: @surface1; + padding: 2px 9px; + margin: 4px 2px; + font-size: 15px; +} + +tooltip { + background: @base; + border: 1px solid @blue; +} diff --git a/wezterm/.wezterm.lua b/wezterm/.wezterm.lua index a0f7da6..3207fa3 100644 --- a/wezterm/.wezterm.lua +++ b/wezterm/.wezterm.lua @@ -3,7 +3,7 @@ local wezterm = require("wezterm") -- This table will hold the configuration. local config = {} - +config.enable_wayland = false config.default_prog = { "usr/bin/zsh", "-l" } -- In newer versions of wezterm, use the config_builder which will -- help provide clearer error messages