Compare commits

...

3 Commits

Author SHA1 Message Date
23077aa3a5 feat: Add new configs 2025-04-05 16:32:28 +11:00
4d8c86df3f feat: Add waybar to git 2025-04-04 14:50:33 +11:00
1cf3d139a5 feat: Add a ton of hyprland config 2025-04-04 14:47:56 +11:00
35 changed files with 1090 additions and 143 deletions

6
.config/.gitignore vendored
View File

@@ -14,3 +14,9 @@
!rofi/**
!backgrounds
!backgrounds/**
!waybar
!waybar/**
!tofi
!tofi/**
!micro
!micro/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

BIN
.config/hypr/fireplace.mp4 Normal file

Binary file not shown.

View File

@@ -1,14 +1,34 @@
general {
lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
unlock_cmd = notify-send "unlock!" # same as above, but unlock
before_sleep_cmd = notify-send "Zzz" # command ran before sleep
after_sleep_cmd = notify-send "Awake!" # command ran after sleep
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
ignore_systemd_inhibit = false # whether to ignore systemd-inhibit --what=idle inhibitors
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 = 500 # in seconds
on-timeout = notify-send "You are idle!" # command to run when timeout has passed
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
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

@@ -25,7 +25,10 @@ env = HYPRSHOT_DIR,/home/$USER/Pictures/Screenshots
# Set programs that you use
$terminal = alacritty
$fileManager = dolphin
$menu = rofi -show drun
# $menu = rofi -show drun calc -modi calc -terse
$menu = pgrep -x tofi-drun && pkill -x tofi-drun || tofi-drun --drun-launch=true > ~/.logs/tofi-drun.log 2>&1 &
# wofi --show drun
# Some default env vars.
@@ -41,6 +44,7 @@ input {
kb_rules =
follow_mouse = 1
numlock_by_default = 1
touchpad {
natural_scroll = yes;
@@ -53,7 +57,7 @@ input {
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_in = 3
gaps_out = 0
border_size = 0
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
@@ -74,12 +78,8 @@ decoration {
enabled = true
size = 3
passes = 1
xray = 0
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
@@ -105,35 +105,54 @@ dwindle {
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
# new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = true
workspace_swipe = false
}
cursor {
no_warps = 1
}
misc {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = 1
focus_on_activate = 1
}
plugin {
virtual-desktops {
names = 1:Coding, 2:Internet, 3:3,4:4, 5:Social
cycleworkspaces = 0
rememberlayout = none
notifyinit = 0
verbose_logging = 0
}
}
plugin {
hyprexpo {
columns = 3
gap_size = 5
bg_col = rgb(111111)
workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1
enable_gesture = true # laptop touchpad
gesture_fingers = 3 # 3 or 4
gesture_distance = 300 # how far is the "max"
gesture_positive = true # positive = swipe down. Negative = swipe up.
}
}
# 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.
# device {
# name = epic-mouse-v1
# sensitivity = -0.5
# }
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -164,51 +183,68 @@ bind = $mainMod, up, movefocus, u
bind = $mainMod, down, 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
bind = $mainMod ALT, 1, workspace, 1
bind = $mainMod ALT, 2, workspace, 2
bind = $mainMod ALT, 3, workspace, 3
bind = $mainMod ALT, 4, workspace, 4
bind = $mainMod ALT, 5, workspace, 5
bind = $mainMod ALT, 6, workspace, 6
bind = $mainMod ALT, 7, workspace, 7
bind = $mainMod ALT, 8, workspace, 8
bind = $mainMod ALT, 9, workspace, 9
bind = $mainMod ALT, 0, workspace, 10
bind = $mainMod, 1, vdesk, 1
bind = $mainMod, 2, vdesk, 2
bind = $mainMod, 3, vdesk, 3
bind = $mainMod, 4, vdesk, 4
bind = $mainMod, 5, vdesk, 5
bind = $mainMod, 6, vdesk, 6
bind = $mainMod, 7, vdesk, 7
bind = $mainMod, 8, vdesk, 8
bind = $mainMod, 9, vdesk, 9
bind = $mainMod, 0, vdesk, 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
bind = $mainMod SHIFT, 1, movetodesk, 1
bind = $mainMod SHIFT, 2, movetodesk, 2
bind = $mainMod SHIFT, 3, movetodesk, 3
bind = $mainMod SHIFT, 4, movetodesk, 4
bind = $mainMod SHIFT, 5, movetodesk, 5
bind = $mainMod SHIFT, 6, movetodesk, 6
bind = $mainMod SHIFT, 7, movetodesk, 7
bind = $mainMod SHIFT, 8, movetodesk, 8
bind = $mainMod SHIFT, 9, movetodesk, 9
bind = $mainMod SHIFT, 0, movetodesk, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod CTRL, S, movetoworkspace, special:magic
# bindr = $mainMod, SUPER_L, exec, hyprpanel toggleWindow dashboardmenu
bind = $mainMod SHIFT, S, exec, /home/nathan/.local/bin/hyprshot -m region
bind = $mainMod SHIFT, S, exec, hyprshot -m region
# Scroll through existing workspaces with mainMod + scroll
# bind = $mainMod, mouse_down, workspace, e+1
# bind = $mainMod, mouse_up, workspace, e-1
# Scroll through existing workspaces with mainMod + TAB and SHIFT + TAB
bind = $mainMod, TAB, workspace, e+1
bind = $mainMod SHIFT, TAB, workspace, e-1
bind = ALT, TAB, workspace, e+1
bind = ALT SHIFT, TAB, workspace, e-1
# Used to use overview:toggle, but that resises the windows
# bind = $mainMod, TAB, overview:toggle
# bind = CTRL ALT, TAB, overview:toggle
bind = $mainMod, TAB, hyprexpo:expo, toggle
bind = CTRL ALT, TAB, hyprexpo:expo, toggle
bind = ALT, TAB, lastdesk
bind = ALT, SPACE, exec, ~/.config/hypr/scripts/search-windows.sh
# bind = ALT SHIFT, TAB, workspace, e-1
# bind = ALT, TAB, exec, hyprswitch gui --mod-key alt --key tab --close mod-key-release --reverse-key=key=shift && hyprswitch dispatch
# bind = ALT SHIFT, TAB, exec, hyprswitch gui --mod-key alt --key tab --close mod-key-release --reverse-key=key=shift && hyprswitch dispatch -r
# Media control keys
bindle=, XF86AudioRaiseVolume, exec, vol --up
bindle=, XF86AudioLowerVolume, exec, vol --downxe
bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+
bindle=, XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-
bindle=, XF86MonBrightnessUp, exec, brightnessctl s +5%
bindle=, XF86MonBrightnessDown, exec, brightnessctl s 5%-
bindle=, XF86Search, exec, $menu
@@ -223,3 +259,10 @@ bindl=, XF86AudioPrev, exec, playerctl previous
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Mouse wheel tilt
bind = , mouse_left, exec, ydotool key 56:1 105:1 105:0 56:0
bind = , mouse_right, exec, ydotool key 56:1 106:1 106:0 56:0
# Gromit for drawing
bind = SUPER CTRL, P, exec, ~/.config/hypr/scripts/gromit.py

View File

@@ -9,8 +9,9 @@ general {
# BACKGROUND
background {
# monitor =
path = $HOME/.config/hypr/hyprlock.png
blur_passes = 1
path = $HOME/.config/backgrounds/rengoku2.png
# path = $HOME/.config/hypr/fireplace.mp4
blur_passes = 0
# color = $base
}
@@ -33,50 +34,53 @@ label {
color = rgb(255, 255, 255)
font_size = 90
font_family = $font
position = -30, 0
halign = right
position = 75, 0
halign = left
valign = top
}
# DATE
label {
# monitor =
text = cmd[update:43200000] date +"%A, %d %B %Y"
color = rgb(255, 255, 255)
font_size = 25
font_family = $font
position = -30, -150
halign = right
valign = top
}
# label {
# # monitor =
# text = cmd[update:43200000] date +"%A, %d %B %Y"
# color = rgb(255, 255, 255)
# font_size = 25
# font_family = $font
# position = 30, -150
# halign = left
# valign = top
# }
shape {
monitor =
size = 500, 100%
color = rgba(255, 255, 255, 0.18)
rounding = 25
# border_size = 4
# border_color = rgba(255, 255, 255, 1.0)
# FINGERPRINT
{
# monitor = "";
text = $FPRINTPROMPT
color = rgb(255, 255, 255)
font_size = 14;
font_family = $font;
position = "0, -107";
halign = "center";
valign = "center";
position = -25, 0
halign = left
valign = center
}
# USER AVATAR
image {
# monitor =
# monitor =
path = $HOME/.face
rounding = 25
size = 100
border_color = rgb(0, 0, 0)
position = 0, 75
halign = center
# border_color = rgb(0, 0, 0)
border_size = 0
position = 200, 75
halign = left
valign = center
}
# INPUT FIELD
# INPUT FIELD
input-field {
# monitor =
size = 300, 60
position = 100, -47
outline_thickness = 4
dots_size = 0.2
dots_spacing = 0.2
@@ -91,7 +95,18 @@ input-field {
fail_color = rgb(255, 0, 0)
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
capslock_color = rgb(255, 0, 0)
position = 0, -47
halign = center
halign = left
valign = center
}
# FINGERPRINT
{
# monitor = "";
text = $FPRINTPROMPT
color = rgb(255, 255, 255)
font_size = 14;
font_family = $font;
position = 0, -107;
halign = center;
valign = center;
}

View File

@@ -0,0 +1,57 @@
{
"0": {
"left": [
"dashboard",
"media"
],
"middle": [
],
"right": [
"volume",
"network",
"bluetooth",
"battery",
"systray",
"clock",
"notifications"
]
},
"1": {
"left": [
"dashboard",
"media"
],
"middle": [
],
"right": [
"volume",
"network",
"bluetooth",
"battery",
"systray",
"clock",
"notifications",
"cputemp"
]
},
"2": {
"left": [
"dashboard",
"workspaces"
],
"middle": [
"media"
],
"right": [
"volume",
"network",
"bluetooth",
"battery",
"systray",
"clock",
"notifications"
]
}
}

View File

@@ -1,3 +1,16 @@
preload = ~/.config/backgrounds/background.png
preload = ~/.config/backgrounds/akaza.png
preload = ~/.config/backgrounds/background.png
preload = ~/.config/backgrounds/better_shaded_landscape.jpg
preload = ~/.config/backgrounds/car-with-full-moon-background.jpg
preload = ~/.config/backgrounds/cello.jpg
preload = ~/.config/backgrounds/earth.jpg
preload = ~/.config/backgrounds/lofiwallpaper.png
preload = ~/.config/backgrounds/nice-blue-background.png
preload = ~/.config/backgrounds/rengoku.png
preload = ~/.config/backgrounds/shaded.png
preload = ~/.config/backgrounds/shinobu.png
wallpaper = , ~/.config/backgrounds/background.png
ipc = on

View File

@@ -0,0 +1,71 @@
.monitor {
font-size: 20px;
}
.monitor:hover {
background-color: var(--bg-color-hover);
}
.monitor_active {
border: var(--border-size) solid var(--border-color-active);
}
.index {
display: none;
margin: 3px;
padding: 2px 4px;
font-size: 22px;
font-weight: bold;
font-family: monospace;
border-radius: var(--border-radius);
background-color: var(--bg-color);
border: var(--border-size) solid var(--index-border-color);
}
.workspace {
font-size: 24px;
font-weight: bold;
border-radius: var(--border-radius);
background-color: var(--bg-color);
border: var(--border-size) solid var(--border-color);
color: #ffffff;
}
.workspace:hover {
background-color: var(--bg-color-hover);
}
.workspace_special {
border: var(--border-size) solid rgba(0, 255, 0, 0.4);
}
.workspace_active {
border: var(--border-size) solid var(--border-color-active);
}
.client-image {
display: none;
margin-top: 10px;
margin-bottom: 5px;
}
.client {
font-size: 16px;
font-weight: normal;
color: #ffffff;
border-radius: var(--border-radius);
background-color: var(--bg-color);
border: var(--border-size) solid var(--border-color);
}
.client:hover {
background-color: var(--bg-color-hover);
}
.client_active {
border: var(--border-size) solid var(--border-color-active);
}

1
.config/hypr/scripts/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.venv

135
.config/hypr/scripts/desk.py Executable file
View File

@@ -0,0 +1,135 @@
#!/usr/bin/python3
import argparse
import os
import sys
import subprocess
import json
# Check if first arg is colour
waybar = {}
waybar["SELECTED"] = '<span underline="low">'
waybar["DEFAULT"] = '<span foreground="#ffffff">'
waybar["WHITE"]='<span foreground="#ffffff">'
waybar["RED"]='<span foreground="#ff0000">'
waybar["GREEN"]='<span foreground="#60d090">'
waybar["YELLOW"]='<span foreground="#ffff00">'
waybar["BLUE"]='<span foreground="#0000ff">'
waybar["NC"]='</span>'
shell = {}
shell["SELECTED"]='\033[0;32m'
shell["WHITE"]='\033[0;37m'
shell["RED"]='\033[0;31m'
shell["GREEN"]='\033[0;32m'
shell["YELLOW"]='\033[0;33m'
shell["BLUE"]='\033[0;34m'
shell["NC"]='\033[0m'
def get_info():
state = subprocess.run(["hyprctl", "printstate"], capture_output=True, text=True)
state = state.stdout.splitlines()
state.pop(0) # Remove the first line
info = {}
while True:
if len(state) == 0:
break
line = state.pop(0)
if line == "":
continue
if "-" not in line:
break
key, value = line.split(": ")
key = key.strip().removeprefix("-").strip()
value = value.strip()
desk_id = value
info[desk_id] = {"name": key}
for i in range(4):
line = state.pop(0)
if line == "":
break
line = line.split(": ")
if len(line) == 2:
key, value = line
key = key.strip()
value = value.strip()
info[desk_id][key] = value
return info
def get_icon(desk_name, focused=False):
# Get the icon for the desk
icon = ""
desk_name = desk_name.strip().lower()
if desk_name == "coding":
return ""
if desk_name == "web" or desk_name == "internet":
return "󰖟"
if desk_name == "social":
return "󰭻"
return "" if focused else ""
if __name__ == "__main__":
# Check for arguments
parser = argparse.ArgumentParser(description="hyprland desk script")
parser.add_argument("-d", "--desk", type=int, help="Desk number to switch to")
parser.add_argument("-w", "--waybar", action="store_true", help="Waybar mode")
parser.add_argument("-i", "--info", action="store_true", help="Info mode")
parser.add_argument("-v", "--verbose", action="store_true", help="Verbose mode")
args = parser.parse_args()
if args.waybar or args.info:
colours = waybar if args.waybar else shell
# Get info from hyprctl printstate
info = get_info()
output = ""
if args.desk:
desk_num = args.desk
if str(desk_num) not in info:
print(f"Desk {desk_num} does not exist")
sys.exit(1)
desk = info[str(desk_num)]
if args.verbose:
print(desk)
if desk["Populated"] == "false" and desk["Focused"] == "false":
print(f"Desk {desk_num} is empty")
sys.exit(1)
if desk["Focused"] == "true":
output += f"{colours['SELECTED']} {desk_num}: {get_icon(desk['name'],True)} {colours['NC']} "
else:
output += f"{colours["DEFAULT"]} {desk_num}: {get_icon(desk['name'])} {colours['NC']} "
print(output)
sys.exit(0)
for i in range(1, int(max(info.keys()))+1):
if str(i) not in info:
continue
desk = info[str(i)]
if desk["Populated"] == "false" and desk["Focused"] == "false":
continue
if args.verbose:
print(desk)
if desk["Focused"] == "true":
output += f"{colours['SELECTED']} {get_icon(desk['name'],True)} {colours['NC']} "
else:
output += f"{colours["DEFAULT"]} {get_icon(desk['name'])} {colours['NC']} "
print(output)
sys.exit(0)
if args.desk:
# Switch to desk
if args.verbose:
print(f"Switching to desk {args.desk}")
subprocess.run(["hyprctl", "dispatch", "vdesk", str(args.desk)])
sys.exit(0)

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Check if muted
if wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q "[MUTED]"; then
# If muted, show notification
echo "󰝟"
exit 0
fi
echo "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}' | sed 's/\.0*$//g')% 󰕾"

66
.config/hypr/scripts/gromit.py Executable file
View File

@@ -0,0 +1,66 @@
#!/usr/bin/python3
# import argparse
import os
import sys
import subprocess
import json
def get_window():
print("Getting active window",flush=True)
state = subprocess.run(["hyprctl", "activewindow", "-j"], capture_output=True, text=True)
state = state.stdout
try:
state = json.loads(state)
except json.JSONDecodeError:
print("Error decoding JSON")
return None
if state is None:
print("No active window")
return None
if "class" not in state:
return None
return state["class"]
def gromit_running():
clients = subprocess.run(["hyprctl", "clients", "-j"], capture_output=True, text=True)
clients = clients.stdout
try:
clients = json.loads(clients)
except json.JSONDecodeError:
print("Error decoding JSON")
return False
if clients is None:
print("No clients")
return False
for client in clients:
if "class" not in client:
continue
if client["class"] == "Gromit-mpx":
return True
return False
if __name__ == "__main__":
if get_window() == "Gromit-mpx":
print("Gromit is already running")
os.system("hyprctl dispatch togglespecialworkspace gromit")
os.system("gromit-mpx -t")
os.system("hyprctl keyword unbind , mouse_left")
os.system("hyprctl keyword unbind , mouse_right")
print("Rebinding mouse buttons")
os.system("hyprctl keyword bind , mouse_left, exec, 'ydotool key 56:1 105:1 105:0 56:0'")
os.system("hyprctl keyword bind , mouse_right, exec, 'ydotool key 56:1 106:1 106:0 56:0'")
else:
print("Gromit is not running",flush=True)
# Check if gromit-mpx is running
if gromit_running():
os.system("gromit-mpx -t")
os.system("hyprctl dispatch togglespecialworkspace gromit")
os.system("hyprctl keyword unbind , mouse_left")
os.system("hyprctl keyword unbind , mouse_right")
os.system("hyprctl keyword bind , mouse_left, exec, 'gromit-mpx --undo'")
os.system("hyprctl keyword bind , mouse_right, exec, 'gromit-mpx --redo'")

View File

View File

@@ -0,0 +1,44 @@
#!/bin/sh
# Check if tofi is running
if pgrep -x "tofi" > /dev/null; then
# Passing as regular tab
ydotool key 15:1 15:0
exit
fi
# Get a list of open windows
WINDOWS=$(hyprctl clients | grep "title: " | sed 's/.*title: //')
# If there are no open windows, exit
[ -z "$WINDOWS" ] && exit
# Use tofi to select a window
SELECTED=$(echo "$WINDOWS" | tofi --num-results 10 --padding-left 20% --padding-top 20% --prompt-text "Select a window: ")
# If a window was selected, focus it
if [ -n "$SELECTED" ]; then
echo "Focusing window: $SELECTED"
# Check if the selected window is on special workspace
# hyprctl clients | grep "$SELECTED" -A 10 | grep workspace
# returns like workspace: -98 (special:magic)
workspace=$(hyprctl clients | grep "$SELECTED" -A 10 | grep workspace)
# if workspace is special, try to focus it
if [[ $workspace == *"special:"* ]]; then
# Get the workspace name (after the colon)
workspace_name=$(echo "$workspace" | sed -E 's/.*:\s*([^)]*).*/\1/')
# Remove number and prefix
echo "Focusing special workspace: $workspace_name"
# Focus the workspace
hyprctl dispatch togglespecialworkspace "$workspace_name"
fi
# Get the window ID
window_id=$(hyprctl clients | grep "$SELECTED" -A 10 | grep pid)
# Get the window ID (after the colon)
window_id=$(echo "$window_id" | sed -E 's/.*:\s*([^)]*).*/\1/')
echo "Window ID: $window_id"
hyprctl dispatch focuswindow pid:"$window_id"
fi

