personal dotfiles: my Hyprland config
update hyprland-related config
I tried out ashell, but it eats CPU
| -rw-r--r-- | .config/ashell/config.toml | 46 | ||||
| -rw-r--r-- | .config/foot/foot.ini | 26 | ||||
| -rw-r--r-- | .config/hypr/hyprland.conf | 47 | ||||
| -rw-r--r-- | .config/sys64/menu/config.conf | 8 | ||||
| -rw-r--r-- | .config/waybar/config | 10 | ||||
| -rw-r--r-- | .config/waybar/style.css | 6 | ||||
| -rw-r--r-- | .config/xdg-desktop-portal/hyprland-portals.conf | 3 | ||||
| l--------- | .local/bin/xdg-terminal-exec | 1 |
8 files changed, 128 insertions, 19 deletions
diff --git a/.config/ashell/config.toml b/.config/ashell/config.toml new file mode 100644 index 0000000..2caa3cf --- /dev/null +++ b/.config/ashell/config.toml @@ -0,0 +1,46 @@ +[modules] +left = [ "Workspaces" ] +center = [ ] +#[ [ "Clock", "SystemInfo" ], "MediaPlayer" ] +right = [ [ "Privacy", "SystemInfo", "CustomNotifications", "Settings" ] ] + +[system] +indicators = ["Temperature"] + +[clock] +format = "%H:%M" + +[appearance] +scale_factor = 0.875 +opacity = 0.75 +style = "Solid" +# backdrop = 0.3 + +workspace_colors = ["#bbbbbb"] + +[appearance.background_color] +base = "#000000" +#strong = "#448888" +#weak = "#448855" +#text = "#ffffff" + +[appearance.primary_color] +base = "#4488ff" +#strong = "#448888" + +[[CustomModule]] +# The name will link the module in your left/center/right definition +name = "CustomNotifications" +# The default icon for this custom module +icon = "" +# The command that will be executed on click +command = "swaync-client -t -sw" +# You can optionally configure your custom module to update the UI using another command +# The output right now follows the waybar json-style output, using the `alt` and `text` field +# E.g. `{"text": "3", "alt": "notification"}` +listen_cmd = "swaync-client -swb" +# You can define behavior for the `text` and `alt` fields +# Any number of regex can be used to change the icon based on the alt field +icons.'dnd.*' = "" +# Another regex can optionally show a red "alert" dot on the icon +alert = ".*notification" diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100644 index 0000000..d276314 --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,26 @@ +# Space to setup configversion +# configversion: 13fb3d2d9f97f4420f7506e72b90e77d +font=monospace:size=11 +dpi-aware=no + +[colors] +alpha=0.7 +foreground=eaeaea +background=303030 +regular0=1e1e1e # black +regular1=d54e53 # red +regular2=b9ca4a # green +regular3=e6c547 # yellow +regular4=7aa6da # blue +regular5=c397d8 # magenta +regular6=70c0ba # cyan +regular7=eaeaea # white +bright0=666666 # bright black +bright1=ff3334 # bright red +bright2=9ec400 # bright green +bright3=e7c547 # bright yellow +bright4=7aa6da # bright blue +bright5=b77ee0 # bright magenta +bright6=54ced6 # bright cyan +bright7=ffffff # bright white + diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index ea559cc..361635e 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,38 +1,41 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,preferred,auto,auto +#monitor=,preferred,auto,auto monitor=DSI-1,preferred,auto,2.66666 misc:disable_hyprland_qtutils_check = true render { - explicit_sync = 0 - explicit_sync_kms = 0 direct_scanout = false } # gnome 47 vulkan segfaults env = GSK_RENDERER,ngl +# tell firefox/gtk apps to use phosh picker +env = GTK_USE_PORTAL,1 # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch +exec-once = /usr/libexec/pipewire-launcher # exec-once = waybar & hyprpaper & firefox exec-once = swaybg -i ~/Pictures/background.jpg -m center exec-once = sleep 2 && waybar +# ashell sometimes eats CPU +# exec-once = sleep 1 && ashell exec-once = swaync # config ~~mako~~ swaync notifications with switch exec-once = switch.sh -exec-once = sysshell +#exec-once = sysshell # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf +env = MOZ_ENABLE_WAYLAND,1 +exec-once = sysmenu # Set programs that you use -env = SXMO_TERMINAL,vte-2.91 -T 30 --whole-window-transparent -n 300 --use-theme-colors -- -env = TERMINAL,sxmo_terminal.sh -$terminal = vte-2.91 -$terminal_opts = -T 30 --whole-window-transparent -n 300 --use-theme-colors +$terminal = xdg-terminal-exec +$terminal_opts = exec-once = $terminal $terminal_opts $fileManager = dev.tchx84.Portfolio # $menu = bemenu-run -s -n -w -c -l8 -M 40 -H 20 @@ -40,7 +43,8 @@ $dmenu = bemenu --scrollbar autohide -s -n -w -c -l12 -M 40 -H 20 #--cb 22222288 #$menu = rofi -show drun #$menu = exec $(j4-dmenu-desktop --no-generic --dmenu="$dmenu" --term="$terminal" --no-exec |sed 's/ -e/ --/g') # $menu = nwggrid -s 70 -$menu = pkill -10 sysshell +# $menu = pkill -10 sysshell +$menu = pkill -RTMIN sysmenu $keyboard = wvkbd-mobintl $keyboard_args = -l simple,specialpad -H 160 -O --bg 22222288 | swipeB # starting the keyboard is bad because of a wvkbd bug where it burns CPU? @@ -56,6 +60,8 @@ env = QT_QPA_SYSTEM_ICON_THEME,breeze # Some default env vars. env = XCURSOR_SIZE,24 +exec-once = openrc --user + # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { #kb_layout = us @@ -143,6 +149,12 @@ misc { force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers } +layerrule = blur, syslock + +# ashell blur +layerrule = ignorealpha 0.5, ashell-main-layer +layerrule = blur, ashell-main-layer + # Swaync Blur layerrule = blur, swaync-control-center layerrule = blur, swaync-notification-window @@ -153,6 +165,15 @@ layerrule = ignorezero, swaync-notification-window layerrule = ignorealpha 0.5, swaync-control-center layerrule = ignorealpha 0.5, swaync-notification-window +layerrule = blur, sysmenu +layerrule = ignorealpha 0.5, sysmenu + + +layerrule = abovelock true, wvkbd + +layerrule = abovelock false, ashell-main-layer + + # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER @@ -209,12 +230,14 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow bindi = , XF86AudioRaiseVolume, exec, $menu +bindi = , XF86AudioRaiseVolume, exec, pgrep sysmenu || sysmenu + # need a lock screen to avoid triggering this when screen is off. #bindi = , XF86AudioRaiseVolume, exec, hyprctl dispatch submap menu; $menu; hyprctl dispatch submap reset -bindi = , XF86AudioLowerVolume, exec, pkill -SIGRTMIN -f suggpicker -bindi = , XF86AudioLowerVolume, exec, pkill -SIGRTMIN -f wvkbd-mobintl +bindli = , XF86AudioLowerVolume, exec, pkill -SIGRTMIN -f suggpicker +bindli = , XF86AudioLowerVolume, exec, pkill -SIGRTMIN -f wvkbd-mobintl # if someone killed the keyboard, restart it -bindi =, XF86AudioLowerVolume, execr, pgrep $keyboard || $keyboard $keyboard_args +bindli =, XF86AudioLowerVolume, execr, pgrep $keyboard || $keyboard $keyboard_args # toggle screen on/off bindli = , XF86PowerOff, exec, hyprctl dispatch dpms $(hyprctl -j monitors | jq -r 'first|.dpmsStatus|if . then "off" else "on" end') diff --git a/.config/sys64/menu/config.conf b/.config/sys64/menu/config.conf index adfa6b3..9753dce 100644 --- a/.config/sys64/menu/config.conf +++ b/.config/sys64/menu/config.conf @@ -1,9 +1,9 @@ [main] start-hidden=true searchbar=true -icon-size=64 -dock-icon-size=64 -app-margins=-10 +icon-size=50 +dock-icon-size=0 +app-margins=-30 name-under-icon=true scroll-bars=false name-length=10 @@ -14,4 +14,4 @@ monitor=0 layer-shell=true dock-items= anchors=top bottom left right -animation-duration=250 +animation-duration=0 diff --git a/.config/waybar/config b/.config/waybar/config index 187e47e..a96d7ab 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -5,7 +5,7 @@ // Choose the order of the modules "modules-left": ["sway/workspaces", "hyprland/workspaces", "sway/mode", "hyprland/submap", "sway/scratchpad", "custom/media"], "modules-center": [], - "modules-right": ["clock","backlight", "temperature", "network", "battery", "pulseaudio", "tray"], + "modules-right": ["clock","backlight", "temperature", "network", "upower","pulseaudio", "tray"], // Modules configuration // "sway/workspaces": { // "disable-scroll": true, @@ -101,7 +101,15 @@ "format-icons": ["", "", "", "", "", "", "", "", ""], "on-click": "swaync-client -t" //"brightnessctl s $(( ( $(brightnessctl g) + ( $(brightnessctl m) / 8 ) ) % $(brightnessctl m) ))" }, + "upower":{ + "format": "", + "format-alt": "{percentage}", + "icon-size":15, + + }, "battery": { + "bat": "bq27411-0", + "bat-compatibility":true, "states": { // "good": 95, "warning": 30, diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 031a74e..9c4677a 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -75,6 +75,7 @@ button:hover { #clock, #battery, +#upower, #cpu, #memory, #disk, @@ -107,12 +108,13 @@ button:hover { .modules-right > widget:last-child > #workspaces { margin-right: 0; } -#battery { +#battery,#upower { background-color: #ffffff; color: #000000; } -#battery.charging, #battery.plugged { +#battery.charging, #battery.plugged, +#upower.charging, #upower.plugged { color: #ffffff; background-color: #26A65B; } diff --git a/.config/xdg-desktop-portal/hyprland-portals.conf b/.config/xdg-desktop-portal/hyprland-portals.conf new file mode 100644 index 0000000..6045dbf --- /dev/null +++ b/.config/xdg-desktop-portal/hyprland-portals.conf @@ -0,0 +1,3 @@ +[preferred] +default=hyprland;gtk +org.freedesktop.impl.portal.FileChooser=phosh;kde diff --git a/.local/bin/xdg-terminal-exec b/.local/bin/xdg-terminal-exec new file mode 120000 index 0000000..933bd36 --- /dev/null +++ b/.local/bin/xdg-terminal-exec @@ -0,0 +1 @@ +/usr/bin/foot
\ No newline at end of file |