Compare commits

..

6 Commits

8 changed files with 8 additions and 76 deletions

View File

@@ -1,8 +1,6 @@
// This config is in the KDL format: https://kdl.dev // This config is in the KDL format: https://kdl.dev
// https://niri-wm.github.io/niri/Configuration:-Introduction // https://niri-wm.github.io/niri/Configuration:-Introduction
spawn-at-startup "waybar"
input { input {
keyboard { keyboard {
xkb { xkb {
@@ -32,7 +30,6 @@ output "DP-1" {
layout { layout {
gaps 16 gaps 16
background-color "#414853"
center-focused-column "never" center-focused-column "never"
@@ -124,7 +121,6 @@ binds {
// Suggested binds for running programs: terminal, app launcher, screen locker. // Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "kitty" "--single-instance" "--instance-group" "default"; } Mod+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "kitty" "--single-instance" "--instance-group" "default"; }
Mod+D hotkey-overlay-title="Run an Application: wmenu" { spawn "wmenu-run" "-f" "HurmitNerdFont 10"; } Mod+D hotkey-overlay-title="Run an Application: wmenu" { spawn "wmenu-run" "-f" "HurmitNerdFont 10"; }
Mod+B hotkey-overlay-title="Toggle waybar" { spawn "killall" "-SIGUSR1" "waybar"; }
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
Mod+Shift+T hotkey-overlay-title="Toggle theme" { spawn "lupan-set-theme" "toggle"; } Mod+Shift+T hotkey-overlay-title="Toggle theme" { spawn "lupan-set-theme" "toggle"; }

View File

@@ -1,13 +0,0 @@
{
"layer": "top",
"position": "top",
"modules-left": [
"niri/workspaces",
"niri/window"
],
"modules-right": [
"tray",
"clock"
],
"reload_style_on_change": true,
}

View File

@@ -1,12 +0,0 @@
* {
background-color: #282e38;
color: #a29e98;
}
#workspaces button.active {
border-bottom: 3px solid #04785d;
}
#workspaces button.urgent {
border-bottom: 3px solid #c37583;
}

View File

@@ -1,12 +0,0 @@
* {
background-color: #f6ede0;
color: #696257;
}
#workspaces button.active {
border-bottom: 3px solid #278a6e;
}
#workspaces button.urgent {
border-bottom: 3px solid #d0818f;
}

View File

@@ -1,25 +0,0 @@
@import url("file:///home/lupan/.config/waybar/dark.css");
* {
font-family: HurmitNerdFont;
font-size: 12px;
}
#workspaces {
padding: 0 0.5rem;
}
#workspaces button {
padding: 0 3px;
border-radius: 0;
border-bottom: 3px solid transparent;
}
#window {
border-bottom: 3px solid transparent;
}
#clock {
padding: 0 0.5rem;
border-bottom: 3px solid transparent;
}

6
niri/bin/chromium Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
if [ -n "$WAYLAND_DISPLAY" ]; then
exec /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"
fi
exec /usr/bin/chromium "$@"

View File

@@ -40,7 +40,7 @@ export GOBIN=~/.local/bin
# start X or Hyprland at login # start X or Hyprland at login
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
if which niri > /dev/null; then if niri > /dev/null; then
exec niri exec niri
elif which river kwm stdout-clock > /dev/null; then elif which river kwm stdout-clock > /dev/null; then
export XKB_DEFAULT_LAYOUT=pl export XKB_DEFAULT_LAYOUT=pl

View File

@@ -12,11 +12,9 @@ fi
if [ "$THEME" = dark ]; then if [ "$THEME" = dark ]; then
GTK_THEME=Arc-Dark GTK_THEME=Arc-Dark
BG_COLOR='#414853'
rm -f ~/.lightmode rm -f ~/.lightmode
elif [ "$THEME" = light ]; then elif [ "$THEME" = light ]; then
GTK_THEME=Arc-Light GTK_THEME=Arc-Light
BG_COLOR='#c0c1c2'
touch ~/.lightmode touch ~/.lightmode
else else
echo "error: unknown theme: should be either dark, light or toggle" >&2 echo "error: unknown theme: should be either dark, light or toggle" >&2
@@ -46,6 +44,7 @@ if [ -f "$ATOML" ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" "$ATOML" sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" "$ATOML"
fi fi
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ "$THEME" = dark ]; then if [ "$THEME" = dark ]; then
kitten themes --reload-in=all 'five-colors-dark' kitten themes --reload-in=all 'five-colors-dark'
elif [ "$THEME" = light ]; then elif [ "$THEME" = light ]; then
@@ -53,19 +52,12 @@ elif [ "$THEME" = light ]; then
fi fi
# GTK # GTK
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ -n "$XSET" ]; then if [ -n "$XSET" ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" "$XSET" sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" "$XSET"
pkill -HUP -x xsettingsd pkill -HUP -x xsettingsd
gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}" gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}"
fi fi
# niri
NIRI=$(readlink -e ~/.config/niri/config.kdl)
if [ -n "$NIRI" ]; then
sed -i -E "s%^( *background-color) .*%\\1 \"${BG_COLOR}\"%" "$NIRI"
fi
# waybar # waybar
WCSS=$(readlink -e ~/.config/waybar/style.css) WCSS=$(readlink -e ~/.config/waybar/style.css)
if [ -f "$WCSS" ]; then if [ -f "$WCSS" ]; then