10
.config/hypr/scripts/volume.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
hyprctl dismissnotify
# Check if muted
if wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q "[MUTED]"; then
# If muted, show notification
hyprctl notify -1 5000 0 "Volume muted"
exit 0
fi
hyprctl notify -1 5000 0 "Volume $(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}' | sed 's/\.0*$//g')%"

View File

@@ -1,23 +1,34 @@
exec-once = /usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1
exec-once = systemctl --user start plasma-kwallet-pam.service plasma-polkit-agent.service
exec-once = /usr/bin/kwalletd6
exec-once = systemctl --user start xdg-desktop-portal-hyprland
exec-once = /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
exec-once = swaync
exec-once = hyprpm reload -n
exec-once = systemctl --user start hyprpolkitagent
exec-once = /usr/bin/kdeconnectd &
# exec-once = /usr/bin/swaync &
# exec-once = waybar
# Start apps in .autostart
exec-once = /home/$USER/.config/autostart/com.impervious.fingertip.desktop
exec-once = /home/$USER/.config/autostart/Nextcloud.desktop
exec-once = /usr/bin/python3 /usr/bin/solaar --window=hide
exec-once = /home/nathan/AppImages/Fingertip-0.0.4-beta2-linux-X64.AppImage &
exec-once = /home/nathan/AppImages/nextcloud_desktop_sync_client.appimage --background &
# exec-once = /usr/bin/solaar -w hide &
# Start windows
exec-once = alacritty --class alacritty-init
# exec-once = brave-browser # TODO after adding start workspace
exec-once = discord-ptb
exec-once = slack
exec-once = discord --start-minimized
exec-once = slack -U
exec-once = waybar
exec-once = hyprpanel
exec-once = hyprpaper
exec-once = clipse -listen & clipse --listen
exec-once = hypridle
exec-once = clipse -listen
# exec-once = hyprswitch init --show-title --custom-css ~/.config/hypr/hyprswitch.css &
# Proxy
# exec-once = gsettings set org.gnome.system.proxy mode 'auto' && gsettings set org.gnome.system.proxy autoconfig-url 'http://127.0.0.1:9590/proxy.pac'
# exec-once = kwriteconfig6 --file kioslaverc --group 'Proxy Settings' --key 'ProxyType' 2 && kwriteconfig6 --file kioslaverc --group 'Proxy Settings' --key 'AutoProxyURL' "http://127.0.0.1:9590/proxy.pac"
# exec-once = export PROXY_PAC_URL="http://127.0.0.1:9590/proxy.pac"
# exec-once = export http_proxy="http://127.0.0.1:9590"
# exec-once = export https_proxy="$http_proxy"
# exec-once = export no_proxy="localhost,127.0.0.1,::1"

