3 Commits

22 changed files with 362 additions and 523 deletions

36
clipse/config.json Normal file
View File

@@ -0,0 +1,36 @@
{
"allowDuplicates": false,
"historyFile": "$XDG_DATA_HOME/clipse/clipboard_history.json",
"maxHistory": 100,
"logFile": "$XDG_DATA_HOME/clipse/clipse.log",
"themeFile": "custom_theme.json",
"tempDir": "$XDG_DATA_HOME/clipse/tmp_files",
"keyBindings": {
"choose": "enter",
"clearSelected": "S",
"down": "down",
"end": "end",
"filter": "/",
"home": "home",
"more": "?",
"nextPage": "right",
"prevPage": "left",
"preview": " ",
"quit": "q",
"remove": "x",
"selectDown": "ctrl+down",
"selectSingle": "s",
"selectUp": "ctrl+up",
"togglePin": "p",
"togglePinned": "tab",
"up": "up",
"yankFilter": "ctrl+s"
},
"imageDisplay": {
"type": "basic",
"scaleX": 9,
"scaleY": 9,
"heightCut": 2
}
}

28
clipse/custom_theme.json Normal file
View File

@@ -0,0 +1,28 @@
{
"useCustomTheme": false,
"TitleFore": "#ffffff",
"TitleBack": "#6F4CBC",
"TitleInfo": "#3498db",
"NormalTitle": "#ffffff",
"DimmedTitle": "#808080",
"SelectedTitle": "#FF69B4",
"NormalDesc": "#808080",
"DimmedDesc": "#808080",
"SelectedDesc": "#FF69B4",
"StatusMsg": "#2ecc71",
"PinIndicatorColor": "#FFD700",
"SelectedBorder": "#3498db",
"SelectedDescBorder": "#3498db",
"FilteredMatch": "#ffffff",
"FilterPrompt": "#2ecc71",
"FilterInfo": "#3498db",
"FilterText": "#ffffff",
"FilterCursor": "#FFD700",
"HelpKey": "#999999",
"HelpDesc": "#808080",
"PageActiveDot": "#3498db",
"PageInactiveDot": "#808080",
"DividerDot": "#3498db",
"PreviewedText": "#ffffff",
"PreviewBorder": "#3498db"
}

View File

@@ -5,8 +5,8 @@ ttyname $GPG_TTY
default-cache-ttl 60 default-cache-ttl 60
max-cache-ttl 120 max-cache-ttl 120
#pinentry-program /usr/bin/pinentry-curses #pinentry-program /usr/bin/pinentry-curses
#pinentry-program /usr/bin/pinentry-gnome3 pinentry-program /usr/bin/pinentry-gnome3
pinentry-program /usr/bin/pinentry-tty #pinentry-program /usr/bin/pinentry-tty
#pinentry-program /usr/bin/pinentry-x11 #pinentry-program /usr/bin/pinentry-x11
#pinentry-program /usr/local/bin/pinentry-curses #pinentry-program /usr/local/bin/pinentry-curses

View File

@@ -6,10 +6,12 @@
# Autostart necessary processes (like notifications daemons, status bars, etc.) # Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this: # Or execute your favorite apps at launch like this:
exec-once = pidof hyprpaper | uwsm app -- hyprpaper
exec-once = pidof hypridle | uwsm app -- hypridle
exec-once = uwsm app -- elephant exec-once = uwsm app -- elephant
exec-once = uwsm app -- hyprpaper
exec-once = uwsm app -- swaync exec-once = uwsm app -- swaync
exec-once = uwsm app -- walker --gapplication-service & exec-once = uwsm app -- walker --gapplication-service &
exec-once = uwsm app -- waybar exec-once = uwsm app -- waybar
exec-once = clipse -listen

34
hypr/hypridle.conf Normal file
View File

@@ -0,0 +1,34 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
}
listener {
timeout = 150 # 2.5min.
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = brightnessctl -r # monitor backlight restore.
}
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
listener {
timeout = 150 # 2.5min.
on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
}
listener {
timeout = 300 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 330 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected after timeout has fired.
}
listener {
timeout = 1800 # 30min
on-timeout = systemctl suspend # suspend pc
}

