Add initial wayland configs

This commit is contained in:
Andrew Scott 2023-06-15 01:21:31 -04:00
parent 04f26cd3ea
commit c52c91ea7e
Signed by: a
GPG key ID: 7CD5A5977E4931C1
7 changed files with 776 additions and 2 deletions

View file

@ -20,6 +20,11 @@ export _JAVA_AWT_WM_NONREPARENTING=1
# Sometimes needed for gpg passphrase prompt # Sometimes needed for gpg passphrase prompt
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
# Mozilla + Wayland
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
export MOZ_ENABLE_WAYLAND=1
fi
# xsecurelock settings # xsecurelock settings
export XSECURELOCK_AUTH=auth_x11 export XSECURELOCK_AUTH=auth_x11
export XSECURELOCK_AUTHPROTO=authproto_pam export XSECURELOCK_AUTHPROTO=authproto_pam
@ -76,6 +81,6 @@ export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
[[ -f ~/.bashrc ]] && . ~/.bashrc [[ -f ~/.bashrc ]] && . ~/.bashrc
# startx # start river
[[ -z "${DISPLAY}" && "${XDG_VTNR}" -eq 1 ]] && exec startx [[ -z "${DISPLAY}" && "${XDG_VTNR}" -eq 1 ]] && exec dbus-run-session river

View file

@ -0,0 +1,88 @@
# output=<not set>
font=Hack
dpi-aware=auto
# prompt=>
icon-theme=Qogir-dark
icons-enabled=yes
fields=filename,name,generic,exec
# password-character=*
fuzzy=yes
show-actions=yes
terminal=kitty
# launch-prefix=<not set>
lines=15
width=30
tabs=4
horizontal-pad=40
vertical-pad=8
inner-pad=0
image-size-ratio=0.5
# line-height=<use font metrics>
letter-spacing=0
layer = top
exit-on-keyboard-focus-loss = yes
[colors]
background=525c6dff
text=d8caacff
match=83c092ff
selection=72b783dd
selection-text=4a555bff
border=d5b26bff
[border]
width=1
radius=10
[dmenu]
# mode=text # text|index
# exit-immediately-if-empty=no
[key-bindings]
# cancel=Escape Control+g
# execute=Return KP_Enter Control+y
# execute-or-next=Tab
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# delete-line=Control+k
# prev=Up Control+p
# prev-with-wrap=ISO_Left_Tab
# prev-page=PageUp KP_PageUp
# next=Down Control+n
# next-with-wrap=none
# next-page=Page_Down KP_Page_Down
# custom-N: *dmenu mode only*. Like execute, but with a non-zero
# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
# with 12, and so on.
# custom-1=Mod1+1
# custom-2=Mod1+2
# custom-3=Mod1+3
# custom-4=Mod1+4
# custom-5=Mod1+5
# custom-6=Mod1+6
# custom-7=Mod1+7
# custom-8=Mod1+8
# custom-9=Mod1+9
# custom-10=Mod1+0
# custom-11=Mod1+exclam
# custom-12=Mod1+at
# custom-13=Mod1+numbersign
# custom-14=Mod1+dollar
# custom-15=Mod1+percent
# custom-16=Mod1+dead_circumflex
# custom-17=Mod1+ampersand
# custom-18=Mod1+asterix
# custom-19=Mod1+parentleft

View file

@ -0,0 +1,69 @@
; Global settings
[general]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500
; Disable the smooth fade between temperatures when Redshift starts and stops.
; 0 will cause an immediate change between screen temperatures.
; 1 will gradually apply the new screen temperature over a couple of seconds.
fade=1
; Solar elevation thresholds.
; By default, Redshift will use the current elevation of the sun to determine
; whether it is daytime, night or in transition (dawn/dusk). When the sun is
; above the degrees specified with elevation-high it is considered daytime and
; below elevation-low it is considered night.
;elevation-high=3
;elevation-low=-6
; Custom dawn/dusk intervals.
; Instead of using the solar elevation, the time intervals of dawn and dusk
; can be specified manually. The times must be specified as HH:MM in 24-hour
; format.
;dawn-time=6:00-7:45
;dusk-time=18:35-20:15
; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel
; individually)
;gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6
; Set the location-provider: 'geoclue2', 'manual'.
; The location provider settings are in a different section.
location-provider=manual
; Set the adjustment-method: 'randr', 'vidmode', 'drm', 'wayland'.
; 'randr' is the preferred X11 method, 'vidmode' is an older API
; that works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=wayland
; Configuration of the location-provider:
; type 'gammastep -l PROVIDER:help' to see the settings.
; ex: 'gammastep -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=41.5
lon=81.7
; Configuration of the adjustment-method
; type 'gammastep -m METHOD:help' to see the settings.
; ex: 'gammastep -m randr:help'
; In this example, randr is configured to adjust only screen 0.
; Note that the numbering starts from 0, so this is actually the first screen.
; If this option is not specified, Redshift will try to adjust _all_ screens.
;[randr]
;screen=0

6
dot_config/kanshi/config Normal file
View file

@ -0,0 +1,6 @@
profile dual {
#output * background ~/Pictures/Wallpapers/dark-forest-path.jpg scale
output DP-1 mode 1920x1080@144.00Hz position 0,0
output DP-2 mode 1920x1080@60.00Hz position 1920,0
}

View file

