Upload from GitHub
This commit is contained in:
39
laptop/configs/hypr/hypridle.conf
Normal file
39
laptop/configs/hypr/hypridle.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░ ░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░
|
||||
#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
|
||||
#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒
|
||||
#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓
|
||||
#█ ████ ████ ████ ██████ ████ ██ █ ██ ███ █████████████ ██████ █████ ██ ███ ████ █████ █
|
||||
#██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
general {
|
||||
lock_cmd = hyprlock --immediate
|
||||
unlock_cmd = loginctl unlock-session
|
||||
before_sleep_cmd = hyprlock --immediate
|
||||
after_sleep_cmd = hyprlock --immediate
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 100
|
||||
on-timeout = notify-send "Entering idle state... (200s to screen off)"
|
||||
on-resume = notify-send "Welcome back!"
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 200
|
||||
on-timeout = notify-send "100s to screen off" && sleep 5 && hyprlock
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 300
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 600
|
||||
on-timeout = systemctl suspend
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
349
laptop/configs/hypr/hyprland-old.conf
Normal file
349
laptop/configs/hypr/hyprland-old.conf
Normal file
@@ -0,0 +1,349 @@
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░
|
||||
#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
|
||||
#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒
|
||||
#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓
|
||||
#█ ████ ████ ████ ██████ ████ ███ █ █ ██ ██ █ ███████████ ██████ █████ ██ ███ ████ █████ █
|
||||
#██████████████ █████ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
|
||||
|
||||
|
||||
#----------#
|
||||
# MONITORS #
|
||||
#----------#
|
||||
|
||||
monitor=eDP-1, 2880x1800@60, 0x0, 1.5
|
||||
# monitor=,highres highrr, auto, 1
|
||||
|
||||
|
||||
#-----------------------#
|
||||
# LAUNCHING OF PROGRAMS #
|
||||
#-----------------------#
|
||||
exec-once = dunst
|
||||
# exec-once = wl-clipboard-history -t
|
||||
exec-once = ~/.config/hypr/xdg-portal-hyprland
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY
|
||||
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = waybar
|
||||
exec-once = hypridle
|
||||
|
||||
# exec-once = openrgb --startminimized
|
||||
# exec-once = polychromatic-tray-applet
|
||||
# exec-once = blueman-applet
|
||||
exec-once = nm-applet
|
||||
exec-once = nextcloud
|
||||
|
||||
exec = swaybg -m fill -i /home/janis/Pictures/arch-bg.png
|
||||
|
||||
exec = hyprctl setcursor oreo_spark_blue_cursors 36
|
||||
env = QT_QPA_PLATFORM,wayland
|
||||
env = QT_QPA_PLATFORM_THEME,qt6ct
|
||||
# env = GDK_SCALE,2
|
||||
# env = GDK_DPI_SCALE,0.75
|
||||
|
||||
env = HYPRCURSOR_THEME, Oreo_spark_blue_cursor
|
||||
env = X_CURSOR_THEME, Oreo_spark_blue_cursor
|
||||
env = XCURSOR_SIZE,24
|
||||
# env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||
|
||||
#-------#
|
||||
# INPUT #
|
||||
#-------#
|
||||
input {
|
||||
kb_layout = ch
|
||||
natural_scroll = true
|
||||
|
||||
numlock_by_default = true
|
||||
|
||||
follow_mouse = 2
|
||||
mouse_refocus = true
|
||||
|
||||
touchpad {
|
||||
disable_while_typing = true
|
||||
natural_scroll = true
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
|
||||
#----------------#
|
||||
# GENERAL CONFIG #
|
||||
#----------------#
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 3
|
||||
gaps_out = 10
|
||||
border_size = 1
|
||||
col.active_border = rgba(2288ffee) rgba(a6f7adff) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = master
|
||||
no_border_on_floating = false
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
inactive_opacity = 1
|
||||
rounding = 10
|
||||
|
||||
shadow {
|
||||
enabled = false
|
||||
range = 4
|
||||
color = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
blur {
|
||||
enabled = false
|
||||
xray = true
|
||||
new_optimizations = true
|
||||
size = 1
|
||||
passes = 2
|
||||
}
|
||||
dim_inactive = true
|
||||
dim_strength = 0.1
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = false
|
||||
vrr = 2
|
||||
vfr = 1
|
||||
allow_session_lock_restore = true
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = true
|
||||
workspace_swipe_distance = 300
|
||||
}
|
||||
|
||||
cursor {
|
||||
no_warps = false
|
||||
inactive_timeout = 60
|
||||
}
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
|
||||
# Display full sized (without gaps), if only window on screen
|
||||
workspace = w[tv1], gapsout:0, gapsin:0
|
||||
workspace = f[1], gapsout:0, gapsin:0
|
||||
windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
|
||||
windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
|
||||
windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
|
||||
windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
||||
# WINDOW RULES
|
||||
windowrule = float, title:^(.*)(rofi)(.*)$
|
||||
# windowrule = size 800 900, title:^(.*)(rofi)(.*)$
|
||||
windowrule = animation popin, title:^(.*)(rofi)(.*)$
|
||||
windowrule = center, title:^(.*)(rofi)(.*)$
|
||||
windowrule = move 1450 50, title:^(.*)(Power menu)$
|
||||
windowrule = workspace 2, evince
|
||||
windowrule = workspace 2, okular
|
||||
windowrule = fullscreen, title:wlogout
|
||||
windowrule = workspace 2, title:^(.*)(LibreWolf)(.*)$
|
||||
windowrule = workspace 2, title:^(.*)(WebCord)(.*)$
|
||||
windowrule = workspace 3, title:^(Steam)(.*)$
|
||||
windowrule = workspace 1, title:^(.*)(VSCodium)$
|
||||
windowrule = workspace 3, minecraft-launcher
|
||||
windowrule = tile, minecraft-launcher
|
||||
windowrule = fullscreen, title:^(.*)Minecraft*(.*)$
|
||||
windowrule = workspace 3, title:^(.*)Minecraft*(.*)$
|
||||
# Hide terminator
|
||||
windowrule = float, title:^(.*)hidden-terminator(.*)$
|
||||
windowrule = size 0 0, title:^(.*)hidden-terminator(.*)$
|
||||
windowrule = move 3000 0, title:^(.*)hidden-terminator(.*)$
|
||||
windowrule = workspace 1, title:^(.*)hidden-terminator(.*)$
|
||||
|
||||
windowrule = float, file_progress
|
||||
windowrule = float, confirm
|
||||
windowrule = float, dialog
|
||||
windowrule = float, download
|
||||
windowrule = float, notification
|
||||
windowrule = float, error
|
||||
windowrule = float, splash
|
||||
windowrule = float, confirmreset
|
||||
windowrule = float, title:Open File
|
||||
windowrule = float, title:branchdialog
|
||||
windowrule = float, Lxappearance
|
||||
windowrule = float, title:^(Media viewer)$
|
||||
windowrule = float, title:^(Volume Control)$
|
||||
windowrule = float, title:^(Picture-in-Picture)$
|
||||
windowrule = float, title:^(Loading)(.*)$
|
||||
windowrule = float, pavucontrol-qt
|
||||
windowrule = float, pavucontrol
|
||||
windowrule = float, file-roller
|
||||
windowrule = idleinhibit always, ^(Steam)$
|
||||
windowrule = idleinhibit focus, ^(Rocket League)(.*)$
|
||||
windowrule = fullscreen, ^(Steam Big Picture)$
|
||||
windowrule = idleinhibit always, steam
|
||||
windowrule = idleinhibit always, lutris
|
||||
windowrule = idleinhibit focus, vlc
|
||||
windowrule = idleinhibit focus, supertuxkart
|
||||
windowrule = idleinhibit fullscreen, title:^(.*)(WebCord)(.*)$
|
||||
windowrule = idleinhibit fullscreen, title:^(.*)(~)(.*)$
|
||||
windowrule = idleinhibit focus, title:^(.*)(~)(.*)$
|
||||
windowrule = idleinhibit focus, title:^(.*)(LibreWolf)(.*)$
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Q, killactive
|
||||
bind = $mainMod SHIFT, Q, exit
|
||||
bind = $mainMod, Return, exec, kitty
|
||||
# bind = $mainMod, Return, exec, terminator
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, E, exec, thunar
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, F, fullscreen,
|
||||
|
||||
# Launch commands
|
||||
bind = $mainMod SHIFT, L, exec, librewolf
|
||||
bind = $mainMod SHIFT, K, exec, librewolf http://localhost:8080/admin && librewolf http://localhost:8081/test/login
|
||||
bind = $mainMod SHIFT, D, exec, terminator --title "hidden-terminator" -e "GDK_SCALE=2 webcord && exit"
|
||||
# bind = $mainMod SHIFT, D, exec, webcord
|
||||
# bind = $mainMod SHIFT, V, exec, terminator --title "hidden-terminator" -e "GDK_SCALE=2 codium && exit"
|
||||
bind = $mainMod SHIFT, V, exec, codium
|
||||
bind = $mainMod SHIFT, T, exec, thunderbird
|
||||
bind = $mainMod SHIFT, M, exec, systemctl start docker && terminator -e "sudo docker run -it --network=host --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size 16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /home/janis/projects:/mnt rocm/pytorch:latest"
|
||||
# bind = $mainMod SHIFT, G, exec, notify-send 'Preparing system for gaming...' && /usr/lib/polkit-kde-authentication-agent-1 && notify-send 'Starting CoreCtrl...' && corectrl
|
||||
bind = $mainMod SHIFT, G, exec, notify-send 'Preparing system for gaming...' && corectrl
|
||||
bind = $mainMod SHIFT, P, exec, notify-send 'Steam is launching...' && steam
|
||||
bind = $mainMod SHIFT, R, exec, notify-send 'START CORECTRL! (Super + Shift + G twice). Launching in Remoteplay optimised session' && steam -pipewire
|
||||
bind = $mainMod CTRL, K, exec, notify-send 'Insta-Kill activated' && hyprctl kill
|
||||
|
||||
# Screenshots
|
||||
bind = $mainMod SHIFT, S, exec, grimblast --notify copy area
|
||||
bind = $mainMod CTRL, S, exec, grimblast --notify copysave area
|
||||
bind = $mainMod ALT, S, exec, grimblast --notify save area
|
||||
bind = , PRINT, exec, grimblast --notify copy screen
|
||||
bind = CTRL, PRINT, exec, grimblast --notify copysave screen
|
||||
bind = SHIFT, PRINT, exec, grimblast --notify save screen
|
||||
|
||||
# Rofi commands
|
||||
bind = $mainMod, Space, exec, killall rofi || rofi -show combi -modes combi -combi-modes "window,drun,run"
|
||||
bind = $mainMod SHIFT, Space, exec, rofi -modi "Global Search":"~/.config/rofi/spotlight/rofi-spotlight.sh" -show "Global Search" -config ~/.config/rofi/spotlight/rofi.rasi
|
||||
bind = $mainMod, P, exec, killall rofi || rofi -show p -modi p:rofi-power-menu -theme ~/.config/rofi/themes/power.rasi
|
||||
|
||||
# Logout commands
|
||||
bind = $mainMod, escape, exec, wlogout
|
||||
bind = $mainMod, L, exec, hyprlock
|
||||
#bind = $mainMod, L, exec, swaylock --screenshots --clock --indicator --grace 10 --fade-in 2 --effect-blur 10x10 --indicator-radius 200 --ring-color ff0202 --show-failed-attempts --effect-greyscale --effect-vignette 0.6:0.6
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
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, left, workspace, e-1
|
||||
bind = $mainMod ALT, right, workspace, e+1
|
||||
|
||||
|
||||
# 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, left, movetoworkspace, e-1
|
||||
bind = $mainMod SHIFT, right, movetoworkspace, e+1
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Tile window to a part of the screen
|
||||
bind = $mainMod CTRL, left, movewindow, left
|
||||
bind = $mainMod CTRL, right, movewindow, right
|
||||
|
||||
# move to next window / previous window with ALT + Tab / SHIFT + ALT + Tab
|
||||
bind = ALT SHIFT, tab, cyclenext, prev
|
||||
# bind = ALT, tab, cyclenext, next
|
||||
# bind = ALT CTRL, tab, focusurgentorlast
|
||||
bind = ALT, tab, focusurgentorlast
|
||||
|
||||
# Master layout commands
|
||||
bind = $mainMod CTRL, M, layoutmsg, swapwithmaster
|
||||
bind = $mainMod SHIFT, A, layoutmsg, addmaster
|
||||
bind = $mainMod SHIFT CTRL, right, layoutmsg, orientationnext
|
||||
bind = $mainMod SHIFT CTRL, left, layoutmsg, orientationprev
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
|
||||
# Freeze
|
||||
bind = $mainMod SHIFT, escape, exec, hyprfreeze -a
|
||||
|
||||
|
||||
# Volume control
|
||||
bind = ,code:123, exec, pamixer -i 5
|
||||
bind = ,code:122, exec, pamixer -d 5
|
||||
bind = ,code:121, exec, pamixer -t
|
||||
|
||||
|
||||
# Brightness-Control
|
||||
bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%'
|
||||
bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%'
|
||||
|
||||
|
||||
# Monitor config binds
|
||||
bind = $mainMod CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1, mirror, eDP-1 && notify-send 'Set to mirror internal display'
|
||||
bind = $mainMod CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1 && notify-send 'Set to expand external display'
|
||||
|
||||
# Internal display controls
|
||||
bind = $mainMod ALT, E, exec, hyprctl keyword monitor eDP-1, 2880x1800@60, 0x0, 1.5 && notify-send 'Set to battery optimized display settings'
|
||||
bind = $mainMod ALT, P, exec, hyprctl keyword monitor eDP-1, preferred, 0x0, 1.5 && notify-send 'Set to performance optimized display settings'
|
54
laptop/configs/hypr/hyprland.conf
Normal file
54
laptop/configs/hypr/hyprland.conf
Normal file
@@ -0,0 +1,54 @@
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░
|
||||
#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
|
||||
#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒
|
||||
#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓
|
||||
#█ ████ ████ ████ ██████ ████ ███ █ █ ██ ██ █ ███████████ ██████ █████ ██ ███ ████ █████ █
|
||||
#██████████████ █████ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
|
||||
|
||||
|
||||
#----------#
|
||||
# MONITORS #
|
||||
#----------#
|
||||
|
||||
monitor=eDP-1, 2880x1800@60, 0x0, 1.5
|
||||
# monitor=,highres highrr, auto, 1
|
||||
|
||||
|
||||
exec = swaybg -m fill -i /home/janis/Pictures/arch-bg.png
|
||||
|
||||
|
||||
source=./hyprland/binds.conf
|
||||
source=./hyprland/general.conf
|
||||
source=./hyprland/windowrules.conf
|
||||
|
||||
#--------#
|
||||
# LAPTOP #
|
||||
#--------#
|
||||
exec = hyprctl setcursor oreo_spark_blue_cursors 36
|
||||
env = HYPRCURSOR_THEME, Oreo_spark_blue_cursor
|
||||
env = X_CURSOR_THEME, Oreo_spark_blue_cursor
|
||||
env = XCURSOR_SIZE,24
|
||||
|
||||
# Volume control
|
||||
bind = ,code:123, exec, pamixer -i 5
|
||||
bind = ,code:122, exec, pamixer -d 5
|
||||
bind = ,code:121, exec, pamixer -t
|
||||
|
||||
|
||||
# Brightness-Control
|
||||
bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%'
|
||||
bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%'
|
||||
|
||||
|
||||
# Monitor config binds
|
||||
bind = $mainMod CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1, mirror, eDP-1 && notify-send 'Set to mirror internal display'
|
||||
bind = $mainMod CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1 && notify-send 'Set to expand external display'
|
||||
|
||||
# Internal display controls
|
||||
bind = $mainMod ALT, E, exec, hyprctl keyword monitor eDP-1, 2880x1800@60, 0x0, 1.5 && notify-send 'Set to battery optimized display settings'
|
||||
bind = $mainMod ALT, P, exec, hyprctl keyword monitor eDP-1, preferred, 0x0, 1.5 && notify-send 'Set to performance optimized display settings'
|
96
laptop/configs/hypr/hyprlock.conf
Normal file
96
laptop/configs/hypr/hyprlock.conf
Normal file
@@ -0,0 +1,96 @@
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░
|
||||
#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
|
||||
#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒ ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒
|
||||
#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓
|
||||
#█ ████ ████ ████ ██████ ████ ████ ████████ █ ██ ██████████ ██████ █████ ██ ███ ████ █████ █
|
||||
#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
|
||||
general {
|
||||
grace = 15
|
||||
}
|
||||
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor =
|
||||
path = /home/janis/Pictures/arch-bg.png # Or screenshot
|
||||
|
||||
blur_passes = 1
|
||||
}
|
||||
|
||||
# PASSWORD INPUT
|
||||
input-field {
|
||||
monitor =
|
||||
size = 300, 40
|
||||
outline_thickness = 3
|
||||
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = false
|
||||
outer_color = rgb(204, 92, 0)
|
||||
inner_color = rgb(200, 200, 200)
|
||||
font_color = rgb(10, 10, 10)
|
||||
fade_on_empty = true
|
||||
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
|
||||
hide_input = false
|
||||
|
||||
position = 0, -80
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = <b>$TIME</b>
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 100
|
||||
font_family = Source Code Pro
|
||||
|
||||
position = 0, 80
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 12
|
||||
font_family = Source Code Pro
|
||||
|
||||
position = 0, 0
|
||||
halign = right
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = $USER
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 12
|
||||
font_family = Source Code Pro
|
||||
|
||||
position = 0, 0
|
||||
halign = left
|
||||
valign = bottom
|
||||
shadow_passes = 3
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = <i>Failed attempts: $ATTEMPTS</i>
|
||||
color = rgba(200, 0, 0, 1.0)
|
||||
font_size = 12
|
||||
font_family = Source Code Pro
|
||||
|
||||
position = 0, 20
|
||||
halign = center
|
||||
valign = bottom
|
||||
shadow_passes = 3
|
||||
shadow_size = 5
|
||||
shadow_boost = 3
|
||||
shadow_color = rgb(255,255,255)
|
||||
}
|
||||
|
BIN
laptop/configs/hypr/wall_4K.png
Executable file
BIN
laptop/configs/hypr/wall_4K.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
8
laptop/configs/hypr/xdg-portal-hyprland
Executable file
8
laptop/configs/hypr/xdg-portal-hyprland
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
sleep 1
|
||||
killall xdg-desktop-portal-hyprland
|
||||
killall xdg-desktop-portal-wlr
|
||||
killall xdg-desktop-portal
|
||||
/usr/libexec/xdg-desktop-portal-hyprland &
|
||||
sleep 2
|
||||
/usr/lib/xdg-desktop-portal &
|
137
laptop/configs/waybar/config.jsonc
Executable file
137
laptop/configs/waybar/config.jsonc
Executable file
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"mod": "dock",
|
||||
"exclusive": true,
|
||||
"passthrough": false,
|
||||
"gtk-layer-shell": true,
|
||||
"height": 0,
|
||||
"modules-left": [
|
||||
"clock",
|
||||
"cpu",
|
||||
"memory",
|
||||
"battery",
|
||||
"backlight",
|
||||
"hyprland/workspaces"
|
||||
],
|
||||
"modules-center": ["hyprland/window"],
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"network",
|
||||
"pulseaudio",
|
||||
"pulseaudio#microphone",
|
||||
"custom/powerMenu"
|
||||
],
|
||||
"hyprland/window": {
|
||||
"format": "{}"
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 14,
|
||||
"spacing": 8
|
||||
},
|
||||
"custom/powerMenu": {
|
||||
"format": "⏻",
|
||||
"on-click": "rofi -show p -modi p:rofi-power-menu -theme ~/.config/rofi/themes/power.rasi"
|
||||
},
|
||||
"network": {
|
||||
"format-disconnected": " Net",
|
||||
"format-wifi": "{icon} {essid}",
|
||||
"format-ethernet": " Wired",
|
||||
"tooltip-format-ethernet": "<big>Ethernet</big>\nInterface: {ifname}\nIP: {ipaddr}\nUp/Down (bps): {bandwidthUpBits}/{bandwidthDownBits}",
|
||||
"tooltip-format-wifi": "<big>Wi-Fi</big>\nSSID: {essid}\nIP: {ipaddr}\nSignal strength: {signalStrength}%\nUp/Down (bps): {bandwidthUpBits}/{bandwidthDownBits}\nFrequency: {frequency}GHz",
|
||||
"tooltip-format-disconnected": "<big>Networking</big>\n{ifname} disconnected",
|
||||
"on-click": "terminator -x nmtui",
|
||||
"format-icons": ["", "", "", ""]
|
||||
},
|
||||
"battery":{
|
||||
"states": {
|
||||
"95": 100,
|
||||
"85": 90,
|
||||
"75": 80,
|
||||
"65": 70,
|
||||
"55": 60,
|
||||
"45": 50,
|
||||
"35": 40,
|
||||
"25": 30,
|
||||
"15": 20,
|
||||
"5": 10,
|
||||
"critical": 0,
|
||||
},
|
||||
"format":" {capacity}",
|
||||
"format-95": " {capacity}",
|
||||
"format-85": " {capacity}",
|
||||
"format-75": " {capacity}",
|
||||
"format-65": " {capacity}",
|
||||
"format-55": " {capacity}",
|
||||
"format-45": " {capacity}",
|
||||
"format-35": " {capacity}",
|
||||
"format-25": " {capacity}",
|
||||
"format-15": " {capacity}",
|
||||
"format-15": " {capacity}",
|
||||
"format-critical": " {capacity}",
|
||||
"format-charging":" {capacity}",
|
||||
"format-plugged": " ",
|
||||
"format-full": " 100",
|
||||
"format-empty": " ({capacity}%)",
|
||||
"tooltip-format":"<big>Battery</big>\nCurrently {timeTo}\nCurrently drawing: {power}W\nBattery status: {capacity}%"
|
||||
},
|
||||
"backlight": {
|
||||
"stages": {
|
||||
"high": 50,
|
||||
"low": 0,
|
||||
},
|
||||
"format": "🌣 {percent}",
|
||||
"format-high": " {percent}",
|
||||
"format-low": " {percent}",
|
||||
"tooltip-format": "<big>Brightness</big>\n🌣 {percent}",
|
||||
"on-scroll-up": "light -A 1",
|
||||
"on-scroll-down": "light -U 1"
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a, %d.%m %H:%M:%S}",
|
||||
"tooltip-format": "<big>Calendar</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"interval": 1
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": true,
|
||||
"on-click": "activate",
|
||||
"format": "{icon}"
|
||||
},
|
||||
"cpu": {
|
||||
"tooltip-format": "<big>CPU</big>\n<tt>Total: {usage}</tt>",
|
||||
"format": " {usage}",
|
||||
"interval": 5
|
||||
},
|
||||
"memory": {
|
||||
"format": " {percentage}",
|
||||
"interval": 5
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}",
|
||||
"tooltip": true,
|
||||
"format-muted": " Off",
|
||||
"on-click": "pamixer -t",
|
||||
"on-scroll-up": "pamixer -i 5",
|
||||
"on-scroll-down": "pamixer -d 5",
|
||||
"scroll-step": 5,
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "🏎",
|
||||
"default": ["", "", ""]
|
||||
}
|
||||
},
|
||||
"pulseaudio#microphone": {
|
||||
"format": "{format_source}",
|
||||
"format-source": " {volume}",
|
||||
"format-source-muted": " 0",
|
||||
"on-click": "pamixer --default-source -t",
|
||||
"on-scroll-up": "pamixer --default-source -i 5",
|
||||
"on-scroll-down": "pamixer --default-source -d 5",
|
||||
"scroll-step": 5
|
||||
}
|
||||
}
|
196
laptop/configs/waybar/scripts/supower.py
Executable file
196
laptop/configs/waybar/scripts/supower.py
Executable file
@@ -0,0 +1,196 @@
|
||||
#!/usr/bin/python
|
||||
# pylint: disable=missing-module-docstring
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
import dbus
|
||||
import click
|
||||
|
||||
FBOOL = ('no', 'yes')
|
||||
PROPERTIES = {
|
||||
'BatteryLevel': ('unknown', 'none', 'low', 'critical', 'normal', 'high', 'full'),
|
||||
'Capacity': None,
|
||||
'Energy': None,
|
||||
'EnergyEmpty': None,
|
||||
'EnergyFull': None,
|
||||
'EnergyFullDesign': None,
|
||||
'EnergyRate': None,
|
||||
'HasHistory': FBOOL,
|
||||
'HasStatistics': FBOOL,
|
||||
'IconName': None,
|
||||
'IsPresent': FBOOL,
|
||||
'IsRechargeable': FBOOL,
|
||||
'Luminosity': None,
|
||||
'Model': None,
|
||||
'NativePath': None,
|
||||
'Online': FBOOL,
|
||||
'Percentage': None,
|
||||
'PowerSupply': FBOOL,
|
||||
'Serial': None,
|
||||
'State': ('unknown', 'charging', 'discharging', 'empty', 'fully charged',
|
||||
'pending charge','pending discharge'),
|
||||
'Technology': ('unknown', 'lithium ion', 'lithium polymer', 'lithium iron phosphate',
|
||||
'lead acid', 'nickel cadmium', 'nickel metal hydride'),
|
||||
'Temperature': None,
|
||||
'TimeToEmpty': None,
|
||||
'TimeToFull': None,
|
||||
'Type': ('unknown', 'line-power', 'battery', 'ups', 'monitor', 'mouse', 'keyboard',
|
||||
'pda', 'phone', 'media-player', 'tablet', 'computer', 'gaming_input',
|
||||
'pen', 'touchpad', 'modem', 'network', 'headset', 'speakers',
|
||||
'headphones', 'video', 'other_audio', 'remote_control', 'printer', 'scanner',
|
||||
'camera', 'wearable', 'toy', 'bluetooth-generic'),
|
||||
'UpdateTime': None,
|
||||
'Vendor': None,
|
||||
'Voltage': None,
|
||||
'WarningLevel': ('unknown', 'none', 'discharging', 'low', 'critical', 'action')
|
||||
}
|
||||
|
||||
|
||||
def get_tooltip(_type):
|
||||
#TOOLTIP_OTHER=""" luminosity: {Luminosity}""" I don't have a way to test this property
|
||||
header = ('native-path: {NativePath}'
|
||||
'\npower supply: {PowerSupply}'
|
||||
'\nupdated: {UpdateTime}'
|
||||
'\nhas history: {HasHistory}'
|
||||
'\nhas statistics: {HasStatistics}')
|
||||
|
||||
body = ('\n{Type}'
|
||||
'\n warning-level: {WarningLevel}'
|
||||
'\n icon-name: {IconName}')
|
||||
|
||||
if _type == 'line-power':
|
||||
body += '\n online: {Online}'
|
||||
|
||||
else:
|
||||
header += ('\nmodel: {Model}'
|
||||
'\nserial: {Serial}')
|
||||
|
||||
body += ('\n percentage: {Percentage}%'
|
||||
'\n present: {IsPresent}')
|
||||
|
||||
if _type == "battery":
|
||||
header += ('\nvendor: {Vendor}')
|
||||
body += ('\n state: {State}'
|
||||
'\n rechargeable: {IsRechargeable}'
|
||||
'\n energy: {Energy} Wh'
|
||||
'\n energy-empty: {EnergyEmpty} Wh'
|
||||
'\n energy-full: {EnergyFull} Wh'
|
||||
'\n energy-full-design: {EnergyFullDesign} Wh'
|
||||
'\n energy-rate: {EnergyRate} W'
|
||||
'\n voltage: {Voltage} V'
|
||||
'\n capacity: {Capacity}%'
|
||||
'\n technology: {Technology}'
|
||||
'\n temperature: {Temperature}'
|
||||
'\n time-to-empty: {TimeToEmpty}'
|
||||
'\n time-to-full: {TimeToFull}'
|
||||
'\n battery-level: {BatteryLevel}')
|
||||
|
||||
return f'{header}{body}'
|
||||
|
||||
|
||||
def device_info(bus, device):
|
||||
"""Lookup device properties"""
|
||||
result = {}
|
||||
device_proxy = bus.get_object('org.freedesktop.UPower', device)
|
||||
device_interface = dbus.Interface(device_proxy, 'org.freedesktop.DBus.Properties')
|
||||
for _property, friendly_name in PROPERTIES.items():
|
||||
try:
|
||||
data = device_interface.Get('org.freedesktop.UPower.Device', _property)
|
||||
if _property == 'UpdateTime':
|
||||
result[_property] = time.ctime(data)
|
||||
else:
|
||||
result[_property] = friendly_name[data] if friendly_name else data
|
||||
except (dbus.exceptions.DBusException, IndexError):
|
||||
result[_property] = 'none'
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def get_devices(bus):
|
||||
"""Retrieve list of Upower devices"""
|
||||
devices_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower')
|
||||
devices_interface = dbus.Interface(devices_proxy, 'org.freedesktop.UPower')
|
||||
devices = devices_interface.EnumerateDevices()
|
||||
|
||||
return devices
|
||||
|
||||
|
||||
def get_device(bus, devices, device):
|
||||
"""Retrieve Upower device using path or model"""
|
||||
|
||||
if device in devices:
|
||||
return device
|
||||
|
||||
for path in devices:
|
||||
inspect = device_info(bus, path)
|
||||
if inspect.get('Model') == device:
|
||||
return path
|
||||
|
||||
raise Exception("Device Not Found")
|
||||
|
||||
|
||||
def output_devices(bus, devices):
|
||||
"""Output device list"""
|
||||
for device in devices:
|
||||
print(f'{device}\t{device_info(bus, device).get("Model")}')
|
||||
sys.exit(0)
|
||||
|
||||
def check_device(key, info):
|
||||
sys.exit(FBOOL.index(info.get(key.replace('{','').replace('}', ''))))
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option('--list-devices', is_flag=True, help='List devices and models')
|
||||
@click.option('--check', help='Exists using boolean values for device')
|
||||
@click.option('--device', '--model', help='Path or Model')
|
||||
@click.option('--text', show_default=True, default="{Model}")
|
||||
@click.option('--alt', show_default=True, default="{BatteryLevel}")
|
||||
@click.option('--tooltip', default=None, help="Similar to upower -i <device>")
|
||||
@click.option('--class', '_class', show_default=True, default="{BatteryLevel}")
|
||||
@click.option('--percentage', show_default=True, default="{Percentage:.0f}")
|
||||
def main(list_devices, check, device, text, alt, tooltip, _class, percentage):
|
||||
"""
|
||||
TEXT can be replaced using one or more {KEY}\n
|
||||
{BatteryLevel} {Capacity} {Energy} {EnergyEmpty} {EnergyFull}
|
||||
{EnergyFullDesign} {EnergyRate} {HasHistory} {HasStatistics}
|
||||
{IconName} {IsPresent} {IsRechargeable} {Luminosity}
|
||||
{Model} {NativePath} {Online} {Percentage} {PowerSupply}
|
||||
{Serial} {State} {Technology} {Temperature} {TimeToEmpty}
|
||||
{TimeToFull} {Type} {UpdateTime} {Vendor} {Voltage}
|
||||
{WarningLevel}
|
||||
|
||||
Example: supower.py --model 'MX Master 2S' --tooltip '{State}'
|
||||
supower.py --model '/org/freedesktop/UPower/devices/line_power_AC' --check Online
|
||||
|
||||
"""
|
||||
exit = 0
|
||||
bus = dbus.SystemBus()
|
||||
devices = get_devices(bus)
|
||||
|
||||
if list_devices:
|
||||
output_devices(bus, devices)
|
||||
|
||||
try:
|
||||
device = get_device(bus, devices, device)
|
||||
info = device_info(bus, device)
|
||||
if check:
|
||||
check_device(check, info)
|
||||
|
||||
output = {
|
||||
"text": text.format(**info),
|
||||
"alt": alt.format(**info),
|
||||
"tooltip": (tooltip if tooltip else get_tooltip(info['Type'])).format(**info),
|
||||
"class": _class.format(**info),
|
||||
"percentage": float(percentage.format(**info))
|
||||
}
|
||||
except Exception as error:
|
||||
output = {"text": f'Error {device.split("/")[-1]} {error}', 'tooltip': f'{error}'}
|
||||
exit = 2
|
||||
|
||||
print(json.dumps(output))
|
||||
sys.exit(exit)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# pylint: disable=no-value-for-parameter
|
||||
main()
|
135
laptop/configs/waybar/style.css
Executable file
135
laptop/configs/waybar/style.css
Executable file
@@ -0,0 +1,135 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: 'FluentSystemIcons-Regular,Comfortaa', monospace;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
min-height: 0;
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
color: #cdd6f4;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: #1e1e2e;
|
||||
border-radius: 10px;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
border-color: #11111b;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 3px;
|
||||
color: #313244;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #a6adc8;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #a6adc8;
|
||||
background: #eba0ac;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #11111b;
|
||||
background: #a6e3a1;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: #11111b;
|
||||
color: #cdd6f4;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background: #1e1e2e;
|
||||
border-radius: 10px;
|
||||
margin-left: 10px;
|
||||
padding-right: 0px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#window,
|
||||
#clock,
|
||||
#custom-powerMenu,
|
||||
#pulseaudio,
|
||||
#memory,
|
||||
#battery,
|
||||
#backlight,
|
||||
#tray,
|
||||
#network,
|
||||
#workspaces,
|
||||
#cpu {
|
||||
background: #000024;
|
||||
padding: 2px 12px;
|
||||
margin: 3px 2px;
|
||||
margin-top: 9px;
|
||||
border: 1px solid #181825;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
border-radius: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
margin-right: 0;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
background-color: #222244;
|
||||
}
|
||||
|
||||
#memory, #battery {
|
||||
color: #89b4fa;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
border-radius: 0px;
|
||||
background-color: #222244;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
color: #89b4fa;
|
||||
margin-left: 0;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
background-color: #222244;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#battery.empty {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#window {
|
||||
border-radius: 10px;
|
||||
margin-left: 60px;
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: #a6f7ad;
|
||||
min-width: 145px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #89b4fa;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
#pulseaudio.microphone {
|
||||
color: #a6f7ad;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
}
|
Reference in New Issue
Block a user