View File

@@ -1,38 +1,28 @@
windowrulev2 = float,class:(clipse)
windowrulev2 = size 622 652,class:(clipse)
windowrulev2 = stayfocused,class:(clipse)
# windowrulev2 = float,class:(clipse)
# windowrulev2 = size 622 652,class:(clipse)
# windowrulev2 = stayfocused,class:(clipse)
windowrulev2 = float,class:(float)
windowrulev2 = float,class:(swayimg)
windowrulev2 = size 80%,class:(swayimg)
windowrule = noblur 1 noanim 1 noshadow 1, class:(^$)
# windowrule = opacity 0.2, class:(^$)
# # Start windows
# windowrulev2 = workspace 1, class:alacritty-init
# # windowrulev2 = workspace 3, class:Brave-browser
# windowrulev2 = workspace 5, class:discord
# windowrulev2 = workspace 5, class:org.telegram.desktop
# windowrulev2 = workspace 5, class:Slack
stickyrule = class:discord,5
stickyrule = class:org.telegram.desktop,5
stickyrule = class:Slack,5
windowrule = float, polkit-kde-authentication-agent-1
windowrule = center,polkit-kde-authentication-agent-1
windowrule = size 800 500,polkit-kde-authentication-agent-1
windowrule = stayfocused,polkit-kde-authentication-agent-1
windowrule = float, io.github.kaii_lb.Overskride
windowrule = center,io.github.kaii_lb.Overskride
windowrule = size 1000 800,io.github.kaii_lb.Overskride
windowrule = float, overskride
windowrule = center,overskride
windowrule = size 700 500,overskride
windowrule = float, iwgtk
windowrule = center,iwgtk
windowrule = size 800 500,iwgtk
windowrule = float, org.kde.gwenview
windowrule = center,org.kde.gwenview
windowrule = size 800 500,org.kde.gwenview
windowrule = float, kdesystemsettings
windowrule = center,kdesystemsettings
windowrule = size 1500 1000,kdesystemsettings
# Start windows
windowrulev2 = workspace 1, class:alacritty-init
# windowrulev2 = workspace 3, class:Brave-browser
windowrulev2 = workspace 5, class:discord
windowrulev2 = workspace 5, class:Slack
workspace = special:gromit, gapsin:0, gapsout:0, shadow:0, on-created-empty: gromit-mpx -a
windowrule = noblur, class:^(Gromit-mpx)$
windowrule = opacity 1 override, 1 override, class:^(Gromit-mpx)$
windowrule = noshadow, class:^(Gromit-mpx)$
windowrule = suppressevent fullscreen, class:^(Gromit-mpx)$
windowrule = size 100% 100%, class:^(Gromit-mpx)$