View File

@@ -39,7 +39,7 @@ source = ~/.config/hypr/autostart.conf
# https://wiki.hyprland.org/Configuring/Variables/#general # https://wiki.hyprland.org/Configuring/Variables/#general
general { general {
gaps_in = 2 gaps_in = 2
gaps_out = 5 gaps_out = 3
border_size = 1 border_size = 1
@@ -53,7 +53,7 @@ general {
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false allow_tearing = false
layout = master layout = dwindle # or master
} }
# https://wiki.hyprland.org/Configuring/Variables/#decoration # https://wiki.hyprland.org/Configuring/Variables/#decoration
@@ -112,21 +112,15 @@ animations {
animation = workspacesOut, 1, 1.94, almostLinear, fade animation = workspacesOut, 1, 1.94, almostLinear, fade
} }
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
# windowrule = rounding 0, floating:0, onworkspace:f[1]
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle { dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + SHIFT + P in the keybinds section below
preserve_split = true # You probably want this preserve_split = true # You probably want this
force_split = 2 # always split to the right or bottom force_split = 2 # always split to the right or bottom
split_width_multiplier = 1.25
use_active_for_splits = false
default_split_ratio = 1.25
split_bias = 0
} }
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more

View File

@@ -22,6 +22,9 @@ $pwa = ~/.local/bin/launch-webapp
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
# NOTE: TUI's / window rules aren't working with ghostty when you try to target the class
# or title so those should be opened with kitty until I can figure out what's happening.
# Apps # Apps
bind = $mainMod, Space, exec, $menu # launcher (set above) bind = $mainMod, Space, exec, $menu # launcher (set above)
bind = $mainMod, Return, exec, $terminal bind = $mainMod, Return, exec, $terminal
@@ -36,17 +39,19 @@ bind = $mainMod, F, exec, $fileManager
#bind = $mainMod, K, exec, $launch Komodo #bind = $mainMod, K, exec, $launch Komodo
bind = $mainMod SHIFT, F, exec, $fileBrowser bind = $mainMod SHIFT, F, exec, $fileBrowser
bind = $mainMod, G, exec, $pwa "https://git.housh.dev" bind = $mainMod, G, exec, $pwa "https://git.housh.dev"
bind = $mainMod, M, exec, ~/.local/bin/toggle-waybar
bind = $mainMod, N, exec, $terminal -e nvim bind = $mainMod, N, exec, $terminal -e nvim
bind = $mainMod, P, exec, $pwa "https://pass.proton.me" bind = $mainMod, P, exec, $pwa "https://pass.proton.me"
bind = $mainMod SHIFT, P, pseudo, # dwindle
bind = $mainMod, Y, exec, $pwa "https://youtube.com" bind = $mainMod, Y, exec, $pwa "https://youtube.com"
bind = $mainMod, V, exec, kitty --class clipse -e clipse
bind = $mainMod, W, killactive, bind = $mainMod, W, killactive,
bind = $mainMod SHIFT, R, exec, ~/.local/bin/waybar-restart bind = $mainMod SHIFT, R, exec, ~/.local/bin/waybar-restart
# TODO: change modifier key. # TODO: change modifier key.
#bind = $mainMod SHIFT, L, exec, hyprlock #bind = $mainMod SHIFT, L, exec, hyprlock
# TODO: change modifier key. # TODO: change modifier key.
bind = $mainMod, M, exec, ~/.local/bin/toggle-waybar #bind = $mainMod, V, togglefloating
bind = $mainMod, V, togglefloating
#bind = $mainMod, P, pseudo, # dwindle #bind = $mainMod, P, pseudo, # dwindle
#bind = $mainMod, J, togglesplit, # dwindle #bind = $mainMod, J, togglesplit, # dwindle
# #

View File

@@ -9,6 +9,11 @@
# Force bluetooth settings to be a floating window # Force bluetooth settings to be a floating window
windowrule = float, class:^(blueberry.py)$ windowrule = float, class:^(blueberry.py)$
# Clipboard history tui in floating window.
windowrule = float, class:(clipse)
windowrule = size 622 652, class:(clipse)
windowrule = stayfocused, class:(clipse)
windowrule = float,class:^(float)$ windowrule = float,class:^(float)$
windowrule = size 800 600,class:^(float)$,title:^(Install Web App)$ windowrule = size 800 600,class:^(float)$,title:^(Install Web App)$

