aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-09-20 06:13:19 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-09-20 06:13:19 +0200
commit52123415276f6eab7f9134a2db9e67d1d1d6ccc5 (patch)
tree6ae31e34063ea590e72aa9b0135cfab00b9584d1
parent310173caa805c7b97e4bfcc96d979177011d4fca (diff)
Basic config for trying out hyprland
-rw-r--r--.config/hypr/hyprland.conf114
-rw-r--r--.config/swayidle/config3
-rw-r--r--.config/swaylock/config2
-rw-r--r--.config/waybar/config-hyprland-bot.json24
-rw-r--r--.config/waybar/config-hyprland-top.json93
-rw-r--r--.config/waybar/style.css140
6 files changed, 376 insertions, 0 deletions
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf
new file mode 100644
index 0000000..fada0f1
--- /dev/null
+++ b/.config/hypr/hyprland.conf
@@ -0,0 +1,114 @@
+monitor=,preferred,auto,1
+
+exec-once=waybar -c ~/.config/waybar/config-hyprland-top.json
+exec-once=waybar -c ~/.config/waybar/config-hyprland-bot.json
+exec-once=dunst
+exec-once=swayidle
+# TODO: Wallpaper
+# TODO: polkit agent
+# TODO: PipeWire
+
+input {
+ kb_file=
+ kb_layout=
+ kb_variant=
+ kb_model=
+ kb_options=
+ kb_rules=
+
+ follow_mouse=1
+
+ touchpad {
+ natural_scroll=no
+ }
+
+ sensitivity=0 # -1.0 - 1.0, 0 means no modification.
+}
+
+general {
+ main_mod=SUPER
+ layout=master
+
+ gaps_in=4
+ gaps_out=8
+ border_size=2
+ col.active_border=0x663381da
+ col.inactive_border=0x66cccccc
+
+ apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
+
+ damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer
+}
+
+decoration {
+ rounding=0
+ blur=1
+ blur_size=3 # minimum 1
+ blur_passes=1 # minimum 1
+ blur_new_optimizations=1
+}
+
+animations {
+ enabled=0
+ animation=windows,1,7,default
+ animation=border,1,10,default
+ animation=fade,1,10,default
+ animation=workspaces,1,6,default
+}
+
+dwindle {
+ pseudotile=0 # enable pseudotiling on dwindle
+}
+
+gestures {
+ workspace_swipe=no
+}
+
+# example window rules
+# for windows named/classed as abc and xyz
+#windowrule=move 69 420,abc
+#windowrule=size 420 69,abc
+#windowrule=tile,xyz
+#windowrule=float,abc
+#windowrule=pseudo,abc
+#windowrule=monitor 0,xyz
+
+# Keybinds
+bind=SUPER,RETURN,exec,alacritty
+bind=SUPER,X,killactive,
+bind=SUPER_SHIFT,X,exit,
+bind=SUPER,E,exec,fuzzel
+bind=SUPER_SHIFT,S,exec,loginctl lock-session
+
+bind=SUPER,J,layoutmsg,cyclenext
+bind=SUPER,K,layoutmsg,cycleprev
+bind=SUPER_SHIFT,RETURN,layoutmsg,swapwithmaster
+bind=SUPER_SHIFT,J,layoutmsg,swapnext
+bind=SUPER_SHIFT,K,layoutmsg,swapprev
+bind=SUPER_SHIFT,H,layoutmsg,addmaster
+bind=SUPER_SHIFT,L,layoutmsg,removemaster
+bind=SUPER,SPACE,layoutmsg,orientationnext
+bind=SUPER_SHIFT,SPACE,layoutmsg,orientationprev
+
+bind=SUPER,2,workspace,1
+bind=SUPER,3,workspace,2
+bind=SUPER,4,workspace,3
+bind=SUPER,5,workspace,4
+bind=SUPER,6,workspace,5
+bind=SUPER,7,workspace,6
+bind=SUPER,8,workspace,7
+bind=SUPER,9,workspace,8
+bind=SUPER,0,workspace,9
+
+bind=SUPER_SHIFT,2,movetoworkspace,1
+bind=SUPER_SHIFT,3,movetoworkspace,2
+bind=SUPER_SHIFT,4,movetoworkspace,3
+bind=SUPER_SHIFT,5,movetoworkspace,4
+bind=SUPER_SHIFT,6,movetoworkspace,5
+bind=SUPER_SHIFT,7,movetoworkspace,6
+bind=SUPER_SHIFT,8,movetoworkspace,7
+bind=SUPER_SHIFT,9,movetoworkspace,8
+bind=SUPER_SHIFT,0,movetoworkspace,9
+
+bind=SUPER,mouse_down,workspace,e+1
+bind=SUPER,mouse_up,workspace,e-1
diff --git a/.config/swayidle/config b/.config/swayidle/config
new file mode 100644
index 0000000..74dd0fb
--- /dev/null
+++ b/.config/swayidle/config
@@ -0,0 +1,3 @@
+timeout 90 loginctl lock-session
+
+lock "swaylock -c 000000"
diff --git a/.config/swaylock/config b/.config/swaylock/config
new file mode 100644
index 0000000..6004b6e
--- /dev/null
+++ b/.config/swaylock/config
@@ -0,0 +1,2 @@
+daemonize
+show-failed-attempts
diff --git a/.config/waybar/config-hyprland-bot.json b/.config/waybar/config-hyprland-bot.json
new file mode 100644
index 0000000..1daf3eb
--- /dev/null
+++ b/.config/waybar/config-hyprland-bot.json
@@ -0,0 +1,24 @@
+{
+ "name": "waybar-bot",
+ "layer": "top",
+ "position": "bottom",
+ "height": 20,
+ "spacing": 4,
+ "modules-left": [
+ "hyprland/workspaces",
+ "hyprland/window"
+ ],
+ "modules-center": [
+ ],
+ "modules-right": [
+ ],
+ "hyprland/workspaces": {
+ "format": "{icon}",
+ "on-scroll-up": "hyprctl dispatch workspace e+1",
+ "on-scroll-down": "hyprctl dispatch workspace e-1"
+ },
+ "hyprland/window": {
+ "max-length": 200,
+ "seperate-outputs": true
+ }
+}
diff --git a/.config/waybar/config-hyprland-top.json b/.config/waybar/config-hyprland-top.json
new file mode 100644
index 0000000..9682abe
--- /dev/null
+++ b/.config/waybar/config-hyprland-top.json
@@ -0,0 +1,93 @@
+{
+ "name": "waybar-top",
+ "layer": "top",
+ "position": "top",
+ "height": 20,
+ "spacing": 4,
+ "modules-left": [
+ "cpu",
+ "memory",
+ "disk",
+ "network"
+ ],
+ "modules-center": [
+ "clock"
+ ],
+ "modules-right": [
+ "pulseaudio",
+ "temperature",
+ "backlight",
+ "battery",
+ "idle_inhibitor",
+ "tray"
+ ],
+ "idle_inhibitor": {
+ "format": "{icon}",
+ "format-icons": {
+ "activated": "",
+ "deactivated": ""
+ }
+ },
+ "tray": {
+ "spacing": 10
+ },
+ "clock": {
+ "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
+ "format-alt": "{:%Y-%m-%d}"
+ },
+ "cpu": {
+ "format": "CPU: {usage}%",
+ "tooltip": false
+ },
+ "memory": {
+ "format": "RAM: {}%"
+ },
+ "temperature": {
+ "critical-threshold": 80,
+ "format": "{temperatureC}°C 🫠"
+ },
+ "backlight": {
+ "format": "{percent}% 💡"
+ },
+ "battery": {
+ "states": {
+ "warning": 30,
+ "critical": 15
+ },
+ "format": "{capacity}% 🔋",
+ "format-charging": "{capacity}% ⚡",
+ "format-plugged": "{capacity}% 🔌",
+ "format-alt": "{time} {icon}"
+ },
+ "network": {
+ "format": "RX: {bandwidthDownBits} kbps / TX: {bandwidthUpBits} kbps",
+ "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}"
+ },
+ "pulseaudio": {
+ "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"
+ }
+}
diff --git a/.config/waybar/style.css b/.config/waybar/style.css
new file mode 100644
index 0000000..e322c10
--- /dev/null
+++ b/.config/waybar/style.css
@@ -0,0 +1,140 @@
+* {
+ font-family: Monospace;
+ font-size: 12px;
+}
+
+window#waybar {
+ background-color: rgba(43, 48, 59, 0.5);
+ color: #ffffff;
+ transition-property: background-color;
+ transition-duration: .5s;
+}
+
+window.waybar-top {
+ border-bottom: 1px solid rgba(100, 114, 125, 0.5);
+}
+
+window.waybar-bot {
+ border-top: 1px solid rgba(100, 114, 125, 0.5);
+}
+
+window#waybar.hidden {
+ opacity: 0.2;
+}
+
+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 4px;
+ color: #ffffff;
+ background-color: rgba(53, 58, 69, 0.5);
+}
+
+#clock {
+ background-color: inherit;
+}
+
+#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;
+}
+
+@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;
+}
+
+#wireplumber {
+ color: #000000;
+}
+
+#tray > .passive {
+ -gtk-icon-effect: dim;
+}
+
+#tray > .needs-attention {
+ -gtk-icon-effect: highlight;
+ background-color: #eb4d4b;
+}
+
+#idle_inhibitor.activated {
+ background-color: #ecf0f1;
+ color: #2d3436;
+}