From 60c82347a2c4c9a6c42c2d4a2f6e4923e1160d65 Mon Sep 17 00:00:00 2001 From: UhGoomba <53350163+UhGoomba@users.noreply.github.com> Date: Tue, 9 Jul 2024 04:25:27 -0400 Subject: add wofi, waybar, fish, kitty --- README.md | 5 + fish/.config/fish/auto-Hypr.fish | 5 + fish/.config/fish/config.fish | 144 ++++++++++++ fish/.config/fish/fish_variables | 79 +++++++ hypr/.config/hypr/hyprpaper.conf | 6 +- hypr/.config/hypr/signalis.png | Bin 0 -> 205675 bytes install.sh | 5 + kitty/.config/kitty/kitty.conf | 49 +++++ waybar/.config/waybar/config | 144 ++++++++++++ waybar/.config/waybar/config-hypr | 367 +++++++++++++++++++++++++++++++ waybar/.config/waybar/mediaplayer.py | 128 +++++++++++ waybar/.config/waybar/modules/mail.py | 43 ++++ waybar/.config/waybar/modules/spotify.sh | 19 ++ waybar/.config/waybar/modules/storage.sh | 25 +++ waybar/.config/waybar/modules/weather.sh | 80 +++++++ waybar/.config/waybar/old-config | 92 ++++++++ waybar/.config/waybar/old-config-hypr | 367 +++++++++++++++++++++++++++++++ waybar/.config/waybar/old-style.css | 64 ++++++ waybar/.config/waybar/style.css | 68 ++++++ waybar/.config/waybar/waybar.sh | 10 + wofi/.config/wofi/config | 15 ++ wofi/.config/wofi/style.css | 40 ++++ 22 files changed, 1752 insertions(+), 3 deletions(-) create mode 100644 fish/.config/fish/auto-Hypr.fish create mode 100644 fish/.config/fish/config.fish create mode 100755 fish/.config/fish/fish_variables create mode 100644 hypr/.config/hypr/signalis.png create mode 100644 kitty/.config/kitty/kitty.conf create mode 100644 waybar/.config/waybar/config create mode 100644 waybar/.config/waybar/config-hypr create mode 100755 waybar/.config/waybar/mediaplayer.py create mode 100755 waybar/.config/waybar/modules/mail.py create mode 100755 waybar/.config/waybar/modules/spotify.sh create mode 100755 waybar/.config/waybar/modules/storage.sh create mode 100755 waybar/.config/waybar/modules/weather.sh create mode 100644 waybar/.config/waybar/old-config create mode 100644 waybar/.config/waybar/old-config-hypr create mode 100644 waybar/.config/waybar/old-style.css create mode 100644 waybar/.config/waybar/style.css create mode 100755 waybar/.config/waybar/waybar.sh create mode 100644 wofi/.config/wofi/config create mode 100644 wofi/.config/wofi/style.css diff --git a/README.md b/README.md index 62ac67e..2405446 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ # Dotfiles + +Dependencies: +- Hyprland +- Waybar +- Hyprpaper diff --git a/fish/.config/fish/auto-Hypr.fish b/fish/.config/fish/auto-Hypr.fish new file mode 100644 index 0000000..c3c1890 --- /dev/null +++ b/fish/.config/fish/auto-Hypr.fish @@ -0,0 +1,5 @@ +# Auto start Hyprland on tty1 +if test -z "$DISPLAY" ;and test "$XDG_VTNR" -eq 1 + mkdir -p ~/.cache + exec Hyprland > ~/.cache/hyprland.log ^&1 +end diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish new file mode 100644 index 0000000..400596f --- /dev/null +++ b/fish/.config/fish/config.fish @@ -0,0 +1,144 @@ +# custom greeting +set KERNEL (uname -r) +set fish_greeting (set_color --bold efcf40)">"(set_color ef9540)"<"(set_color ea3838)">" \ + (set_color normal)"fish $FISH_VERSION" \ + (set_color normal)"| $KERNEL + " + +function fish_user_key_bindings + fish_vi_key_bindings + + # set kj to + bind -M insert -m default kj backward-char force-repaint +end + +# remove default clock +function fish_right_prompt + echo (set_color e5e5e5)"$USER"@(hostname) +end + +# indicator for vi +function fish_mode_prompt + switch "$fish_bind_mode" + case "default" + echo -n (set_color f43f5e)"𝓷" + case "insert" + echo -n (set_color 84cc16)"𝒾" + case "visual" + echo -n (set_color 8b5cf6)"đ“ŋ" + case "*" + echo -n "?" + end + + echo -n " " +end + +# custom prompt +function fish_prompt + set_color --bold 4086ef + + set transformed_pwd (prompt_pwd | string replace -r "^~" (set_color --bold 06b6d4)"~"(set_color --bold 3b82f6)) + + echo -n $transformed_pwd + + # git branch + if git rev-parse --is-inside-work-tree >/dev/null 2>&1 + #space + echo -n " " + + echo -n (set_color --bold 4338ca)"(" + + set_color f0abfc + echo -n (git branch --show-current) + + echo -n (set_color --bold 4338ca)")" + set_color normal + end + + # space + echo -n " " + + # arrows + # echo -n (set_color --bold efcf40)"❱" + # echo -n (set_color --bold ef9540)"❱" + # echo -n (set_color --bold ea3838)"❱" + + echo -n (set_color --bold 14b8a6)"→" + + #space + echo -n " " + + set_color normal +end + +# set environment variables +set -x PATH $PATH:/usr/local/bin:/opt/bin + +# set editor +set -x EDITOR "code" + +# for hyprland +set -x WLR_NO_HARDWARE_CURSORS 1 + +# wayland +set -x GDK_BACKEND wayland +set -x QT_QPA_PLATFORM wayland + +# fzf +export FZF_DEFAULT_OPTS=" +--bind='ctrl-j:down,ctrl-k:up,ctrl-t:toggle-all,ctrl-v:toggle-preview,ctrl-space:toggle-preview' +--color=fg:#ffffff,hl:#00ff00,fg+:#a5b4fc,bg+:#737373,hl+:#ffff00,info:#14b8a6,spinner:#00ffff,pointer:#f59e0b +" + +alias ls "exa --icons" +alias treelist "tree -a -I '.git'" +alias fetch "fastfetch --localip-show-ipv4 false" + +# TokyoNight Color Palette from https://github.com/folke/tokyonight.nvim/blob/main/extras/fish/tokyonight_storm.fish +set -l foreground c0caf5 +# changed from default +set -l selection 6366f1 +# changed from default +set -l comment 737373 +set -l red f7768e +set -l orange ff9e64 +set -l yellow e0af68 +set -l green 9ece6a +set -l purple 9d7cd8 +set -l cyan 7dcfff +set -l pink bb9af7 + +# Syntax Highlighting Colors +set -g fish_color_normal $foreground +set -g fish_color_command $cyan +set -g fish_color_keyword $pink +set -g fish_color_quote $yellow +set -g fish_color_redirection $foreground +set -g fish_color_end $orange +set -g fish_color_error $red +set -g fish_color_param $purple +set -g fish_color_comment $comment +set -g fish_color_selection --background=$selection +set -g fish_color_search_match --background=$selection +set -g fish_color_operator $green +set -g fish_color_escape $pink +set -g fish_color_autosuggestion $comment + +# Completion Pager Colors +set -g fish_pager_color_progress $comment +set -g fish_pager_color_prefix $cyan +set -g fish_pager_color_completion $foreground +set -g fish_pager_color_description $comment +set -g fish_pager_color_selected_background --background=$selection + +# bun +set --export BUN_INSTALL "$HOME/.bun" +set --export PATH $BUN_INSTALL/bin $PATH + +# pnpm +set -gx PNPM_HOME "/home/mh/.local/share/pnpm" +if not string match -q -- $PNPM_HOME $PATH + set -gx PATH "$PNPM_HOME" $PATH +end +# pnpm end + diff --git a/fish/.config/fish/fish_variables b/fish/.config/fish/fish_variables new file mode 100755 index 0000000..bee8cd5 --- /dev/null +++ b/fish/.config/fish/fish_variables @@ -0,0 +1,79 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish +SETUVAR _fisher_plugins:jorgebucaran/fisher +SETUVAR _fisher_upgraded_to_4_4:\x1d +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d111 +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_vi_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di +SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR pure_begin_prompt_with_current_directory:true +SETUVAR pure_check_for_new_release:false +SETUVAR pure_color_at_sign:pure_color_mute +SETUVAR pure_color_command_duration:pure_color_warning +SETUVAR pure_color_current_directory:pure_color_primary +SETUVAR pure_color_danger:red +SETUVAR pure_color_dark:black +SETUVAR pure_color_git_branch:pure_color_mute +SETUVAR pure_color_git_dirty:pure_color_mute +SETUVAR pure_color_git_stash:pure_color_info +SETUVAR pure_color_git_unpulled_commits:pure_color_info +SETUVAR pure_color_git_unpushed_commits:pure_color_info +SETUVAR pure_color_hostname:pure_color_mute +SETUVAR pure_color_info:cyan +SETUVAR pure_color_jobs:pure_color_normal +SETUVAR pure_color_light:white +SETUVAR pure_color_mute:brblack +SETUVAR pure_color_normal:normal +SETUVAR pure_color_prefix_root_prompt:pure_color_danger +SETUVAR pure_color_primary:blue +SETUVAR pure_color_prompt_on_error:pure_color_danger +SETUVAR pure_color_prompt_on_success:pure_color_success +SETUVAR pure_color_success:magenta +SETUVAR pure_color_system_time:pure_color_mute +SETUVAR pure_color_username_normal:pure_color_mute +SETUVAR pure_color_username_root:pure_color_light +SETUVAR pure_color_virtualenv:pure_color_mute +SETUVAR pure_color_warning:yellow +SETUVAR pure_enable_git:true +SETUVAR pure_enable_single_line_prompt:false +SETUVAR pure_reverse_prompt_symbol_in_vimode:true +SETUVAR pure_separate_prompt_on_error:false +SETUVAR pure_show_jobs:false +SETUVAR pure_show_prefix_root_prompt:false +SETUVAR pure_show_subsecond_command_duration:false +SETUVAR pure_show_system_time:false +SETUVAR pure_symbol_git_dirty:\x2a +SETUVAR pure_symbol_git_stash:\u2261 +SETUVAR pure_symbol_git_unpulled_commits:\u21e3 +SETUVAR pure_symbol_git_unpushed_commits:\u21e1 +SETUVAR pure_symbol_prefix_root_prompt:\x23 +SETUVAR pure_symbol_prompt:\u276f +SETUVAR pure_symbol_reverse_prompt:\u276e +SETUVAR pure_symbol_title_bar_separator:\x2d +SETUVAR pure_threshold_command_duration:5 diff --git a/hypr/.config/hypr/hyprpaper.conf b/hypr/.config/hypr/hyprpaper.conf index c4e73f9..609de6d 100644 --- a/hypr/.config/hypr/hyprpaper.conf +++ b/hypr/.config/hypr/hyprpaper.conf @@ -1,7 +1,7 @@ -preload = ~/.wallpapers/wall0.jpg +preload = signalis.png -wallpaper = DP-1,~/.wallpapers/wall0.jpg -wallpaper = DP-2,~/.wallpapers/wall0.jpg +wallpaper = DP-1,signalis.png +wallpaper = DP-2,signalis.png # .. more monitors # disable messages on bottom diff --git a/hypr/.config/hypr/signalis.png b/hypr/.config/hypr/signalis.png new file mode 100644 index 0000000..f51166f Binary files /dev/null and b/hypr/.config/hypr/signalis.png differ diff --git a/install.sh b/install.sh index 16c099a..83e80ff 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,11 @@ # install dependencies (TODO) + # stow dotfiles stow hypr --adopt +stow waybar --adopt +stow fish --adopt +stow kitty --adopt +stow wofi --adopt # do other stuff (TODO) diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf new file mode 100644 index 0000000..519ebd4 --- /dev/null +++ b/kitty/.config/kitty/kitty.conf @@ -0,0 +1,49 @@ +background_opacity 0.75 +window_padding_width 4 + +font_family FiraCode NerdFont +font_size 14.0 + +# highlighting +selection_foreground #ffffff +selection_background #14b8a6 + +# Tokyo Night colorscheme +foreground #c0caf5 +background #1a1b26 + +# normal colors +# Black +color0 #0b0c15 +# Red +color1 #d2556c +# Green +color2 #7cd47b +# Yellow +color3 #efb184 +# Blue +color4 #6ca1f3 +# Magenta +color5 #b78df0 +# Cyan +color6 #69bcf4 +# White +color7 #c0caf5 + +# bright colors +# Bright Black +color8 #39404a +# Bright Red +color9 #f7768e +# Bright Green +color10 #85e89d +# Bright Yellow +color11 #f4cf8d +# Bright Blue +color12 #8fb9ff +# Bright Magenta +color13 #d9a3ff +# Bright Cyan +color14 #8fd3ff +# Bright White +color15 #f0f3f6 \ No newline at end of file diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config new file mode 100644 index 0000000..9e38316 --- /dev/null +++ b/waybar/.config/waybar/config @@ -0,0 +1,144 @@ +{ + "layer": "top", + "position": "top", + "margin-bottom": 0, + "modules-left": [ + "clock", + "custom/separator", + "hyprland/workspaces", + "custom/separator", + "tray" + ], + "modules-center": [ + "hyprland/window" + ], + "modules-right": [ + "temperature", + "memory", + "cpu", + "pulseaudio", + "battery", + "network", + "custom/separator", + "custom/powermenu" + ], + "custom/separator": { + "exec": "echo \"|\"", + "format": "{}" + }, + "tray": { + "icon-size": 16, + "spacing": 8 + }, + "clock": { + // 24 hour + // "format": " {:%H:%M} ", + // 12 hour + "format": " ķ°¸— {:%I:%M %p} ", + "interval": 60, + "tooltip": true, + "tooltip-format": "{:%d %B %H:%M}" + }, + "hyprland/workspaces": { + "format": "{icon}", + "separate-outputs": false, + "active-only": false, + // turn on true to show same all workspaces on each monitor + "all-outputs": false, + "format-icons": { + // 1-10 + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "10": "10", + // 11-10 + "11": "1", + "12": "2", + "13": "3", + "14": "4", + "15": "5", + "16": "6", + "17": "7", + "18": "8", + "19": "9", + "110": "10" + + // // 1-10 + // "1": "一", + // "2": "äēŒ", + // "3": "三", + // "4": "四", + // "5": "äē”", + // "6": "六", + // "7": "七", + // "8": "å…Ģ", + // "9": "䚝", + // "10": "十", + // // 11-10 + // "11": "一", + // "12": "äēŒ", + // "13": "三", + // "14": "四", + // "15": "äē”", + // "16": "六", + // "17": "七", + // "18": "å…Ģ", + // "19": "䚝", + // "110": "十" + } + }, + "hyprland/window": { + "format": "{}" + }, + "network": { + "format": " ķ°–Š", + // "tooltip": "{ifname}", + "tooltip-format": "{essid}", + "interval": 2 + }, + "temperature": { + "format": "{icon} {temperatureC}°C ", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + "format-icons": [ + "ī‹‹", + "", + "" + ] + }, + "memory": { + "format": "ķ°Ģ— {}% ", + "tooltip": "false" + }, + "cpu": { + "format": "ī’ŧ {usage}% ", + "tooltip": "false" + }, + "pulseaudio": { + "format": " {volume}%", + "scroll-step": 1, + "on-click": "pulseaudio" + }, + "battery": { + "format": "{capacity}% {icon}", + "format-icons": [ + "", + "ī‰ƒ", + "", + "", + "" + ] + }, + "custom/powermenu": { + "format": "  ", + "tooltip": false, + "on-click": "exec wlogout -p layer-shell" + } +} + diff --git a/waybar/.config/waybar/config-hypr b/waybar/.config/waybar/config-hypr new file mode 100644 index 0000000..0e713b9 --- /dev/null +++ b/waybar/.config/waybar/config-hypr @@ -0,0 +1,367 @@ +{ + // ------------------------------------------------------------------------- + // Global configuration + // ------------------------------------------------------------------------- + + "layer": "top", + + "position": "top", + + //"height": 20, + + "margin-left": 10, + "margin-bottom": 0, + "margin-right": 10, + + "spacing": 5, // Gaps between modules (4px) + + "modules-left": [ + //"custom/rofi", + "hyprland/workspaces", + //"hyprland/submap", + "temperature", + //"idle_inhibitor", + //"mpd" + "custom/media" + ], + "modules-center": [ + //"hyprland/window" + "clock#date", + "custom/weather" + //"custom/gammastep" + ], + "modules-right": [ + "backlight", + "custom/storage", + "memory", + "cpu", + "battery", + //"pulseaudio", + "wireplumber", + "custom/screenshot_t", + "custom/power", + "tray" + ], + + + // ------------------------------------------------------------------------- + // Modules + // ------------------------------------------------------------------------- + + "custom/sp1": { + "format": " | ", + "tooltip": false + }, + "custom/sp2": { + "format": " |", + "tooltip": false + }, + + + "custom/rofi": { + "format": "īƒ‰", + "tooltip": false, + "on-click-right": "nwg-drawer", + "on-click": "wofi --show run", + "on-click-middle": "pkill -9 wofi" + }, + "custom/screenshot_t":{ + "format":"", + "on-click": "~/.config/hypr/scripts/screenshot_full", + "on-click-right":"~/.config/hypr/scripts/screenshot_area" + }, + + "clock#1": { + "format": " {:%a}", + "tooltip": false, + "on-click": "gsimplecal" + }, + "clock#2": { + "format": " {:%d-%h-%Y}", + "tooltip": false, + "on-click": "gsimplecal" + }, + "clock#3": { + "format": " {:%H:%M:%S %p}", + "tooltip": false, + "on-click": "gsimplecal" + }, + + "temperature": { + // "thermal-zone": 1, + "interval": 4, + //"hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input", + "critical-threshold": 80, + // "format-critical": " {temperatureC}°C", + "format-critical": "īą {temperatureC}°C", + "format": "{icon} {temperatureC}°C", + "format-icons": ["īĢ", "", "īŠ"], + "max-length": 7, + "min-length": 7, + "on-click": "xsensors" + }, + + "memory": { + "interval": 30, + "format": "ī‹› {used:0.2f} / {total:0.0f} GB", + "on-click": "alacritty -e btop" + }, + + "battery": { + "interval": 2, + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": "ī–ƒ {capacity}%", + "format-plugged": "ī‡Ļ {capacity}%", + "format-icons": [ + "", + "ī‰ƒ", + "", + "", + "" + ] + }, + "network": { + "format-wifi": "ī‡Ģ {essid} ({signalStrength}%)", + "format-ethernet": "{ifname}: {ipaddr}/{cidr} īž–", + "format-linked": "{ifname} (No IP) īž–", + "format": "", + "format-disconnected": "īš”", + "format-alt": "{ifname}: {ipaddr}/{cidr}", + "on-click": "wl-copy $(ip address show up scope global | grep inet | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c5-)", + "on-click-right": "wl-copy $(ip address show up scope global | grep inet6 | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c6-)", + "tooltip-format": "ī‚“ {bandwidthUpBits}  {bandwidthDownBits}\n{ifname}\n{ipaddr}/{cidr}\n", + "tooltip-format-wifi": "ī‡Ģ {essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}\nī‚“ {bandwidthUpBits}  {bandwidthDownBits}", + "interval": 10 + }, + "custom/storage": { + "format": "ī‚  {}", + "format-alt": "{percentage}% ī‚ ", + "format-alt-click": "click-right", + "return-type": "json", + "interval": 60, + "exec": "~/.config/waybar/modules/storage.sh" + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon} {percent}%", + "format-alt": "{percent}% {icon}", + "format-alt-click": "click-right", + //"format-icons": ["īƒĢ", "ī ´"], + "format-icons": ["", "ī„‘"], + "on-scroll-down": "brightnessctl s 5%-", + "on-scroll-up": "brightnessctl s +5%" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "īŽ", + "deactivated": "" + }, + "tooltip": "true" + }, + "custom/weather": { + "format": "{}", + "format-alt": "{alt}: {}", + "format-alt-click": "click-right", + "interval": 3600, + "exec": "curl -s 'https://wttr.in/?format=1'", + //"return-type": "json", + //"exec": "~/.config/waybar/modules/weather.sh", + "exec-if": "ping wttr.in -c1" + }, + "custom/pacman": { + "format": "ô†˛ {}", + "interval": 3600, // every hour + "exec": "checkupdates | wc -l", // # of updates + "exec-if": "exit 0", // always run; consider advanced run conditions + "on-click": "alacritty -e 'paru'; pkill -SIGRTMIN+8 waybar", // update system + "signal": 8, + "max-length": 5, + "min-length": 3 + }, + + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "ī†ŧ", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + }, + + "custom/power": { + "format": "", + "tooltip": false, + "on-click": "wlogout" + }, + + "clock": { + "format": " {:%H:%M  %e %b}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "today-format": "{}" + }, + + "clock#date": { + "format": "â¤ī¸ {:%H:%M  %e %b}", // Icon: calendar-alt + //"format": "{:%I:%M %p %A %b %d}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "today-format": "{}" + }, + + "custom/gammastep": { + "interval": 5, + "return-type": "json", + "exec": { + "pre": "if unit_status=\"$(systemctl --user is-active gammastep)\"; then\nstatus=\"$unit_status ($(journalctl --user -u gammastep.service -g 'Period: ' | tail -1 | cut -d ':' -f6 | xargs))\"\nelse\nstatus=\"$unit_status\"\nfi", + "alt": "${status:-inactive}", + "tooltip": "Gammastep is $status", + }, + "format": "{icon}", + "format-icons": { + "activating": "ķ°Ē ", + "deactivating": "ķ°Ē ", + "inactive": "? ", + "active (Night)": " ", + "active (Nighttime)": " ", + "active (Transition (Night)": " ", + "active (Transition (Nighttime)": " ", + "active (Day)": " ", + "active (Daytime)": " ", + "active (Transition (Day)": " ", + "active (Transition (Daytime)": " ", + }, + "on-click": "systemctl --user is-active gammastep && systemctl --user stop gammastep || systemctl --user start gammastep", + }, + + "cpu": { + "interval": 1, + //"format": "ī‹› {}%", // Icon: microchip + "format": "{max_frequency}GHz | {usage}%", + "max-length": 13, + "min-length": 13 + }, + + "mpd": { + "max-length": 25, + "format": " {title}", + "format-paused": " {title}", + "format-stopped": "", + "format-disconnected": "", + "on-click": "mpc --quiet toggle", + "on-click-right": "mpc update; mpc ls | mpc add", + "on-click-middle": "alacritty -e ncmpcpp", + "on-scroll-up": "mpc --quiet prev", + "on-scroll-down": "mpc --quiet next", + "smooth-scrolling-threshold": 5, + "tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})" + }, + + "custom/title": { + "format": "{}", + "interval": 0, + "return-type": "json", + //"max-length": 35, + "tooltip": false + }, + + "custom/title#name": { + "format": "{}", + "interval": 0, + "return-type": "json", + + "max-length": 35, + "exec": "$HOME/.scripts/title" + }, + + /*"custom/keyboard": { + "format": "ī„œ {}", + "interval": 1, + "exec": "$HOME/.config/waybar/get_kbdlayout.sh" + },*/ + + "hyprland/workspaces": { + "all-outputs": true, + "format": "{name}", + "format-icons": { + "1": "一", + "2": "äēŒ", + "3": "三", + "4": "四", + "5": "äē”", + "6": "六", + "7": "七", + "8": "å…Ģ", + "9": "䚝", + "10": "十", + }, + "on-scroll-up": "hyprctl dispatch workspace e+1 1>/dev/null", + "on-scroll-down": "hyprctl dispatch workspace e-1 1>/dev/null", + "sort-by-number": true, + "active-only": false, + }, + + "hyprland/window": { + "max-length": 100, + "separate-outputs": true + }, + + "pulseaudio": { + "scroll-step": 3, // %, can be a float + "format": "{icon} {volume}% {format_source}", + "format-bluetooth": "{volume}% {icon}īŠ” {format_source}", + "format-bluetooth-muted": "īšŠ {icon}īŠ” {format_source}", + "format-muted": "īšŠ {format_source}", + //"format-source": "{volume}% ī„°", + //"format-source-muted": "ī„ą", + "format-source": "ī„°", + "format-source-muted": "ī„ą", + "format-icons": { + "headphone": "ī€Ĩ", + "hands-free": "", + "headset": "", + "phone": "ī‚•", + "portable": "ī‚•", + "car": "ī†š", + "default": ["ī€Ļ", "", ""] + }, + "on-click": "pavucontrol", + "on-click-right": "amixer sset Master toggle" + }, + + "wireplumber": { + "on-click": "pavucontrol", + "on-click-right": "amixer sset Master toggle 1>/dev/null", + //on-click: "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"; + //on-scroll-down: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04+"; + //on-scroll-up: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04-"; + "format": "{icon} {volume}%", + "format-muted": "īšŠ ", + "format-source": "ī„°", + "format-source-muted": "ī„ą", + //"format-muted": "ī‘Ļ ", + //"format-icons": [ "" ] + "format-icons": { + "headphone": "ī€Ĩ ", + "hands-free": " ", + "headset": " ", + "phone": "ī‚• ", + "portable": "ī‚• ", + "car": "ī†š ", + "default": ["ī€Ļ ", " ", " "] + }, + }, + + "tray": { + "icon-size": 15, + "spacing": 5 + } +} diff --git a/waybar/.config/waybar/mediaplayer.py b/waybar/.config/waybar/mediaplayer.py new file mode 100755 index 0000000..03dbdeb --- /dev/null +++ b/waybar/.config/waybar/mediaplayer.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python3 +import argparse +import logging +import sys +import signal +import gi +import json +gi.require_version('Playerctl', '2.0') +from gi.repository import Playerctl, GLib + +logger = logging.getLogger(__name__) + + +def write_output(text, player): + logger.info('Writing output') + + 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 on_play(player, status, manager): + logger.info('Received new playback status') + on_metadata(player, player.props.metadata, manager) + + +def on_metadata(player, metadata, manager): + logger.info('Received new metadata') + track_info = '' + + if player.props.player_name == 'spotify' and \ + 'mpris:trackid' in metadata.keys() and \ + ':ad:' in player.props.metadata['mpris:trackid']: + track_info = 'AD PLAYING' + elif player.get_artist() != '' and player.get_title() != '': + track_info = '{artist} - {title}'.format(artist=player.get_artist(), + title=player.get_title()) + else: + track_info = player.get_title() + + if player.props.status != 'Playing' and track_info: + track_info = 'īŠ‹ ' + track_info + write_output(track_info, player) + + +def on_player_appeared(manager, player, selected_player=None): + if player is not None and (selected_player is None or player.name == selected_player): + init_player(manager, player) + else: + logger.debug("New player appeared, but it's not the selected player, skipping") + + +def on_player_vanished(manager, player): + logger.info('Player has vanished') + sys.stdout.write('\n') + sys.stdout.flush() + + +def init_player(manager, name): + logger.debug('Initialize player: {player}'.format(player=name.name)) + player = Playerctl.Player.new_from_name(name) + player.connect('playback-status', on_play, manager) + player.connect('metadata', on_metadata, manager) + manager.manage_player(player) + on_metadata(player, player.props.metadata, manager) + + +def signal_handler(sig, frame): + logger.debug('Received signal to stop, exiting') + sys.stdout.write('\n') + sys.stdout.flush() + # loop.quit() + sys.exit(0) + + +def parse_arguments(): + parser = argparse.ArgumentParser() + + # Increase verbosity with every occurance of -v + parser.add_argument('-v', '--verbose', action='count', default=0) + + # Define for which player we're listening + parser.add_argument('--player') + + return parser.parse_args() + + +def main(): + arguments = parse_arguments() + + # Initialize logging + logging.basicConfig(stream=sys.stderr, level=logging.DEBUG, + format='%(name)s %(levelname)s %(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)) + + # Log the sent command line arguments + logger.debug('Arguments received {}'.format(vars(arguments))) + + manager = Playerctl.PlayerManager() + loop = GLib.MainLoop() + + manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player)) + manager.connect('player-vanished', on_player_vanished) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + for player in manager.props.player_names: + if arguments.player is not None and arguments.player != player.name: + logger.debug('{player} is not the filtered player, skipping it' + .format(player=player.name) + ) + continue + + init_player(manager, player) + + loop.run() + + +if __name__ == '__main__': + main() + diff --git a/waybar/.config/waybar/modules/mail.py b/waybar/.config/waybar/modules/mail.py new file mode 100755 index 0000000..31958f7 --- /dev/null +++ b/waybar/.config/waybar/modules/mail.py @@ -0,0 +1,43 @@ +#!/usr/bin/python + +import os +import imaplib + +import mailsecrets + +def getmails(username, password, server): + imap = imaplib.IMAP4_SSL(server, 993) + imap.login(username, password) + imap.select('INBOX') + ustatus, uresponse = imap.uid('search', None, 'UNSEEN') + if ustatus == 'OK': + unread_msg_nums = uresponse[0].split() + else: + unread_msg_nums = [] + + fstatus, fresponse = imap.uid('search', None, 'FLAGGED') + if fstatus == 'OK': + flagged_msg_nums = fresponse[0].split() + else: + flagged_msg_nums = [] + + return [len(unread_msg_nums), len(flagged_msg_nums)] + +ping = os.system("ping " + mailsecrets.server + " -c1 > /dev/null 2>&1") +if ping == 0: + mails = getmails(mailsecrets.username, mailsecrets.password, mailsecrets.server) + text = '' + alt = '' + + if mails[0] > 0: + text = alt = str(mails[0]) + if mails[1] > 0: + alt = str(mails[1]) + "  " + alt + else: + exit(1) + + print('{"text":"' + text + '", "alt": "' + alt + '"}') + +else: + exit(1) + diff --git a/waybar/.config/waybar/modules/spotify.sh b/waybar/.config/waybar/modules/spotify.sh new file mode 100755 index 0000000..1d13620 --- /dev/null +++ b/waybar/.config/waybar/modules/spotify.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +class=$(playerctl metadata --player=spotify --format '{{lc(status)}}') +icon="ī†ŧ" + +if [[ $class == "playing" ]]; then + info=$(playerctl metadata --player=spotify --format '{{artist}} - {{title}}') + if [[ ${#info} > 40 ]]; then + info=$(echo $info | cut -c1-40)"..." + fi + text=$info" "$icon +elif [[ $class == "paused" ]]; then + text=$icon +elif [[ $class == "stopped" ]]; then + text="" +fi + +echo -e "{\"text\":\""$text"\", \"class\":\""$class"\"}" + diff --git a/waybar/.config/waybar/modules/storage.sh b/waybar/.config/waybar/modules/storage.sh new file mode 100755 index 0000000..90cc3dc --- /dev/null +++ b/waybar/.config/waybar/modules/storage.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +mount="/" +warning=20 +critical=10 + +df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical ' +/\/.*/ { + text=$4 + tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6 + use=$5 + exit 0 +} +END { + class="" + gsub(/%$/,"",use) + if ((100 - use) < critical) { + class="critical" + } else if ((100 - use) < warning) { + class="warning" + } + print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}" +} +' + diff --git a/waybar/.config/waybar/modules/weather.sh b/waybar/.config/waybar/modules/weather.sh new file mode 100755 index 0000000..2ddeee2 --- /dev/null +++ b/waybar/.config/waybar/modules/weather.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +cachedir=~/.cache/rbn +cachefile=${0##*/}-$1 + +if [ ! -d $cachedir ]; then + mkdir -p $cachedir +fi + +if [ ! -f $cachedir/$cachefile ]; then + touch $cachedir/$cachefile +fi + +# Save current IFS +SAVEIFS=$IFS +# Change IFS to new line. +IFS=$'\n' + +cacheage=$(($(date +%s) - $(stat -c '%Y' "$cachedir/$cachefile"))) +if [ $cacheage -gt 1740 ] || [ ! -s $cachedir/$cachefile ]; then + data=($(curl -s https://en.wttr.in/$1\?0qnT 2>&1)) + echo ${data[0]} | cut -f1 -d, > $cachedir/$cachefile + echo ${data[1]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile + echo ${data[2]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile +fi + +weather=($(cat $cachedir/$cachefile)) + +# Restore IFSClear +IFS=$SAVEIFS + +temperature=$(echo ${weather[2]} | sed -E 's/([[:digit:]])+\.\./\1 to /g') + +#echo ${weather[1]##*,} + +# https://fontawesome.com/icons?s=solid&c=weather +case $(echo ${weather[1]##*,} | tr '[:upper:]' '[:lower:]') in +"clear" | "sunny") + condition="" + ;; +"partly cloudy") + condition="īĒ”" + ;; +"cloudy") + condition="" + ;; +"overcast") + condition="" + ;; +"mist" | "fog" | "freezing fog") + condition="" + ;; +"patchy rain possible" | "patchy light drizzle" | "light drizzle" | "patchy light rain" | "light rain" | "light rain shower" | "rain") + condition="" + ;; +"moderate rain at times" | "moderate rain" | "heavy rain at times" | "heavy rain" | "moderate or heavy rain shower" | "torrential rain shower" | "rain shower") + condition="" + ;; +"patchy snow possible" | "patchy sleet possible" | "patchy freezing drizzle possible" | "freezing drizzle" | "heavy freezing drizzle" | "light freezing rain" | "moderate or heavy freezing rain" | "light sleet" | "ice pellets" | "light sleet showers" | "moderate or heavy sleet showers") + condition="ī­Ŋ" + ;; +"blowing snow" | "moderate or heavy sleet" | "patchy light snow" | "light snow" | "light snow showers") + condition="īĒ—" + ;; +"blizzard" | "patchy moderate snow" | "moderate snow" | "patchy heavy snow" | "heavy snow" | "moderate or heavy snow with thunder" | "moderate or heavy snow showers") + condition="ī°•" + ;; +"thundery outbreaks possible" | "patchy light rain with thunder" | "moderate or heavy rain with thunder" | "patchy light snow with thunder") + condition="" + ;; +*) + condition="īĒ" + echo -e "{\"text\":\""$condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}" + ;; +esac + +#echo $temp $condition + +echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}" + diff --git a/waybar/.config/waybar/old-config b/waybar/.config/waybar/old-config new file mode 100644 index 0000000..9f78d67 --- /dev/null +++ b/waybar/.config/waybar/old-config @@ -0,0 +1,92 @@ +{ + "layer": "top", + "position": "top", + "margin-bottom": 0, + "modules-left": [ + "clock", + "custom/separator", + "hyprland/workspaces", + "custom/separator", + "tray" + ], + "modules-center": [ + "hyprland/window" + ], + "modules-right": [ + "network", + "temperature", + "memory", + "cpu", + "pulseaudio", + "battery", + "custom/separator", + "custom/powermenu" + ], + "custom/separator": { + "exec": "echo \"|\"", + "format": "{}" + }, + "tray": { + "icon-size": 16, + "spacing": 8 + }, + "clock": { + "format": " {:%H:%M} ", + "interval": 60, + "tooltip": true, + "tooltip-format": "{:%d %B %H:%M}" + }, + "hyprland/workspaces": { + "format": "{icon}", + "separate-outputs": true, + "active-only": false, + "all-outputs": true + }, + "hyprland/window": { + "format": "{}" + }, + "network": { + "format": "ķ°–Š ", + "tooltip-format-ethernet": "{ifname} ", + "interface": "enp34s0", + "interval": 2 + }, + "temperature": { + "format": "{icon} {temperatureC}°C ", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + "format-icons": [ + "ī‹‹", + "", + "" + ] + }, + "memory": { + "format": "ķ°› {}% ", + "tooltip": "false" + }, + "cpu": { + "format": "ī’ŧ {usage}% ", + "tooltip": "false" + }, + "pulseaudio": { + "format": " {volume}%", + "scroll-step": 1, + "on-click": "pavucontrol" + }, + "battery": { + "format": "{capacity}% {icon}", + "format-icons": [ + "", + "ī‰ƒ", + "", + "", + "" + ] + }, + "custom/powermenu": { + "format": "  ", + "tooltip": false, + "on-click": "exec wlogout -p layer-shell" + } +} diff --git a/waybar/.config/waybar/old-config-hypr b/waybar/.config/waybar/old-config-hypr new file mode 100644 index 0000000..0e713b9 --- /dev/null +++ b/waybar/.config/waybar/old-config-hypr @@ -0,0 +1,367 @@ +{ + // ------------------------------------------------------------------------- + // Global configuration + // ------------------------------------------------------------------------- + + "layer": "top", + + "position": "top", + + //"height": 20, + + "margin-left": 10, + "margin-bottom": 0, + "margin-right": 10, + + "spacing": 5, // Gaps between modules (4px) + + "modules-left": [ + //"custom/rofi", + "hyprland/workspaces", + //"hyprland/submap", + "temperature", + //"idle_inhibitor", + //"mpd" + "custom/media" + ], + "modules-center": [ + //"hyprland/window" + "clock#date", + "custom/weather" + //"custom/gammastep" + ], + "modules-right": [ + "backlight", + "custom/storage", + "memory", + "cpu", + "battery", + //"pulseaudio", + "wireplumber", + "custom/screenshot_t", + "custom/power", + "tray" + ], + + + // ------------------------------------------------------------------------- + // Modules + // ------------------------------------------------------------------------- + + "custom/sp1": { + "format": " | ", + "tooltip": false + }, + "custom/sp2": { + "format": " |", + "tooltip": false + }, + + + "custom/rofi": { + "format": "īƒ‰", + "tooltip": false, + "on-click-right": "nwg-drawer", + "on-click": "wofi --show run", + "on-click-middle": "pkill -9 wofi" + }, + "custom/screenshot_t":{ + "format":"", + "on-click": "~/.config/hypr/scripts/screenshot_full", + "on-click-right":"~/.config/hypr/scripts/screenshot_area" + }, + + "clock#1": { + "format": " {:%a}", + "tooltip": false, + "on-click": "gsimplecal" + }, + "clock#2": { + "format": " {:%d-%h-%Y}", + "tooltip": false, + "on-click": "gsimplecal" + }, + "clock#3": { + "format": " {:%H:%M:%S %p}", + "tooltip": false, + "on-click": "gsimplecal" + }, + + "temperature": { + // "thermal-zone": 1, + "interval": 4, + //"hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input", + "critical-threshold": 80, + // "format-critical": " {temperatureC}°C", + "format-critical": "īą {temperatureC}°C", + "format": "{icon} {temperatureC}°C", + "format-icons": ["īĢ", "", "īŠ"], + "max-length": 7, + "min-length": 7, + "on-click": "xsensors" + }, + + "memory": { + "interval": 30, + "format": "ī‹› {used:0.2f} / {total:0.0f} GB", + "on-click": "alacritty -e btop" + }, + + "battery": { + "interval": 2, + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": "ī–ƒ {capacity}%", + "format-plugged": "ī‡Ļ {capacity}%", + "format-icons": [ + "", + "ī‰ƒ", + "", + "", + "" + ] + }, + "network": { + "format-wifi": "ī‡Ģ {essid} ({signalStrength}%)", + "format-ethernet": "{ifname}: {ipaddr}/{cidr} īž–", + "format-linked": "{ifname} (No IP) īž–", + "format": "", + "format-disconnected": "īš”", + "format-alt": "{ifname}: {ipaddr}/{cidr}", + "on-click": "wl-copy $(ip address show up scope global | grep inet | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c5-)", + "on-click-right": "wl-copy $(ip address show up scope global | grep inet6 | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c6-)", + "tooltip-format": "ī‚“ {bandwidthUpBits}  {bandwidthDownBits}\n{ifname}\n{ipaddr}/{cidr}\n", + "tooltip-format-wifi": "ī‡Ģ {essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}\nī‚“ {bandwidthUpBits}  {bandwidthDownBits}", + "interval": 10 + }, + "custom/storage": { + "format": "ī‚  {}", + "format-alt": "{percentage}% ī‚ ", + "format-alt-click": "click-right", + "return-type": "json", + "interval": 60, + "exec": "~/.config/waybar/modules/storage.sh" + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon} {percent}%", + "format-alt": "{percent}% {icon}", + "format-alt-click": "click-right", + //"format-icons": ["īƒĢ", "ī ´"], + "format-icons": ["", "ī„‘"], + "on-scroll-down": "brightnessctl s 5%-", + "on-scroll-up": "brightnessctl s +5%" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "īŽ", + "deactivated": "" + }, + "tooltip": "true" + }, + "custom/weather": { + "format": "{}", + "format-alt": "{alt}: {}", + "format-alt-click": "click-right", + "interval": 3600, + "exec": "curl -s 'https://wttr.in/?format=1'", + //"return-type": "json", + //"exec": "~/.config/waybar/modules/weather.sh", + "exec-if": "ping wttr.in -c1" + }, + "custom/pacman": { + "format": "ô†˛ {}", + "interval": 3600, // every hour + "exec": "checkupdates | wc -l", // # of updates + "exec-if": "exit 0", // always run; consider advanced run conditions + "on-click": "alacritty -e 'paru'; pkill -SIGRTMIN+8 waybar", // update system + "signal": 8, + "max-length": 5, + "min-length": 3 + }, + + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "ī†ŧ", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + }, + + "custom/power": { + "format": "", + "tooltip": false, + "on-click": "wlogout" + }, + + "clock": { + "format": " {:%H:%M  %e %b}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "today-format": "{}" + }, + + "clock#date": { + "format": "â¤ī¸ {:%H:%M  %e %b}", // Icon: calendar-alt + //"format": "{:%I:%M %p %A %b %d}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "today-format": "{}" + }, + + "custom/gammastep": { + "interval": 5, + "return-type": "json", + "exec": { + "pre": "if unit_status=\"$(systemctl --user is-active gammastep)\"; then\nstatus=\"$unit_status ($(journalctl --user -u gammastep.service -g 'Period: ' | tail -1 | cut -d ':' -f6 | xargs))\"\nelse\nstatus=\"$unit_status\"\nfi", + "alt": "${status:-inactive}", + "tooltip": "Gammastep is $status", + }, + "format": "{icon}", + "format-icons": { + "activating": "ķ°Ē ", + "deactivating": "ķ°Ē ", + "inactive": "? ", + "active (Night)": " ", + "active (Nighttime)": " ", + "active (Transition (Night)": " ", + "active (Transition (Nighttime)": " ", + "active (Day)": " ", + "active (Daytime)": " ", + "active (Transition (Day)": " ", + "active (Transition (Daytime)": " ", + }, + "on-click": "systemctl --user is-active gammastep && systemctl --user stop gammastep || systemctl --user start gammastep", + }, + + "cpu": { + "interval": 1, + //"format": "ī‹› {}%", // Icon: microchip + "format": "{max_frequency}GHz | {usage}%", + "max-length": 13, + "min-length": 13 + }, + + "mpd": { + "max-length": 25, + "format": " {title}", + "format-paused": " {title}", + "format-stopped": "", + "format-disconnected": "", + "on-click": "mpc --quiet toggle", + "on-click-right": "mpc update; mpc ls | mpc add", + "on-click-middle": "alacritty -e ncmpcpp", + "on-scroll-up": "mpc --quiet prev", + "on-scroll-down": "mpc --quiet next", + "smooth-scrolling-threshold": 5, + "tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})" + }, + + "custom/title": { + "format": "{}", + "interval": 0, + "return-type": "json", + //"max-length": 35, + "tooltip": false + }, + + "custom/title#name": { + "format": "{}", + "interval": 0, + "return-type": "json", + + "max-length": 35, + "exec": "$HOME/.scripts/title" + }, + + /*"custom/keyboard": { + "format": "ī„œ {}", + "interval": 1, + "exec": "$HOME/.config/waybar/get_kbdlayout.sh" + },*/ + + "hyprland/workspaces": { + "all-outputs": true, + "format": "{name}", + "format-icons": { + "1": "一", + "2": "äēŒ", + "3": "三", + "4": "四", + "5": "äē”", + "6": "六", + "7": "七", + "8": "å…Ģ", + "9": "䚝", + "10": "十", + }, + "on-scroll-up": "hyprctl dispatch workspace e+1 1>/dev/null", + "on-scroll-down": "hyprctl dispatch workspace e-1 1>/dev/null", + "sort-by-number": true, + "active-only": false, + }, + + "hyprland/window": { + "max-length": 100, + "separate-outputs": true + }, + + "pulseaudio": { + "scroll-step": 3, // %, can be a float + "format": "{icon} {volume}% {format_source}", + "format-bluetooth": "{volume}% {icon}īŠ” {format_source}", + "format-bluetooth-muted": "īšŠ {icon}īŠ” {format_source}", + "format-muted": "īšŠ {format_source}", + //"format-source": "{volume}% ī„°", + //"format-source-muted": "ī„ą", + "format-source": "ī„°", + "format-source-muted": "ī„ą", + "format-icons": { + "headphone": "ī€Ĩ", + "hands-free": "", + "headset": "", + "phone": "ī‚•", + "portable": "ī‚•", + "car": "ī†š", + "default": ["ī€Ļ", "", ""] + }, + "on-click": "pavucontrol", + "on-click-right": "amixer sset Master toggle" + }, + + "wireplumber": { + "on-click": "pavucontrol", + "on-click-right": "amixer sset Master toggle 1>/dev/null", + //on-click: "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"; + //on-scroll-down: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04+"; + //on-scroll-up: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04-"; + "format": "{icon} {volume}%", + "format-muted": "īšŠ ", + "format-source": "ī„°", + "format-source-muted": "ī„ą", + //"format-muted": "ī‘Ļ ", + //"format-icons": [ "" ] + "format-icons": { + "headphone": "ī€Ĩ ", + "hands-free": " ", + "headset": " ", + "phone": "ī‚• ", + "portable": "ī‚• ", + "car": "ī†š ", + "default": ["ī€Ļ ", " ", " "] + }, + }, + + "tray": { + "icon-size": 15, + "spacing": 5 + } +} diff --git a/waybar/.config/waybar/old-style.css b/waybar/.config/waybar/old-style.css new file mode 100644 index 0000000..a3fbfc9 --- /dev/null +++ b/waybar/.config/waybar/old-style.css @@ -0,0 +1,64 @@ +* { + font-family: "Fira Code"; +} + +#waybar { + background: #171717; + color: #fff; +} + +#clock { + color: #fff; +} + +#tray { + padding-left: 2px; +} + +#workspaces button:hover { + background-color: transparent; +} + +#workspaces button { + color: #737373; + padding-left: 2px; + padding-right: 2px; + border: none; +} + +#workspaces button.active { + color: #84cc16; +} + +#window { + color: #fff; +} + +#network { + color: #3b82f6; + margin-right: 8px; +} + +#pulseaudio { + color: #14b8a6; + margin-right: 4px; +} + +#cpu { + color: #0ea5e9; + margin-right: 4px; +} + +#temperature { + color: #eab308; + margin-right: 4px; +} + +#memory { + color: #d946ef; + margin-right: 4px; +} + +#custom-powermenu { + color: #f43f5e; +} diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css new file mode 100644 index 0000000..ce9310f --- /dev/null +++ b/waybar/.config/waybar/style.css @@ -0,0 +1,68 @@ +* { + font-family: "Fira Code"; +} + +#waybar { + background: #171717; + color: #fff; +} + +#clock { + color: #fff; +} + +#tray { + padding-left: 4px; +} + +#workspaces button:hover { + background-color: transparent; +} + +#workspaces button { + color: #737373; + padding-left: 4px; + padding-right: 4px; + border-radius: 0px; +} + +#workspaces button:hover { + background-color: #262626; +} + +#workspaces button.active { + color: #84cc16; +} + +#window { + color: #fff; +} + +#network { + color: #3b82f6; + margin-right: 8px; +} + +#pulseaudio { + color: #14b8a6; + margin-right: 4px; +} + +#cpu { + color: #0ea5e9; + margin-right: 4px; +} + +#temperature { + color: #eab308; + margin-right: 4px; +} + +#memory { + color: #d946ef; + margin-right: 4px; +} + +#custom-powermenu { + color: #f43f5e; +} diff --git a/waybar/.config/waybar/waybar.sh b/waybar/.config/waybar/waybar.sh new file mode 100755 index 0000000..720620c --- /dev/null +++ b/waybar/.config/waybar/waybar.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +# Terminate already running bar instances +killall -q waybar + +# Wait until the processes have been shut down +while pgrep -x waybar >/dev/null; do sleep 1; done + +# Launch main +waybar diff --git a/wofi/.config/wofi/config b/wofi/.config/wofi/config new file mode 100644 index 0000000..f420906 --- /dev/null +++ b/wofi/.config/wofi/config @@ -0,0 +1,15 @@ +show=drun +width=40% +height=50% +prompt=Search... +normal_window=true +location=center +gtk-dark=true +allow_images=true +image_size=32 +insensitive=true +allow_markup=true +no_actions=true +orientation=vertical +halign=fill +content_halign=fill \ No newline at end of file diff --git a/wofi/.config/wofi/style.css b/wofi/.config/wofi/style.css new file mode 100644 index 0000000..bde6edf --- /dev/null +++ b/wofi/.config/wofi/style.css @@ -0,0 +1,40 @@ +window { + background-color: #171717; +} + +* { + font-family: "Fira Code"; + color: #fff; +} + +#scroll { + padding: 0.5rem; +} + +#input { + background-color: #262626; + outline: none; + box-shadow: none; + border: 0; + border-radius: 0; + font-size: 1rem; + padding: 0.5rem; +} + +#inner-box { + margin: 0.5rem; + font-size: 1rem; +} + +#img { + margin: 10px 10px; +} + +#entry { + border-radius: 0.5rem; +} + +#entry:selected { + background-color: #262626; + outline: none; +} -- cgit v1.2.3