View File

@@ -0,0 +1,14 @@
# Set work spaces 1-5 to be on external monitor
workspace = 1, monitor:1
workspace = 2, monitor:1
workspace = 3, monitor:1
workspace = 4, monitor:1
workspace = 5, monitor:1
# Set work spaces 6-10 to be on internal monitor
workspace = 6, monitor:0
workspace = 7, monitor:0
workspace = 8, monitor:0
workspace = 9, monitor:0
workspace = 10, monitor:0

View File

@@ -1,2 +1,3 @@
-- bootstrap lazy.nvim, LazyVim and your plugins -- bootstrap lazy.nvim, LazyVim and your plugin
vim.g.netrw_browsex_viewer = "xdg-open"
require("config.lazy") require("config.lazy")

View File

@@ -14,6 +14,19 @@ createCmd("BufEnter", {
end, end,
}) })
-- Hyprlang LSP
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = { "*.hl", "hypr*.conf" },
callback = function(event)
print(string.format("starting hyprls for %s", vim.inspect(event)))
vim.lsp.start({
name = "hyprlang",
cmd = { "hyprls" },
root_dir = vim.fn.getcwd(),
})
end,
})
-- Markdown -- Markdown
-- createCmd("BufWritePost", { -- createCmd("BufWritePost", {
-- pattern = { "*.md", "*.markdown" }, -- pattern = { "*.md", "*.markdown" },

View File

@@ -1,4 +0,0 @@
#/bin/bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
chmod -R go-w "$(/opt/homebrew/bin/brew --prefix)"

77
scripts/install-pkg-arch.sh Executable file
View File

@@ -0,0 +1,77 @@
#!/bin/bash
# Installs required packages / applications when setting up a new
# arch linux with hyprland machine.
if ! command -v yay >/dev/null 2>&1; then
sudo pacman -S --noconfirm --needed git base-devel
git clone https://aur.archlinux.org/yay.git ~/yay
cd ~/yay
makepkg -si
rm -rf ~/yay
fi
# Basics
yay -S --noconfirm --needed \
asahi-desktop-meta \
base-devel \
bat \
btop \
catppuccin-gtk-theme-mocha \
eza \
fastfetch \
fzf \
git \
github-cli \
gum \
hyprpaper \
hyrpidle \
hyprlock \
neovim \
nwg-look \
pcsc-controls \
starship \
swaync \
tmux \
zoxide \
zsh
# Terminals
yay -S --noconfirm ghostty-git kitty
# Clipboard history utility
yay -S --noconfirm clipse wl-clipboard
# Menu bar
yay -S --noconfirm waybar
# Fonts
yay -S --noconfirm \
ttf-jetbrains-mono-nerd \
ttf-firacode \
ttf-inconsolata-nerd
# Application launcher
yay -S --noconfirm walker elephant
# Bluetooth management
yay -S --noconfirm blueberry-wayland
# terminal based password manager.
yay -S --noconfirm gopass-git git-credential-gopass
# Audio stuff
yay -S --noconfirm pipewire \
pavucontrol \
wireplumber \
pipewire-jack \
pipewire-pulse
# Browsers
yay -S --noconfirm zen-browser-bin chromium
# File managers / explorers
yay -S --noconfirm yazi nautilus
# Email
yay -S --noconfirm thunderbird

View File

@@ -1,22 +0,0 @@
#!/bin/sh
set -e
# Installs launchd agents.
agent_dir="${HOME}/Library/LaunchAgents"
uid="$(id -u "$(whoami)")"
mkdir -p "$agent_dir"
for file in "${DOTFILES}"/macOS/LaunchAgents/*.plist; do
# get just the base file name, similar to using `basename` but w/o a subshell
filename="${file##*/}"
path="${agent_dir}/${filename}"
echo "$filename"
if ! test -e "${path}"; then
echo "Installing Agent: ${filename}"
cp "${file}" "${path}"
launchctl enable "user/${uid}/${filename}"
fi
done

8
scripts/setup-dirs.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
# Set up clipse (clipboard history) storage directories / files.
mkdir -p ~/.local/share/clipse/tmp_files
touch ~/.local/share/clipse/clipboard_history.json
chmod 600 ~/.local/share/clipse/clipboard_history.json

View File

@@ -1,103 +0,0 @@
#!/bin/bash
# sets default settings for macOS
# change screen capture / screenshot location
defaults write com.apple.screencapture location -string "$SCREENSHOTS"
# save screenshots in png format
defaults write com.apple.screencapture type -string "png"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# Set Home as the default location for new Finder windows
defaults write com.apple.finder NewWindowTarget -string "PfHm"
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"
# Show icons for hard drives, servers, and removable media on the desktop
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Keep folders on top when sorting by name
defaults write com.apple.finder _FXSortFoldersFirst -bool true
# When performing a search, search the current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Avoid creating .DS_Store files on network or USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Use column view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `Nlsv`, `glyv`
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Show the ~/Library folder
#chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
# Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
# Enable Secure Keyboard Entry in Terminal.app
# See: https://security.stackexchange.com/a/47786/8918
defaults write com.apple.terminal SecureKeyboardEntry -bool true
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Disable local Time Machine backups
# hash tmutil &> /dev/null && sudo tmutil disablelocal
# kill affected apps
for app in "Main" \
"Photos" \
"Finder" \
"SystemUIServer"; do
killall "${app}" &> /dev/null
done
echo "Done. Some changes require a restart to take effect."

View File

@@ -0,0 +1 @@
/usr/lib/systemd/user/hypridle.service

View File

@@ -0,0 +1 @@
/usr/lib/systemd/user/hyprpaper.service

View File

@@ -1,135 +1,65 @@
// -*- mode: jsonc -*- // -*- mode: jsonc -*-
{ {
"reload_style_on_change": true, "layer": "top",
"layer": "top", // Waybar at top layer "position": "top",
"position": "top", // Waybar position (top|bottom|left|right) "modules-left": ["hyprland/workspaces"],
"height": 26, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": [
"hyprland/workspaces",
"sway/mode",
"sway/scratchpad",
"custom/media",
],
"modules-center": ["clock"], "modules-center": ["clock"],
"modules-right": [ "modules-right": [
"mpd",
"idle_inhibitor",
"pulseaudio", "pulseaudio",
"tray", "tray",
"network",
"cpu", "cpu",
"memory", "memory",
"temperature",
"backlight",
"battery", "battery",
"custom/power", "network",
"custom/lock",
], ],
"hyprland/workspaces": { "hyprland/workspaces": {
"on-click": "activate", "format": "{name}: {icon}",
"format": "{icon}",
"format-icons": { "format-icons": {
"default": "", "active": "",
"1": "1", "default": "",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"active": "󱓻",
},
// "persistent-workspaces": {
// "1": [],
// "2": [],
// "3": [],
// "4": [],
// "5": [],
// },
},
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 5,
"consume-icons": {
"on": " ",
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " ",
},
"repeat-icons": {
"on": " ",
},
"single-icons": {
"on": "1 ",
},
"state-icons": {
"paused": "",
"playing": "",
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)",
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": "",
}, },
}, },
"tray": { "tray": {
// "icon-size": 21, "icon-size": 21,
"spacing": 10, "spacing": 10,
// "icons": {
// "blueman": "bluetooth",
// "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png"
// }
}, },
"clock": { "clock": {
// "timezone": "America/New_York", "timezone": "America/Denver",
"tooltip-format": "<tt><small>{calendar}</small></tt>", "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
// "format-alt": "{:%Y-%m-%d}", "format": "{:%d - %H:%M}",
"format": "󰭦 {:%D - %H:%M}",
"calendar": {
"mode": "year",
"mode-mon-col": 3,
"weeks-pos": "right",
"on-scroll": 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>",
},
},
}, },
"cpu": { "network": {
"format": "{usage}% ", "format-wifi": "󰤢 ",
"format-ethernet": "󰈀 ",
"format-disconnected": "󰤠 ",
"interval": 5,
"tooltip": false, "tooltip": false,
}, },
"cpu": {
"interval": 1,
"format": " {icon0}{icon1}{icon2}{icon3} {usage:>2}%",
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
},
"memory": { "memory": {
"format": "{}% ", "interval": 30,
"format": " {used:0.1f}G/{total:0.1f}G",
}, },
"temperature": { "pulseaudio": {
// "thermal-zone": 2, "format": "{icon} {volume}%",
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", "format-muted": "",
"critical-threshold": 80, "format-icons": {
// "format-critical": "{temperatureC}°C {icon}", "default": ["", "", " "],
"format": "{temperatureC}°C {icon}", },
"format-icons": ["", "", ""], "on-click": "pavucontrol",
}, },
"backlight": { "custom/lock": {
// "device": "acpi_video1", "tooltip": false,
"format": "{percent}% {icon}", "on-click": "sh -c '(sleep 0.5s; hyprlock)' & disown",
"format-icons": ["", "", "", "", "", "", "", "", ""], "format": "",
},
"later": {
"format": "<span class='icon'>{icon}</span> <span class='text'>{text}</span>",
}, },
"battery": { "battery": {
"states": { "states": {
@@ -146,73 +76,4 @@
// "format-full": "", // "format-full": "",
"format-icons": ["", "", "", "", ""], "format-icons": ["", "", "", "", ""],
}, },
"power-profiles-daemon": {
"format": "{icon}",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
"tooltip": true,
"format-icons": {
"default": "",
"performance": "",
"balanced": "",
"power-saver": "",
},
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{icon}: ({signalStrength}%)",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{essid} - {ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}",
"signalStrength": {
"low": 20,
"medium": 60,
"high": 100,
},
"format-icons": ["󰤯", "󰤟", "󰤢", "󰤨"], // Icons for different signal strengths
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {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-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""],
},
"on-click": "pavucontrol",
},
"custom/media": {
"format": "{icon} {text}",
"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,
"menu": "on-click",
"menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
"menu-actions": {
"shutdown": "shutdown",
"reboot": "reboot",
"suspend": "systemctl suspend",
"hibernate": "systemctl hibernate",
},
},
} }

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- TODO: This doesn't work. -->
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="suspend">
<property name="label">Suspend</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="hibernate">
<property name="label">Hibernate</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="shutdown">
<property name="label">Shutdown</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="delimiter1"/>
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label">Reboot</property>
</object>
</child>
</object>
</interface>