View File

@@ -0,0 +1,5 @@
{
"Alt-/": "lua:comment.comment",
"CtrlUnderscore": "lua:comment.comment",
"Ctrl-X": "Quit"
}

Binary file not shown.

10
.config/tofi/config Normal file
View File

@@ -0,0 +1,10 @@
width = 100%
height = 100%
border-width = 0
outline-width = 0
padding-left = 35%
padding-top = 35%
result-spacing = 25
num-results = 5
font = monospace
background-color = #000A

224
.config/waybar/config Normal file
View File

@@ -0,0 +1,224 @@
{
"height": 30,
"spacing": 4,
"modules-left": [
"custom/swaync",
"custom/media"
],
"modules-center": [
"custom/workspace1",
"custom/workspace2",
"custom/workspace3",
"custom/workspace4",
"custom/workspace5",
"custom/workspace6",
"custom/workspace7",
"custom/workspace8",
"custom/workspace9",
"custom/workspace10"
// "hyprland/workspaces"
],
"modules-right": [
"keyboard-state",
"tray",
"custom/separator",
"network",
"custom/tailscale",
"custom/separator",
"battery",
"custom/separator",
"custom/bluetooth",
"clock"
],
// Modules configuration
"custom/swaync": {
"on-click": "swaync-client -t -sw",
"tooltip": false,
"format": "  {} | ",
"interval": 1,
"exec": "~/.config/hypr/scripts/get-volume.sh"
},
"custom/separator": {
"format": "|"
},
"custom/media": {
"interval": 1,
"exec": "/home/nathan/scripts/music.sh waybar",
"tooltip": false
},
"custom/tailscale": {
"interval": 10,
"exec": "sleep 2 && /home/nathan/scripts/ts.sh short waybar",
"on-click": "/home/nathan/scripts/ts.sh en toggle",
"exec-on-event": true,
"tooltip": false
},
"custom/bluetooth": {
"interval": 10,
"exec": "/home/nathan/scripts/bt.sh waybar",
"on-click": "alacritty --class float -e bluetuith",
"exec-on-event": true,
"tooltip": false
},
"disk": {
"interval": 30,
"format": "{path} {percentage_used}%",
"path": "/",
"on-click": "/home/nathan/scripts/zellij.sh --cwd / zsh"
},
"keyboard-state": {
"numlock": false,
"capslock": true,
"format": "{icon}",
"format-icons": {
"locked": "Caps ",
"unlocked": ""
}
},
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%Y-%m-%d %r}",
"interval": 1
},
"cpu": {
"format": "{usage}% ",
"tooltip": true,
"on-click": "/home/nathan/scripts/zellij.sh htop --sort-key=PERCENT_CPU"
},
"memory": {
"format": "{}% ",
"tooltip": true,
"on-click": "/home/nathan/scripts/zellij.sh htop --sort-key=PERCENT_MEM"
},
"temperature": {
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": [
"<span foreground='#60d090'></span>",
"<span foreground='#60d090'></span>",
"<span foreground='#ffff00'></span>",
"<span foreground='#ffff00'></span>",
"<span foreground='#ff0000'></span>"
]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": "󱊥 {capacity}% ",
"format-plugged": " {capacity}%",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": [
"<span foreground='#ff0000'></span>",
"<span foreground='#ffff00'></span>",
"<span foreground='#60d090'></span>",
"<span foreground='#60d090'></span>",
"<span foreground='#60d090'></span>"
]
},
"network": {
"format-wifi": "{essid} ", //({signalStrength}%)
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
// "format-alt": "{ifname}: {ipaddr}/{cidr}",
"on-click": "alacritty --class float -e iwctl"
},
"tray": {
"icon-size": 21,
"spacing": 10
},
"hyprland/submap": {
"format": "✌️ {}",
"max-length": 8,
"tooltip": false
},
"hyprland/workspaces": {
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"active": "",
"default": ""
}
},
"custom/workspace1": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 1",
"on-click": "~/.config/hypr/scripts/desk.py -d 1",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace2": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 2",
"on-click": "~/.config/hypr/scripts/desk.py -d 2",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace3": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 3",
"on-click": "~/.config/hypr/scripts/desk.py -d 3",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace4": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 4",
"on-click": "~/.config/hypr/scripts/desk.py -d 4",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace5": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 5",
"on-click": "~/.config/hypr/scripts/desk.py -d 5",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace6": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 6",
"on-click": "~/.config/hypr/scripts/desk.py -d 6",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace7": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 7",
"on-click": "~/.config/hypr/scripts/desk.py -d 7",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace8": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 8",
"on-click": "~/.config/hypr/scripts/desk.py -d 8",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace9": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 9",
"on-click": "~/.config/hypr/scripts/desk.py -d 9",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace10": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 10",
"on-click": "~/.config/hypr/scripts/desk.py -d 10",
"exec-on-event": true,
"tooltip": false
}
}

216
.config/waybar/style.css Normal file
View File

@@ -0,0 +1,216 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FiraCode Nerd Font Mono, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 15px;
}
window#waybar {
background-color: rgba(0, 0, 0,0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#mpd {
padding: 0 10px;
color: #ffffff;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#battery {
color: #ffffff;
}
#battery.charging, #battery.plugged {
color: #26A65B;
}
#battery.warning {
background-color: transparent;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#network.disconnected {
background-color: #f53c3c;
}
tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
/* background: #97e1ad; */
/* color: #000000; */
padding: 0;
/* margin: 0 5px; */
/* min-width: 16px; */
}
#keyboard-state > label {
padding: 0 5px;
}
/* #keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
} */
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}

3
.zshrc
View File

@@ -158,7 +158,8 @@ alias message='/home/$USER/scripts/message.sh'
alias dockerstart='/home/$USER/scripts/dockerstart.sh'
alias dockerstop='/home/$USER/scripts/dockerstop.sh'
alias domains='/home/$USER/scripts/domains.py'
alias fix_touchpad='/home/$USER/scripts/fix_touchpad.sh'
alias open=xdg-open
# Use gitkraken's cli tool
unalias gk