aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-02-19 22:25:35 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-02-19 22:25:35 +0000
commitbe81c4285b0a7cb004d1c930b6076eaa576d3a9d (patch)
treee4089474f0624defce512411fabbcce354723de4
parenta3a78af4f88ff93be5c8b3b6b7e980dc5b594ac8 (diff)
Add hyprland
-rw-r--r--hyprland/binds.conf99
-rw-r--r--hyprland/hyprland.conf6
-rw-r--r--hyprland/hyprpaper.conf3
-rw-r--r--hyprland/input.conf42
-rw-r--r--hyprland/monitors.conf9
-rw-r--r--hyprland/rules.conf7
-rw-r--r--hyprland/settings.conf79
-rw-r--r--hyprland/startup.conf17
-rw-r--r--hyprland/wallpaper.jpgbin0 -> 448718 bytes
-rw-r--r--waybar/config58
-rw-r--r--waybar/style.css11
11 files changed, 297 insertions, 34 deletions
diff --git a/hyprland/binds.conf b/hyprland/binds.conf
new file mode 100644
index 0000000..39ee7c8
--- /dev/null
+++ b/hyprland/binds.conf
@@ -0,0 +1,99 @@
+############
+# Keybinds #
+############
+
+$mainMod = SUPER
+
+# Programs
+bind = $mainMod, Return, exec, alacritty
+bind = $mainMod, Q, killactive,
+bind = $mainMod SHIFT, Space, togglefloating,
+bind = $mainMod, D, exec, pgrep -x wofi >/dev/null 2>&1 && killall wofi || wofi --show drun
+bind = $mainMod SHIFT, E, exec, ~/.config/hypr/exit-menu.sh
+
+# Move around
+bind = $mainMod, H, movefocus, l
+bind = $mainMod, J, movefocus, d
+bind = $mainMod, K, movefocus, u
+bind = $mainMod, L, movefocus, r
+bind = $mainMod, left, movefocus, l
+bind = $mainMod, right, movefocus, r
+bind = $mainMod, up, movefocus, u
+bind = $mainMod, down, movefocus, d
+
+# Move containers
+bind = $mainMod SHIFT, H, swapwindow, l
+bind = $mainMod SHIFT, J, swapwindow, d
+bind = $mainMod SHIFT, K, swapwindow, u
+bind = $mainMod SHIFT, L, swapwindow, r
+bind = $mainMod SHIFT, left, swapwindow, l
+bind = $mainMod SHIFT, right, swapwindow, r
+bind = $mainMod SHIFT, up, swapwindow, u
+bind = $mainMod SHIFT, down, swapwindow, d
+
+# Move workspaces
+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
+
+# Move containers to workspace
+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
+
+# Move/resize windows
+bindm = $mainMod, mouse:272, movewindow
+bindm = $mainMod, mouse:273, resizewindow
+
+# Groups
+bind = $mainMod, W, togglegroup,
+bind = $mainMod, Z, changegroupactive, b
+bind = $mainMod, X, changegroupactive, f
+
+# Screenshot
+bind = ,Print, exec, /usr/bin/grimblast --notify save area - | swappy -f -
+bind = Alt,Print, exec, /usr/bin/grimblast --notify copy area
+bind = SHIFT,Print, exec, /usr/bin/grimblast --notify save screen - | swappy -f -
+bind = SHIFT ALT,Print, exec, /usr/bin/grimblast --notify copy screen
+
+# Audio
+bind = ,XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
+bind = ,XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
+bind = ,XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
+
+# Playback
+bind = ,XF86AudioPrev, exec, playerctl previous
+bind = ,XF86AudioNext, exec, playerctl next
+bind = ,XF86AudioPlay, exec, playerctl play-pause
+
+# Brightness
+bind = ,XF86MonBrightnessDown, exec, brightnessctl set 5-
+bind = ,XF86MonBrightnessUp, exec, brightnessctl set +5
+
+# Zoom
+bind = $mainMod, mouse_up, exec, ~/bin/hyprctl-zoom.sh i
+bind = $mainMod, mouse_down, exec, ~/bin/hyprctl-zoom.sh d
+binde = $mainMod, grave, exec, ~/bin/hyprctl-zoom.sh i
+binde = $mainMod, Escape, exec, ~/bin/hyprctl-zoom.sh d
+
+# Scratchpad
+bind = $mainMod SHIFT, C, movetoworkspace, special:scratchpad
+bind = $mainMod, C, togglespecialworkspace, scratchpad
+bind = $mainMod, backslash, togglespecialworkspace, shadowplay
+
+#bind = ,XF86PowerOff, exec, swaylock
+
diff --git a/hyprland/hyprland.conf b/hyprland/hyprland.conf
new file mode 100644
index 0000000..630cc3a
--- /dev/null
+++ b/hyprland/hyprland.conf
@@ -0,0 +1,6 @@
+source = ~/.config/hypr/input.conf
+source = ~/.config/hypr/monitors.conf
+source = ~/.config/hypr/binds.conf
+source = ~/.config/hypr/rules.conf
+source = ~/.config/hypr/settings.conf
+source = ~/.config/hypr/startup.conf
diff --git a/hyprland/hyprpaper.conf b/hyprland/hyprpaper.conf
new file mode 100644
index 0000000..1a1bfb6
--- /dev/null
+++ b/hyprland/hyprpaper.conf
@@ -0,0 +1,3 @@
+preload = ~/.config/hypr/wallpaper.jpg
+
+wallpaper = ,~/.config/hypr/wallpaper.jpg
diff --git a/hyprland/input.conf b/hyprland/input.conf
new file mode 100644
index 0000000..b6050c9
--- /dev/null
+++ b/hyprland/input.conf
@@ -0,0 +1,42 @@
+#################
+# Input Devices #
+#################
+#
+# List input devices with
+# hyprctl devices
+#
+
+input {
+ kb_layout = gb
+ kb_variant =
+ kb_model =
+ kb_options =
+ kb_rules =
+ repeat_rate = 50
+ repeat_delay = 300
+
+ follow_mouse = 1
+
+ touchpad {
+ natural_scroll = yes
+ scroll_factor = 0.2
+ disable_while_typing = false
+ tap-to-click = false
+ }
+
+ sensitivity = 0
+}
+
+device:razer-razer-deathadder-v2 {
+ sensitivity = 0
+ accel_profile = flat
+}
+
+device:razer-razer-deathadder-v2-1 {
+ sensitivity = 0
+ accel_profile = flat
+}
+
+device:bm30x-mouse {
+ accel_profile = flat
+}
diff --git a/hyprland/monitors.conf b/hyprland/monitors.conf
new file mode 100644
index 0000000..93a202d
--- /dev/null
+++ b/hyprland/monitors.conf
@@ -0,0 +1,9 @@
+##################
+# Output Devices #
+##################
+#
+# List outputs with
+# hyprctl monitors
+#
+
+monitor = eDP-1, preferred, auto, 1.5
diff --git a/hyprland/rules.conf b/hyprland/rules.conf
new file mode 100644
index 0000000..6042b7e
--- /dev/null
+++ b/hyprland/rules.conf
@@ -0,0 +1,7 @@
+################
+# Window Rules #
+################
+
+windowrulev2 = workspace special:shadowplay,class:(gpu-screen-recorder-gtk)
+windowrule = nearestneighbor,^(discord)$
+windowrule = float,org.kde.polkit-kde-authentication-agent-
diff --git a/hyprland/settings.conf b/hyprland/settings.conf
new file mode 100644
index 0000000..dfaf6e4
--- /dev/null
+++ b/hyprland/settings.conf
@@ -0,0 +1,79 @@
+############
+# Settings #
+############
+
+general {
+ gaps_in = 2
+ gaps_out = 5
+ border_size = 2
+ col.active_border = rgba(657585ff)
+ col.inactive_border = rgba(59595977)
+
+ layout = dwindle
+
+ allow_tearing = false
+}
+
+decoration {
+ rounding = 0
+
+ blur {
+ enabled = true
+ size = 3
+ passes = 1
+ }
+
+ drop_shadow = no
+}
+
+group {
+ col.border_active = 0x66ffff00
+ col.border_inactive = 0x66ffff99
+
+ groupbar {
+ font_family = Iosevka Nerd Font
+ font_size = 10
+ gradients = false
+ col.active = 0x66ffff00
+ col.inactive = 0x00000000
+ }
+
+}
+
+animations {
+ enabled = yes
+ # first_launch_animation = no
+
+ bezier = overshoot, 0.05, 0.9, 0.1, 1.05
+
+ animation = windows, 1, 3, overshoot, slide
+ animation = border, 1, 5, default
+ animation = borderangle, 1, 8, default
+ animation = fade, 1, 3, default
+ animation = workspaces, 1, 2, default
+}
+
+xwayland {
+ force_zero_scaling = true
+}
+
+dwindle {
+ pseudotile = false
+ force_split = 2
+ preserve_split = yes
+ no_gaps_when_only = 1
+}
+
+master {
+ new_is_master = false
+}
+
+gestures {
+ workspace_swipe = on
+}
+
+misc {
+ disable_hyprland_logo = yes
+ force_default_wallpaper = 0
+ cursor_zoom_factor = 1
+}
diff --git a/hyprland/startup.conf b/hyprland/startup.conf
new file mode 100644
index 0000000..dc1a665
--- /dev/null
+++ b/hyprland/startup.conf
@@ -0,0 +1,17 @@
+####################
+# Startup Programs #
+####################
+
+env = WLR_NO_HARDWARE_CURSORS,1
+
+exec-once = waybar
+exec-once = hyprpaper
+exec-once = mako
+exec-once = ~/.config/hypr/swayidle.sh
+exec-once = /usr/lib/polkit-kde-authentication-agent-1
+exec-once = easyeffects --gapplication-service
+exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
+exec-once = ~/bin/battery-notify.sh
+exec-once = ~/bin/hyprctl-zoom-daemon.sh
+#exec-once = systemd-inhibit --what=handle-power-key sleep infinity
+
diff --git a/hyprland/wallpaper.jpg b/hyprland/wallpaper.jpg
new file mode 100644
index 0000000..f9f751e
--- /dev/null
+++ b/hyprland/wallpaper.jpg
Binary files differ
diff --git a/waybar/config b/waybar/config
index 03f9e3e..4b775ce 100644
--- a/waybar/config
+++ b/waybar/config
@@ -1,55 +1,41 @@
{
"height": 30,
"spacing": 4,
- "modules-left": ["sway/workspaces", "sway/mode"],
- "modules-center": ["sway/window"],
- "modules-right": ["tray", "custom/lock", "custom/scratchpad_indicator", "network#vpnovpn", "network#vpnwg", "network#e", "network#wl", "network", "cpu", "memory", "backlight", "pulseaudio", "battery", "clock"],
- "custom/spotify": {
- "exec": "/usr/bin/python3 ~/.config/waybar/scripts/mediaplayer.py --player spotify",
- "format": "{}",
- "return-type": "json",
- "on-click": "playerctl play-pause",
- "on-scroll-up": "playerctl next",
- "on-scroll-down": "playerctl previous"
- },
- "sway/workspaces": {
+ "layer": "top",
+ "modules-left": ["hyprland/workspaces", "hyprland/window"],
+ "modules-center": [],
+ "modules-right": ["tray", "idle_inhibitor", "network#vpnovpn", "network#vpnwg", "network#e", "network#wl", "network", "cpu", "memory", "backlight", "pulseaudio", "battery", "clock"],
+ "hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": false,
"format": "{name}",
},
- "sway/window": {
- "max-length": 80,
- "tooltip": false,
- "rewrite": {
- "": "Desktop",
- }
+ "hyprland/window": {
+ "separate-outputs": true,
},
"tray": {
"spacing": 10
},
- "custom/scratchpad_indicator": {
- "interval": 1,
- "exec": "swaymsg -t get_tree | ~/.config/waybar/scripts/scratchpads.py",
- "format": " {} ",
- "on-click": "swaymsg 'scratchpad show'",
- "on-click-right": "swaymsg 'move scratchpad'"
- },
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%d %b %H:%M:%OS}",
"format-alt": "{:%Y-%m-%d}",
- "timezone": "Europe/London",
"interval": 1
},
"battery": {
"interval": 1,
"states": {
+ "full": 100,
+ "normal": 99,
"warning": 30,
"critical": 15,
},
"format": "{icon} {capacity}%",
+ "design-capacity": false,
"format-charging": "{icon} {capacity}% ",
- "format-icons": [" ", " ", " ", " ", " "],
+ "format-charging-full": "󱟢 {capacity}% ",
+ "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
+ "tooltip-format": "{timeTo} ({power} W)"
},
"backlight": {
"format": "{icon} {percent}%",
@@ -59,10 +45,15 @@
},
"cpu": {
"format": " {usage}%",
- "tooltip": false
+ "tooltip": true
},
"memory": {
- "format": " {used}/{total} GiB"
+ "format": " {percentage}%",
+ "format-alt": " {used}/{total} GiB",
+ "states": {
+ "high": 80
+ },
+ "tooltip": true
},
"network": {
"format-disconnected": "󱘖 Disconnected",
@@ -84,7 +75,7 @@
"tooltip-format": "{ipaddr}: {ifname} via {gwaddr}",
"format-linked": "󰖪 {ifname} (No IP)",
"format-alt": "󰖩 {ifname}: {ipaddr}/{cidr}",
- "on-click-right": "alacritty -e /usr/bin/nmtui",
+ "on-click-right": "alacritty -e /bin/bash -c \"/usr/bin/sleep 0.5 && /usr/bin/nmtui\"",
"format-disconnected": "",
},
"network#vpnovpn": {
@@ -102,8 +93,8 @@
"pulseaudio": {
"format": "{icon} {volume}% {format_source}",
"format-bluetooth": " {volume}% {format_source}",
- "format-bluetooth-muted": " 0% {format_source}",
- "format-muted": "婢0% {format_source}",
+ "format-bluetooth-muted": " 0% {format_source}",
+ "format-muted": "󰝟 {format_source}",
"format-source": " {volume}%",
"format-source-muted": " 0%",
"format-icons": {
@@ -113,10 +104,11 @@
"phone": "",
"portable": "",
"car": " ",
- "default": ["", " ", " "]
+ "default": [" ", " ", " "]
},
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"on-click-right": "pavucontrol",
+ "ignored-sinks": ["Easy Effects Sink"],
"scroll-step": 0.5
},
"idle_inhibitor": {
diff --git a/waybar/style.css b/waybar/style.css
index 3e53a9d..76dbfc5 100644
--- a/waybar/style.css
+++ b/waybar/style.css
@@ -10,6 +10,7 @@ window#waybar {
border-bottom: 3px solid #434e59;
transition-property: background-color;
transition-duration: .5s;
+ background-clip: border-box;
}
window#waybar.hidden {
@@ -41,7 +42,7 @@ button {
background: rgba(0, 0, 0, 0.2);
}
-#workspaces button.focused {
+#workspaces button.active {
background-color: #434e59;
}
@@ -79,6 +80,14 @@ button {
margin: 0 4px;
}
+#battery.charging.critical {
+ background: none;
+}
+
+#battery.critical {
+ background: #eb4d4b;
+}
+
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;