View File

@@ -1,171 +1,128 @@
@define-color foreground #cdd6f4; @define-color foreground #cdd6f4;
@define-color background rgba(24, 24, 37, 0.7); @define-color background rgba(24, 24, 37, 0.7);
@define-color skyblue #89dceb;
@define-color blue #89b4fa;
@define-color red #f38ba8;
@define-color yellow #f9e2af;
* { * {
font-family: JetBrains Mono; font-family: JetbrainsMono Nerd Font;
font-size: 15px; font-size: 15px;
border: none;
border-radius: 0;
min-height: 0; min-height: 0;
margin: 0; padding-right: 2px;
padding: 0; padding-left: 2px;
box-shadow: none; padding-bottom: 0px;
text-shadow: none; }
icon-shadow: none;
#waybar {
background: transparent;
color: @foreground; color: @foreground;
background-color: transparent; margin: 0px;
} }
#clock, #workspaces {
#battery, border-radius: 10px;
#cpu, background: @background;
#memory, margin-right: 5px;
#disk, margin-left: 1rem;
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
#mpd {
min-width: 12px;
min-height: 25px;
margin: 0 7.5px;
}
.modules-left {
padding: 4px;
margin: 2px 8px;
background-color: @background;
border-radius: 10;
}
.modules-right {
margin: 0 2px;
}
#clock {
background-color: @background;
margin: 2px 8px;
border-radius: 10;
padding: 0 8px;
} }
#workspaces button { #workspaces button {
padding: 0 5px; color: @foreground;
border-radius: 5px;
padding: 0.4rem;
} }
#battery { #workspaces button.active {
/* background-color: #ffffff; */ color: @skyblue;
/* color: #000000; */ border-radius: 5px;
margin-right: 10px;
} }
#battery.charging, #workspaces button:hover {
#battery.plugged { color: #85c1dc;
color: #ffffff; border-radius: 5px;
background-color: #26a65b;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
} }
#custom-music,
#tray,
#backlight,
#clock,
#battery,
#pulseaudio,
#network,
#cpu,
#memory,
#custom-lock,
#custom-power { #custom-power {
font-size: 23px; background-color: @background;
padding: 0.5rem 1rem;
margin: 5px 0;
color: @foreground;
/* border-radius: 0px 5px 5px 0px; */
}
#clock {
color: @foreground;
border-radius: 5px;
margin-right: 1rem;
font-weight: 900;
} }
#pulseaudio { #pulseaudio {
/* background-color: #f1c40f; */ color: @red;
/* color: #000000; */ border-radius: 10px 0px 0px 10px;
margin-left: 1rem;
} }
#pulseaudio.muted { #tray {
background-color: #90b1b1; color: @blue;
color: #2a5c45; border-radius: 0px 10px 10px 0px;
margin-right: 1rem;
} }
#wireplumber { #cpu {
background-color: #fff0f5; border-radius: 10px 0px 0px 10px;
color: #000000;
} }
#wireplumber.muted { #memory {
background-color: #f53c3c; margin-right: 1rem;
border-radius: 0px 10px 10px 0px;
} }
#custom-media { #battery {
background-color: #66cc99; border-radius: 10px 0px 0px 10px;
color: #2a5c45; color: #a6d189;
min-width: 100px;
} }
/* #tray { */ #battery.charging {
/* background-color: red; */ color: #a6d189;
/* } */
#tray > .passive {
-gtk-icon-effect: dim;
} }
#tray > .needs-attention { #battery.warning:not(.charging) {
-gtk-icon-effect: highlight; color: #e78284;
background-color: #eb4d4b;
} }
#mpd { #backlight {
background-color: #66cc99; color: #e5c890;
color: #2a5c45;
} }
#mpd.disconnected { #custom-music {
background-color: #f53c3c; color: #ca9ee6;
border-radius: 5px;
} }
#mpd.stopped { #network {
background-color: #90b1b1; margin-right: 1rem;
border-radius: 0px 10px 10px 0px;
} }
#mpd.paused { #custom-lock {
background-color: #51a37a; border-radius: 10px;
color: @yellow;
} }
#privacy { #custom-power {
padding: 0; margin-right: 1rem;
} border-radius: 0px 5px 5px 0px;
color: #e78284;
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
/* background-color: #cf5700; */
}
#privacy-item.audio-in {
/* background-color: #1ca000; */
}
#privacy-item.audio-out {
/* background-color: #0069d4; */
} }

View File

@@ -11,47 +11,6 @@
_source_if() { test -r "$1" && source "$1" || return 0 } _source_if() { test -r "$1" && source "$1" || return 0 }
# few terminal keybinds
bindkey -e
typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if [[ -n ${terminfo[smkx]} ]] && [[ -n ${terminfo[rmkx]} ]]; then
function zle-line-init () {
echoti smkx
}
function zle-line-finish () {
echoti rmkx
}
zle -N zle-line-init
zle -N zle-line-finish
fi
zle -N fake-enter; bindkey "^X^H" fake-enter
#------------------------------ exports ------------------------------ #------------------------------ exports ------------------------------
autoload -U up-line-or-beginning-search autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search autoload -U down-line-or-beginning-search
@@ -129,8 +88,9 @@ setopt hist_reduce_blanks # do not store blank lines.
setopt histignorespace # do not store commands that start with a space in history setopt histignorespace # do not store commands that start with a space in history
export HISTSIZE=5000 export HISTSIZE=5000
export HISTFILESIZE=10000 export HISTFILESIZE=5000
export HISTFILE=$ZDOTDIR/history export SAVEHIST=5000
export HISTFILE="$XDG_CONFIG_HOME/zsh/history"
#set -o vi #set -o vi