Compare commits

..

8 Commits

8 changed files with 76 additions and 8 deletions

View File

@@ -1,6 +1,8 @@
// This config is in the KDL format: https://kdl.dev
// https://niri-wm.github.io/niri/Configuration:-Introduction
spawn-at-startup "waybar"
input {
keyboard {
xkb {
@@ -30,6 +32,7 @@ output "DP-1" {
layout {
gaps 16
background-color "#414853"
center-focused-column "never"
@@ -121,6 +124,7 @@ binds {
// 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+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"; }
Mod+Shift+T hotkey-overlay-title="Toggle theme" { spawn "lupan-set-theme" "toggle"; }

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,25 @@
@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;
}

View File

@@ -1,6 +0,0 @@
#!/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
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
if niri > /dev/null; then
if which niri > /dev/null; then
exec niri
elif which river kwm stdout-clock > /dev/null; then
export XKB_DEFAULT_LAYOUT=pl

View File

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