@ -0,0 +1,171 @@
#!/bin/sh
# Start kitty
riverctl map normal Super Return spawn kitty
# Start fuzzel
riverctl map normal Super Space spawn fuzzel
# Close the focused view
riverctl map normal Super Q close
# Exit river
riverctl map normal Super+Shift E exit
# Focus the next/previous view in the layout stack
riverctl map normal Super J focus-view next
riverctl map normal Super K focus-view previous
# Swap the focused view with the next/previous view in the layout stack
riverctl map normal Super+Shift J swap next
riverctl map normal Super+Shift K swap previous
# Focus the next/previous output
riverctl map normal Super L focus-output next
riverctl map normal Super H focus-output previous
# Send the focused view to the next/previous output
riverctl map normal Super+Shift Grave send-to-output next
riverctl map normal Super Grave send-to-output previous
# Bump the focused view to the top of the layout stack
riverctl map normal Super+Shift Return zoom
# Increase/decrease the main ratio of rivertile(1)
riverctl map normal Super+Alt+Shift L send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super+Alt+Shift H send-layout-cmd rivertile "main-ratio +0.05"
# Increment/decrement the main count of rivertile(1)
riverctl map normal Super+Alt+Shift J send-layout-cmd rivertile "main-count +1"
riverctl map normal Super+Alt+Shift K send-layout-cmd rivertile "main-count -1"
# Move views
riverctl map normal Super+Alt H move left 100
riverctl map normal Super+Alt J move down 100
riverctl map normal Super+Alt K move up 100
riverctl map normal Super+Alt L move right 100
# Snap views to screen edges
riverctl map normal Super+Alt+Control H snap left
riverctl map normal Super+Alt+Control J snap down
riverctl map normal Super+Alt+Control K snap up
riverctl map normal Super+Alt+Control L snap right
# Resize views
riverctl map normal Super Right resize horizontal -100
riverctl map normal Super Up resize vertical 100
riverctl map normal Super Down resize vertical -100
riverctl map normal Super Left resize horizontal 100
# Move views with mouse
riverctl map-pointer normal Super BTN_LEFT move-view
# Resize views with mouse
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Toggle float with mouse
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i set-focused-tags $tags
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i set-view-tags $tags
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i toggle-focused-tags $tags
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
done
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 set-focused-tags $all_tags
riverctl map normal Super+Shift 0 set-view-tags $all_tags
# Toggle float
riverctl map normal Super S toggle-float
# Toggle fullscreen
riverctl map normal Super F toggle-fullscreen
# Change layout
riverctl map normal Super+Shift K send-layout-cmd rivertile "main-location top"
riverctl map normal Super+Shift L send-layout-cmd rivertile "main-location right"
riverctl map normal Super+Shift J send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super+Shift H send-layout-cmd rivertile "main-location left"
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
riverctl declare-mode passthrough
# Enter passthrough mode
riverctl map normal Super F11 enter-mode passthrough
# Return to normal mode
riverctl map passthrough Super F11 enter-mode normal
# Function/Media keys
for mode in normal locked
do
# Pipewire volume
riverctl map $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +5%'
riverctl map $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -5%'
riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
# Backlight brightness
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
done
# Set background and border
riverctl background-color 0x323d43
riverctl border-color-focused 0xd8caac
riverctl border-color-unfocused 0x525c62
riverctl border-color-urgent 0xe68183
riverctl border-width 1
# Keyboard repeat rate
riverctl set-repeat 50 300
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add float -app-id 'Bitwarden'
riverctl rule-add float -app-id 'Blueman-manager'
riverctl rule-add float -app-id 'Galculator' -title 'galculator'
riverctl rule-add float -app-id 'KeePassXC'
riverctl rule-add float -app-id 'Lutris'
riverctl rule-add float -app-id 'Mousepad'
riverctl rule-add float -app-id 'Steam'
riverctl rule-add float -app-id 'vlc'
# Make all views with app-id "bar" and any title use client-side decorations
#riverctl rule-add csd -app-id "bar"
# Default layoout generator - rivertile(1)
riverctl default-layout rivertile
rivertile -view-padding 6 -outer-padding 6 -main-ratio .5 &
# Autostart
/usr/lib/at-spi-bus-launcher --launch-immediately &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
gnome-keyring-daemon --start --components=pkcs11 &
gnome-keyring-daemon --start --components=secrets &
gnome-keyring-daemon --start --components=ssh &
kanshi &
swayidle -w timeout 600 waylock -fork-on-lock -init-color 0x000000 &
swaybg -m fill -i $HOME/Pictures/Wallpapers/dark-forest-path.jpg &
$HOME/.local/bin/pipewire-launcher &
waybar &
dunst &
gammastep -r &
evolution &
mattermost-desktop &
nextcloud --background &

155
dot_config/waybar/config Normal file
View file

@ -0,0 +1,155 @@
{
"layer": "top",
"output": "DP-1",
"position": "bottom",
"height": 24,
// "width": 1280,
"spacing": 4,
"modules-left": [
"river/mode",
"river/tags"
],
"modules-center": [
"river/window"
],
"modules-right": [
"idle_inhibitor",
"pulseaudio",
"network",
"cpu",
"memory",
"temperature",
"keyboard-state",
"clock",
"tray"
],
"keyboard-state": {
"numlock": false,
"capslock": true,
"format": "{name} {icon}",
"format-icons": {
"locked": "",
"unlocked": ""
}
},
"river/mode": {
"format": "mode: {}"
},
"river/tags": {
"tag-labels": ["1", "2", "3", "4", "5"],
"num-tags": 5
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
"icon-size": 18,
"spacing": 10
},
"clock": {
"timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"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": {
// "scroll-step": 1, // %, can be a float
"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"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
}
}

280
dot_config/waybar/style.css Normal file
View file

@ -0,0 +1,280 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
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 10px;
color: #ffffff;
}
#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;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@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;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}