diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 90bb9286..b6582979 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -9,12 +9,23 @@ body:
---
- - type: input
+ - type: textarea
id: ver
attributes:
label: Hyprland Version
- description: "Paste here the output of `hyprctl version`."
- placeholder: Hyprland, built from branch main at commit...
+ description: "Paste here the output of `hyprctl version`. For hyprland after 0.34.0, paste `hyprctl systeminfo` instead."
+ value: "
+ System/Version info
+
+
+ ```sh
+
+
+
+ ```
+
+
+ "
validations:
required: true
diff --git a/.github/actions/setup_base/action.yml b/.github/actions/setup_base/action.yml
index 2985ce9a..8a33dd55 100644
--- a/.github/actions/setup_base/action.yml
+++ b/.github/actions/setup_base/action.yml
@@ -23,6 +23,7 @@ runs:
glm \
glslang \
go \
+ hyprlang \
jq \
libc++ \
libdisplay-info \
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index a78b7522..01bb43d1 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -8,29 +8,20 @@ jobs:
container:
image: archlinux
steps:
- - name: Get required pacman pkgs
- run: |
- sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
- pacman --noconfirm --noprogressbar -Syyu
- pacman --noconfirm --noprogressbar -Sy glslang libepoxy libfontenc libxcvt libxfont2 libxkbfile vulkan-headers vulkan-validation-layers xcb-util-errors xcb-util-renderutil xcb-util-wm xorg-fonts-encodings xorg-server-common xorg-setxkbmap xorg-xkbcomp xorg-xwayland git cmake go clang lld libc++ pkgconf meson ninja wayland wayland-protocols libinput libxkbcommon pixman glm libdrm libglvnd cairo pango systemd scdoc base-devel seatd python libliftoff
- - name: Set up user
- run: |
- useradd -m githubuser
- echo -e "root ALL=(ALL:ALL) ALL\ngithubuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
- - name: Install libdisplay-info from the AUR
- run: |
- su githubuser -c "cd ~ && git clone https://aur.archlinux.org/libdisplay-info.git && cd ./libdisplay-info && makepkg -si --skippgpcheck --noconfirm --noprogressbar"
- - name: Fix permissions for git
- run: |
- git config --global --add safe.directory /__w/Hyprland/Hyprland
- - name: Checkout Hyprland
- uses: actions/checkout@v3
+ - name: Checkout repository actions
+ uses: actions/checkout@v4
with:
- submodules: recursive
+ sparse-checkout: .github/actions
+
+ - name: Setup base
+ uses: ./.github/actions/setup_base
+ with:
+ INSTALL_XORG_PKGS: true
+
- name: Build Hyprland
run: |
- git submodule sync --recursive && git submodule update --init --force --recursive
make all
+
- name: Compress and package artifacts
run: |
mkdir x86_64-pc-linux-gnu
@@ -45,6 +36,7 @@ jobs:
cp -r example/ hyprland/
cp -r assets/ hyprland/
tar -cvf Hyprland.tar.xz hyprland
+
- name: Release
uses: actions/upload-artifact@v3
with:
@@ -57,28 +49,19 @@ jobs:
container:
image: archlinux
steps:
- - name: Download dependencies
- run: |
- sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
- pacman --noconfirm --noprogressbar -Syyu
- pacman --noconfirm --noprogressbar -Sy glslang libepoxy libfontenc libxcvt libxfont2 libxkbfile vulkan-headers vulkan-validation-layers git go clang lld libc++ pkgconf meson ninja wayland wayland-protocols libinput libxkbcommon pixman glm libdrm libglvnd cairo pango systemd scdoc base-devel seatd cmake jq python libliftoff
- - name: Set up user
- run: |
- useradd -m githubuser
- echo -e "root ALL=(ALL:ALL) ALL\ngithubuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
- - name: Install libdisplay-info from the AUR
- run: |
- su githubuser -c "cd ~ && git clone https://aur.archlinux.org/libdisplay-info.git && cd ./libdisplay-info && makepkg -si --skippgpcheck --noconfirm --noprogressbar"
- - name: Checkout Hyprland
- uses: actions/checkout@v3
+ - name: Checkout repository actions
+ uses: actions/checkout@v4
with:
- submodules: true
+ sparse-checkout: .github/actions
+
+ - name: Setup base
+ uses: ./.github/actions/setup_base
+
- name: Configure
- run: |
- meson obj-x86_64-pc-linux-gnu \
- -Ddefault_library=static
+ run: meson setup build -Ddefault_library=static
+
- name: Compile
- run: ninja -C obj-x86_64-pc-linux-gnu
+ run: ninja -C build
noxwayland:
name: "Build Hyprland in pure Wayland (Arch)"
@@ -86,23 +69,36 @@ jobs:
container:
image: archlinux
steps:
- - name: Download dependencies
- run: |
- sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
- pacman --noconfirm --noprogressbar -Syyu
- pacman --noconfirm --noprogressbar -Sy glslang libepoxy libfontenc libxcvt libxfont2 libxkbfile vulkan-headers vulkan-validation-layers git cmake go clang lld libc++ pkgconf meson ninja wayland wayland-protocols libinput libxkbcommon pixman glm libdrm libglvnd cairo pango systemd scdoc base-devel seatd libliftoff
- - name: Set up user
- run: |
- useradd -m githubuser
- echo -e "root ALL=(ALL:ALL) ALL\ngithubuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
- - name: Install libdisplay-info from the AUR
- run: |
- su githubuser -c "cd ~ && git clone https://aur.archlinux.org/libdisplay-info.git && cd ./libdisplay-info && makepkg -si --skippgpcheck --noconfirm --noprogressbar"
- - name: Checkout Hyprland
- uses: actions/checkout@v3
+ - name: Checkout repository actions
+ uses: actions/checkout@v4
with:
- submodules: true
+ sparse-checkout: .github/actions
+
+ - name: Setup base
+ uses: ./.github/actions/setup_base
+
- name: Configure
- run: mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_XWAYLAND:STRING=true -H./ -B./build -G Ninja
+ run: mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_XWAYLAND:STRING=true -H./ -B./build -G Ninja
+
- name: Compile
run: make release
+
+ clang-format:
+ name: "Code Style (Arch)"
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux
+ steps:
+ - name: Checkout repository actions
+ uses: actions/checkout@v4
+ with:
+ sparse-checkout: .github/actions
+
+ - name: Setup base
+ uses: ./.github/actions/setup_base
+
+ - name: Configure
+ run: meson setup build -Ddefault_library=static
+
+ - name: clang-format check
+ run: ninja -C build clang-format-check
diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml
index a1ea0f24..2c05d5e2 100644
--- a/.github/workflows/nix-build.yml
+++ b/.github/workflows/nix-build.yml
@@ -26,4 +26,4 @@ jobs:
name: hyprland
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- - run: nix build -L ${{ matrix.command }}
+ - run: nix build .#${{ matrix.package }} -L
diff --git a/.github/workflows/security-checks.yml b/.github/workflows/security-checks.yml
index 6b7d71e5..6a86f70e 100644
--- a/.github/workflows/security-checks.yml
+++ b/.github/workflows/security-checks.yml
@@ -24,13 +24,13 @@ jobs:
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{github.workspace}}/flawfinder_results.sarif
-
+
codeql:
name: CodeQL
runs-on: ubuntu-latest
container:
image: archlinux
-
+
permissions:
actions: read
contents: read
@@ -42,34 +42,25 @@ jobs:
language: [ 'cpp' ]
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
+ - name: Checkout repository actions
+ uses: actions/checkout@v4
+ with:
+ sparse-checkout: .github/actions
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- - name: Init Hyprland build
- run: |
- sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
- pacman --noconfirm --noprogressbar -Syyu
- pacman --noconfirm --noprogressbar -Sy glslang libepoxy libfontenc libxcvt libxfont2 libxkbfile vulkan-headers vulkan-validation-layers xcb-util-errors xcb-util-renderutil xcb-util-wm xorg-fonts-encodings xorg-server-common xorg-setxkbmap xorg-xkbcomp xorg-xwayland git cmake go clang lld libc++ pkgconf meson ninja wayland wayland-protocols libinput libxkbcommon pixman glm libdrm libglvnd cairo pango systemd scdoc base-devel seatd python libliftoff
- useradd -m githubuser
- echo -e "root ALL=(ALL:ALL) ALL\ngithubuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
- su githubuser -c "cd ~ && git clone https://aur.archlinux.org/libdisplay-info.git && cd ./libdisplay-info && makepkg -si --skippgpcheck --noconfirm --noprogressbar"
- git config --global --add safe.directory /__w/Hyprland/Hyprland
-
- - name: Checkout Hyprland
- uses: actions/checkout@v3
+ - name: Setup base
+ uses: ./.github/actions/setup_base
with:
- submodules: recursive
+ INSTALL_XORG_PKGS: true
- name: Build Hyprland
run: |
- git submodule sync --recursive && git submodule update --init --force --recursive
make all
-
+
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 00000000..51f6b91e
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,28 @@
+# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
+#
+# You can adjust the behavior by modifying this file.
+# For more information, see:
+# https://github.com/actions/stale
+name: Mark stale issues and pull requests
+
+on:
+ schedule:
+ - cron: '7 */4 * * *'
+ workflow_dispatch:
+
+jobs:
+ stale:
+
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+
+ steps:
+ - uses: actions/stale@v5
+ with:
+ repo-token: ${{ secrets.STALEBOT_PAT }}
+ stale-issue-label: 'stale'
+ stale-pr-label: 'stale'
+ operations-per-run: 40
+ days-before-close: -1
diff --git a/.gitignore b/.gitignore
index dfee530e..b8423e8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,5 @@ gmon.out
PKGBUILD
src/version.h
+
+.direnv
diff --git a/.gitmodules b/.gitmodules
index b483fce1..c62f5b53 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,7 +1,6 @@
[submodule "wlroots"]
path = subprojects/wlroots
- url = https://github.com/DRAGONTOS/wlroots.git
- branch = 0.18.0-dev
+ url = https://gitlab.freedesktop.org/wlroots/wlroots.git
[submodule "subprojects/hyprland-protocols"]
path = subprojects/hyprland-protocols
url = https://github.com/hyprwm/hyprland-protocols
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bedb7bbf..857e21de 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,8 +57,8 @@ ExternalProject_Add(
wlroots
PREFIX ${CMAKE_SOURCE_DIR}/subprojects/wlroots
SOURCE_DIR ${CMAKE_SOURCE_DIR}/subprojects/wlroots
- PATCH_COMMAND sed -E -i -e "s/(soversion = 13)([^032]|$$)/soversion = 13032/g" meson.build
- CONFIGURE_COMMAND meson setup build --buildtype=${BUILDTYPE_LOWER} -Dwerror=false -Dexamples=false -Drenderers=gles2 $,-Db_sanitize=address,-Db_sanitize=none> && meson setup build --buildtype=${BUILDTYPE_LOWER} -Dwerror=false -Dexamples=false -Drenderers=gles2 $,-Db_sanitize=address,-Db_sanitize=none> --reconfigure
+ PATCH_COMMAND sed -E -i -e "s/(soversion = .*$)/soversion = 13032/g" meson.build
+ CONFIGURE_COMMAND meson setup --reconfigure build --buildtype=${BUILDTYPE_LOWER} -Dwerror=false -Dxwayland=$,disabled,enabled> -Dexamples=false -Drenderers=gles2 $,-Db_sanitize=address,-Db_sanitize=none>
BUILD_COMMAND ninja -C build
BUILD_ALWAYS true
BUILD_IN_SOURCE true
@@ -101,7 +101,7 @@ message(STATUS "Checking deps...")
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(OpenGL REQUIRED)
-pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1) # we do not check for wlroots, as we provide it ourselves
+pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1 hyprlang>=0.3.2) # we do not check for wlroots, as we provide it ourselves
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
diff --git a/Makefile b/Makefile
index 0a0ef8fa..c29f20a0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,22 @@
PREFIX = /usr/local
legacyrenderer:
- cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja
+ cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
chmod -R 777 ./build
legacyrendererdebug:
- cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja
+ cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
chmod -R 777 ./build
release:
- cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build -G Ninja
+ cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -S . -B ./build -G Ninja
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
chmod -R 777 ./build
debug:
- cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -S . -B ./build -G Ninja
+ cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -S . -B ./build -G Ninja
cmake --build ./build --config Debug --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
chmod -R 777 ./build
@@ -42,10 +42,10 @@ install:
chmod 755 ${PREFIX}/bin/Hyprland
chmod 755 ${PREFIX}/bin/hyprctl
chmod 755 ${PREFIX}/bin/hyprpm
- ln -s -r -f ${PREFIX}/bin/Hyprland ${PREFIX}/bin/hyprland
+ cd ${PREFIX}/bin && ln -sf Hyprland hyprland
if [ ! -f ${PREFIX}/share/wayland-sessions/hyprland.desktop ]; then cp ./example/hyprland.desktop ${PREFIX}/share/wayland-sessions; fi
mkdir -p ${PREFIX}/share/hyprland
- cp ./assets/wall_* ${PREFIX}/share/hyprland
+ cp ./assets/wall* ${PREFIX}/share/hyprland
mkdir -p ${PREFIX}/share/xdg-desktop-portal
cp ./assets/hyprland-portals.conf ${PREFIX}/share/xdg-desktop-portal
@@ -106,3 +106,24 @@ man:
--variable=section:1 \
--from rst \
--to man > ./docs/hyprctl.1
+
+asan:
+ @echo -en "!!WARNING!!\nOnly run this in the TTY.\n"
+ @pidof Hyprland > /dev/null && echo -ne "Refusing to run with Hyprland running.\n" || echo ""
+ @pidof Hyprland > /dev/null && exit 1 || echo ""
+
+ rm -rf ./wayland
+ git reset --hard
+
+ git clone --recursive https://gitlab.freedesktop.org/wayland/wayland
+ cd wayland && patch -p1 < ../scripts/waylandStatic.diff && meson setup build --buildtype=debug -Db_sanitize=address -Ddocumentation=false && ninja -C build && cd ..
+ cp ./wayland/build/src/libwayland-server.a .
+ @echo "Wayland done"
+
+ patch -p1 < ./scripts/hyprlandStaticAsan.diff
+ cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DWITH_ASAN:STRING=True -DUSE_TRACY:STRING=False -DUSE_TRACY_GPU:STRING=False -S . -B ./build -G Ninja
+ cmake --build ./build --config Debug --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
+ @echo "Hyprland done"
+
+ ASAN_OPTIONS="detect_odr_violation=0,log_path=asan.log" HYPRLAND_NO_CRASHREPORTER=1 ./build/Hyprland -c ~/.config/hypr/hyprland.conf
+
diff --git a/README.md b/README.md
index 82dd0731..9f4aa847 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,7 @@ easy IPC, much more QoL stuff than other wlr-based compositors and more...
- Much more QoL stuff than other wlr-based compositors
- Custom bezier curves for the best animations
- Powerful plugin support
+- Built-in plugin manager
- Tearing support for better gaming performance
- Easily expandable and readable codebase
- Fast and active development
diff --git a/assets/meson.build b/assets/meson.build
index cdfafabb..8c4a60ec 100644
--- a/assets/meson.build
+++ b/assets/meson.build
@@ -1,9 +1,7 @@
-wallpaper_types = ['', 'anime_', 'anime2_']
+wallpapers = ['0', '1', '2']
-foreach type : wallpaper_types
- foreach size : [2, 4, 8]
- install_data(f'wall_@type@@size@K.png', install_dir: join_paths(get_option('datadir'), 'hyprland'), install_tag: 'runtime')
- endforeach
+foreach type : wallpapers
+ install_data(f'wall@type@.png', install_dir: join_paths(get_option('datadir'), 'hyprland'), install_tag: 'runtime')
endforeach
install_data('hyprland-portals.conf', install_dir: join_paths(get_option('datadir'), 'xdg-desktop-portal'), install_tag: 'runtime')
diff --git a/assets/wall0.png b/assets/wall0.png
new file mode 100644
index 00000000..73bdeef8
Binary files /dev/null and b/assets/wall0.png differ
diff --git a/assets/wall1.png b/assets/wall1.png
new file mode 100644
index 00000000..53e4c90d
Binary files /dev/null and b/assets/wall1.png differ
diff --git a/assets/wall2.png b/assets/wall2.png
new file mode 100644
index 00000000..9ade4720
Binary files /dev/null and b/assets/wall2.png differ
diff --git a/assets/wall_2K.png b/assets/wall_2K.png
deleted file mode 100644
index 5aea012a..00000000
Binary files a/assets/wall_2K.png and /dev/null differ
diff --git a/assets/wall_4K.png b/assets/wall_4K.png
deleted file mode 100644
index f835a978..00000000
Binary files a/assets/wall_4K.png and /dev/null differ
diff --git a/assets/wall_8K.png b/assets/wall_8K.png
deleted file mode 100644
index 539aa97d..00000000
Binary files a/assets/wall_8K.png and /dev/null differ
diff --git a/assets/wall_anime2_2K.png b/assets/wall_anime2_2K.png
deleted file mode 100644
index 5a465efa..00000000
Binary files a/assets/wall_anime2_2K.png and /dev/null differ
diff --git a/assets/wall_anime2_4K.png b/assets/wall_anime2_4K.png
deleted file mode 100644
index b04e6d00..00000000
Binary files a/assets/wall_anime2_4K.png and /dev/null differ
diff --git a/assets/wall_anime2_8K.png b/assets/wall_anime2_8K.png
deleted file mode 100644
index b8da18ef..00000000
Binary files a/assets/wall_anime2_8K.png and /dev/null differ
diff --git a/assets/wall_anime_2K.png b/assets/wall_anime_2K.png
deleted file mode 100644
index 202dc493..00000000
Binary files a/assets/wall_anime_2K.png and /dev/null differ
diff --git a/assets/wall_anime_4K.png b/assets/wall_anime_4K.png
deleted file mode 100644
index 687b79c3..00000000
Binary files a/assets/wall_anime_4K.png and /dev/null differ
diff --git a/assets/wall_anime_8K.png b/assets/wall_anime_8K.png
deleted file mode 100644
index 25c15cd7..00000000
Binary files a/assets/wall_anime_8K.png and /dev/null differ
diff --git a/docs/ISSUE_GUIDELINES.md b/docs/ISSUE_GUIDELINES.md
index be011608..c031fe85 100644
--- a/docs/ISSUE_GUIDELINES.md
+++ b/docs/ISSUE_GUIDELINES.md
@@ -47,7 +47,7 @@ basically, directories in /tmp/hypr are your sessions.
## Obtaining the Hyprland Crash Report (v0.22.0beta and up)
-If you have `$XDG_CACHE_HOME` set, the crash report directory is `$XDG_CACHE_HOME/hyprland`. If not, it's `~/.hyprland`
+If you have `$XDG_CACHE_HOME` set, the crash report directory is `$XDG_CACHE_HOME/hyprland`. If not, it's `$HOME/.cache/hyprland`.
Go to the crash report directory and you should find a file named `hyprlandCrashReport[XXXX].txt` where `[XXXX]` is the PID of the process that crashed.
diff --git a/example/hyprland.conf b/example/hyprland.conf
index 56d04cae..9bec2f6d 100644
--- a/example/hyprland.conf
+++ b/example/hyprland.conf
@@ -1,112 +1,32 @@
+# This is an example Hyprland config file.
+#
+# Refer to the wiki for more information.
+
+#
+# Please note not all available settings / options are set here.
+# For a full list, see the wiki
+#
+
+# See https://wiki.hyprland.org/Configuring/Monitors/
+monitor=,preferred,auto,auto
+
+
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
+# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
-# Startup
-#exec-once = waybar & hyprpaper & dunst
-exec-once = /usr/libexec/polkit-gnome-authentication-agent-1
-exec-once = hyprpm reload -n
-#exec-once = wl-clip-persist --clipboard both
-#exec-once = wl-paste -p -t text --watch clipman store -P --histpath="~/.local/share/clipman-primary.json"
+# Set programs that you use
+$terminal = kitty
+$fileManager = dolphin
+$menu = wofi --show drun
-# Plugins
-#plugin {
-# split-monitor-workspaces {
-# count = 10
-# }
-# hy3 {
-# # disable gaps when only one window is onscreen
-# no_gaps_when_only = false # default: false
-#
-# # policy controlling what happens when a node is removed from a group,
-# # leaving only a group
-# # 0 = remove the nested group
-# # 1 = keep the nested group
-# # 2 = keep the nested group only if its parent is a tab group
-# node_collapse_policy = 2 # default: 2
-#
-# # special workspace
-# special_scale_factor = 0.95
-#
-# # offset from group split direction when only one window is in a group
-# group_inset = 10 # default: 10
-#
-# # tab group settings
-# tabs {
-# # height of the tab bar
-# height = 15 # default: 15
-#
-# # padding between the tab bar and its focused node
-# padding = 5 # default: 5
-#
-# # the tab bar should animate in/out from the top instead of below the window
-# from_top = false # default: false
-#
-# # rounding of tab bar corners
-# rounding = 5 # default: 3
-#
-# # render the window title on the bar
-# render_text = true # default: true
-#
-# # font to render the window title with
-# text_font = Jetbrains Mono # default: Sans
-#
-# # height of the window title
-# text_height = 8 # default: 8
-#
-# # left padding of the window title
-# text_padding = 3 # default: 3
-#
-# # active tab bar segment color
-# col.active = 0xFF8330DB # default: 0xff32b4ff
-#
-# # urgent tab bar segment color
-# col.urgent = 0xffff4f4f # default: 0xffff4f4f
-#
-# # inactive tab bar segment color
-# col.inactive = 0xFF4D4D4D # default: 0x80808080
-#
-# # active tab bar text color
-# col.text.active = 0xffffffff # default: 0xff000000
-#
-# # urgent tab bar text color
-# col.text.urgent = 0xffffffff # default: 0xff000000
-#
-# # inactive tab bar text color
-# col.text.inactive = 0xffffffff # default: 0xff000000
-# }
-#
-# # autotiling settings
-# autotile {
-# # enable autotile
-# enable = false # default: false
-#
-# # make autotile-created groups ephemeral
-# ephemeral_groups = true # default: true
-#
-# # if a window would be squished smaller than this width, a vertical split will be created
-# # -1 = never automatically split vertically
-# # 0 = always automatically split vertically
-# # = pixel height to split at
-# trigger_width = 0 # default: 0
-#
-# # if a window would be squished smaller than this height, a horizontal split will be created
-# # -1 = never automatically split horizontally
-# # 0 = always automatically split horizontally
-# # = pixel height to split at
-# trigger_height = 0 # default: 0
-#
-# # a space or comma separated list of workspace ids where autotile should be enabled
-# # it's possible to create an exception rule by prefixing the definition with "not:"
-# # workspaces = 1,2 # autotiling will only be enabled on workspaces 1 and 2
-# # workspaces = not:1,2 # autotiling will be enabled on all workspaces except 1 and 2
-# workspaces = all # default: all
-# }
-# }
-#}
+# Some default env vars.
+env = XCURSOR_SIZE,24
+env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
@@ -119,7 +39,7 @@ input {
follow_mouse = 1
touchpad {
- natural_scroll = no
+ natural_scroll = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
@@ -130,32 +50,37 @@ general {
gaps_in = 5
gaps_out = 20
- border_size = 3
- col.active_border = 0xFF8330DB 0xFF3e136c
- col.inactive_border = 0xFF4D4D4D 0xFF333333
+ border_size = 2
+ col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
+ col.inactive_border = rgba(595959aa)
layout = dwindle
+
+ # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
+ allow_tearing = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
-
+
blur {
enabled = true
- size = 1.5
+ size = 3
passes = 1
+
+ vibrancy = 0.1696
}
- drop_shadow = yes
+ drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
- enabled = yes
+ enabled = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
@@ -164,14 +89,15 @@ animations {
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
+ animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
- animation = workspaces, 1, 4, default
+ animation = workspaces, 1, 6, default
}
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
+ pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
+ preserve_split = true # you probably want this
}
master {
@@ -181,39 +107,41 @@ master {
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
- workspace_swipe = off
+ workspace_swipe = false
}
-# unscale XWayland
-xwayland {
- force_zero_scaling = true
+misc {
+ # See https://wiki.hyprland.org/Configuring/Variables/ for more
+ force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
}
+# 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
-windowrule = rounding 1,class:^(Wine)$
-windowrulev2 = opacity 0.8 0.8,class:^(kitty)$
-windowrulev2=float,class:^(hyprland.share.picker)$
-windowrule = float,^(Steamwebhelper)$
-windowrule = float, title:^(Steamwebhelper)$
-windowrule = float, title:^(pop-up)
-windowrule = float, class:^(xdg-desktop-portal-kde)
-windowrule = float, class:^(Wine)
+windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
+
+
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
-bind = $mainMod, RETURN, exec, $terminal
-bind = $mainMod, Q, killactive,
-bind = $mainMod SHIFT, Q, exit,
-bind = $mainMod, F, fullscreen,
-bind = $mainMod, SPACE, togglefloating,
-bind = $mainMod, L, exec, gtklock
-bind = $mainMod CTRL, B, exec, killall waybar && waybar -c /home/$USER/.config/waybar/config-hypr
-
-bind = $mainMod, D, exec, rofi -show run
+bind = $mainMod, Q, exec, $terminal
+bind = $mainMod, C, killactive,
+bind = $mainMod, M, exit,
+bind = $mainMod, E, exec, $fileManager
+bind = $mainMod, V, togglefloating,
+bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
-bind = $mainMod, Print, exec, grim -g "$(slurp)" - | swappy -f - # take a screenshot
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
@@ -221,12 +149,6 @@ bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
-# Move focused with mainMod + arrow keys
-bind = $mainMod SHIFT, left, movewindow, l
-bind = $mainMod SHIFT, right, movewindow, r
-bind = $mainMod SHIFT, up, movewindow, u
-bind = $mainMod SHIFT, down, movewindow, d
-
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
@@ -251,22 +173,9 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
-
-# vm fix
-bind=CTRL,ALT_L,submap,passthrough
-submap=passthrough
-bindr=CTRL,Escape,submap,reset
-submap=reset
-
-# Repeat this for each scratchpad you need
-# BROWSER
-animation=specialWorkspace,0,0,default
-
-# kitty
-#bind = $mainMod, y, togglespecialworkspace, kitty
-#bind = $mainMod SHIFT, y, movetoworkspace, special:kitty
-
-bind = $mainMod, x, exec, hyprctl dispatch togglespecialworkspace && hyprctl dispatch togglespecialworkspace
+# Example special workspace (scratchpad)
+bind = $mainMod, S, togglespecialworkspace, magic
+bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
diff --git a/flake.lock b/flake.lock
index f7761728..d5e00c3b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -23,13 +23,36 @@
"type": "github"
}
},
+ "hyprlang": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "systems": [
+ "systems"
+ ]
+ },
+ "locked": {
+ "lastModified": 1708787654,
+ "narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=",
+ "owner": "hyprwm",
+ "repo": "hyprlang",
+ "rev": "0fce791ba2334aca183f2ed42399518947550d0d",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hyprwm",
+ "repo": "hyprlang",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
- "lastModified": 1703438236,
- "narHash": "sha256-aqVBq1u09yFhL7bj1/xyUeJjzr92fXVvQSSEx6AdB1M=",
+ "lastModified": 1708807242,
+ "narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5f64a12a728902226210bf01d25ec6cbb9d9265b",
+ "rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a",
"type": "github"
},
"original": {
@@ -42,6 +65,7 @@
"root": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
+ "hyprlang": "hyprlang",
"nixpkgs": "nixpkgs",
"systems": "systems",
"wlroots": "wlroots",
@@ -67,18 +91,18 @@
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
- "lastModified": 1701368958,
- "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=",
+ "lastModified": 1708558866,
+ "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=",
"owner": "wlroots",
"repo": "wlroots",
- "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
+ "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
- "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
+ "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
"type": "gitlab"
}
},
@@ -87,6 +111,9 @@
"hyprland-protocols": [
"hyprland-protocols"
],
+ "hyprlang": [
+ "hyprlang"
+ ],
"nixpkgs": [
"nixpkgs"
],
@@ -95,11 +122,11 @@
]
},
"locked": {
- "lastModified": 1703514399,
- "narHash": "sha256-VRr5Xc4S/VPr/gU3fiOD3vSIL2+GJ+LUrmFTWTwnTz4=",
+ "lastModified": 1708696469,
+ "narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
- "rev": "0a318a7a217a6402b0b705837cd5b50b0e94b31b",
+ "rev": "1b713911c2f12b96c2574474686e4027ac4bf826",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 6807c0f3..675a6d92 100644
--- a/flake.nix
+++ b/flake.nix
@@ -12,7 +12,7 @@
host = "gitlab.freedesktop.org";
owner = "wlroots";
repo = "wlroots";
- rev = "5d639394f3e83b01596dcd166a44a9a1a2583350";
+ rev = "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5";
flake = false;
};
@@ -22,11 +22,18 @@
inputs.systems.follows = "systems";
};
+ hyprlang = {
+ url = "github:hyprwm/hyprlang";
+ inputs.nixpkgs.follows = "nixpkgs";
+ inputs.systems.follows = "systems";
+ };
+
xdph = {
url = "github:hyprwm/xdg-desktop-portal-hyprland";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
inputs.hyprland-protocols.follows = "hyprland-protocols";
+ inputs.hyprlang.follows = "hyprlang";
};
};
@@ -86,6 +93,7 @@
name = "hyprland-shell";
nativeBuildInputs = with pkgsFor.${system}; [cmake python3];
buildInputs = [self.packages.${system}.wlroots-hyprland];
+ hardeningDisable = ["fortify"];
inputsFrom = [
self.packages.${system}.wlroots-hyprland
self.packages.${system}.hyprland
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp
index f11cac6e..02da5f43 100644
--- a/hyprctl/main.cpp
+++ b/hyprctl/main.cpp
@@ -23,49 +23,42 @@
#include
#include
-const std::string USAGE = R"#(usage: hyprctl [flags] [ [args]]
- hyprctl --batch { [args] ; [args] ; ...}
-LISTING COMMANDS:
- monitors: List outputs
- workspaces: List all workspaces
- activeworkspace: Get currently active workspace
- clients: List clients (e.g. windows)
- activewindow: Get currently active window
- layers: List layers
- animations: List animations and bezier curves in use
- devices: List devices
- binds: List registered binds
- instances: List running Hyprland instances
- layouts: List layouts
- globalshortcuts: List global shortcuts
- version: Print hyprland version
-CONFIGURATION COMMANDS:
- keyword [args]: Execute a keyword
- getoption