Redshift on Wayland

This commit is contained in:
Cedric Bonhomme 2024-03-21 00:52:54 +01:00
parent 98e55eb2a2
commit d987481a85
8 changed files with 149 additions and 35 deletions

View file

@ -0,0 +1,68 @@
; Global settings
[general]
; Set the day and night screen temperatures
temp-day=5700
temp-night=4500
; 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=44.481
lon=0.3545
; 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

View file

@ -0,0 +1,14 @@
#!/usr/bin/env sh
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
exit
fi
hyprctl reload

View file

@ -1,8 +1,8 @@
# Some default env vars.
env = XCURSOR_SIZE,24
#env = QT_QPA_PLATFORM,wayland;xcb
#env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_PLATFORM_PLUGIN,kde
env = QT_QPA_PLATFORMTHEME,qt6ct
#env = QT_PLATFORM_PLUGIN,kde
env = XDG_CURRENT_DESKTOP,Hyprland
#env = XDG_CURRENT_DESKTOP,Hyprland
@ -14,7 +14,6 @@ env = GDK_BACKEND,wayland,x11
#env = QT_QPA_PLATFORM,xcb
env = QT_QPA_PLATFORM,xcb
# env = QT_QPA_PLATFORMTHEME,qt6ct #env = QT_STYLE_OVERRIDE,kvantum
env = QT_QPA_PLATFORMTHEME,KDE
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1

View file

@ -1,23 +1,47 @@
exec-once = hyprpm reload -n
##################################################
# Theme #
##################################################
exec-once = swaybg -m fill -i ~/.config/feh/wallpaper.png &
exec-once = kded6 &
exec-once = otd-daemon &
exec-once = wal -Rnq &
exec-once = hyprctl setcursor Bibata-Original-Classic 24
##################################################
# Plugins #
##################################################
exec-once = hyprpm reload
exec-once = otd-daemon &
##################################################
# Appmenu #
##################################################
exec-once = kded6 &
exec-once = qdbus6 org.kde.kded6 /kded org.kde.kded6.loadModule appmenu &
exec-once = ~/bin/qmenu_registrar &
exec-once = dunst &
##################################################
# Sound #
##################################################
exec-once = pipewire-autostart.sh &
##################################################
# Music #
##################################################
exec-once = mpd &
exec-once = playerctld daemon &
exec-once = mpDris2 &
##################################################
# Widgets #
##################################################
exec-once = hyprland-autoname-workspaces &
exec-once = eww daemon &
exec-once = eww open bar-hypr &
exec-once = eww open clock &
exec-once = mpd &
exec-once = playerctld daemon &
exec-once = mpDris2 &
exec-once = transmission-daemon &
exec-once = ~/bin/transmission-rss
##################################################
# Clipboard #
##################################################
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
exec-once = hyprctl setcursor Bibata-Original-Classic 24
# exec-once = waybar -c ~/.config/waybar/config-hypr &
##################################################
# User #
##################################################
exec-once = gammastep -l 44.481:0.3545 &
exec-once = transmission-daemon &
exec-once = ~/bin/transmission-rss &
exec-once = vdirsyncer sync &

View file

@ -45,22 +45,6 @@ general {
resize_on_border = false
}
plugin {
hy3 {
tabs {
height = 2
padding = 6
render_text = false
}
autotile {
enable = true
trigger_width = 800
trigger_height = 500
}
}
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
@ -95,6 +79,7 @@ animations {
animation = windows, 1, 4, overshot, slide
animation = windowsOut, 1, 5, default, popin 80%
animation = border, 1, 5, default
animation = borderangle, 0, 12, default, loop
animation = fade, 1, 8, default
animation = workspaces, 1, 6, overshot, slide

View file

@ -5,13 +5,13 @@ $mainMod = SUPER
bind=$mainMod,RETURN, exec, kitty
bind=$mainMod,Z,killactive,
bind=$mainMod + Alt, ESCAPE ,exit,
bind=$mainMod,V,togglefloating,
bind=$mainMod,T,togglefloating,
bind=$mainMod,F,fullscreen,
bind=$mainMod,SPACE, exec, rofi -show drun -fullscreen -monitor -4 --terminal kitty -theme app -drun-categories System,Utility,Network,Office,Settings,Game,Qt,Development,Graphics,GTK,AudioVideo,Audio,Video,Viewer,WebBrowser
bind=$mainMod + SHIFT, SPACE , exec, rofi -show drun -fullscreen -monitor -4 --terminal kitty -theme manga -drun-categories Manga
bind=$mainMod + SHIFT, A , exec, ~/bin/qmenu_hud
bind=$mainMod,P,pseudo,
bind=$mainMod + SHIFT,T,pseudo,
bind=$mainMod,h,movefocus,l
bind=$mainMod,l,movefocus,r
@ -23,6 +23,11 @@ bind=$mainMod + SHIFT, l, movewindow, r
bind=$mainMod + SHIFT, k, movewindow, u
bind=$mainMod + SHIFT, j, movewindow, d
bind=$mainMod + CTRL, h, layoutmsg, preselect l
bind=$mainMod + CTRL, l, layoutmsg, preselect r
bind=$mainMod + CTRL, k, layoutmsg, preselect u
bind=$mainMod + CTRL, j, layoutmsg, preselect d
bind=$mainMod, RIGHT, workspace, +1
bind=$mainMod, LEFT, workspace, -1
@ -51,10 +56,10 @@ bind=ALT,8,movetoworkspace,8
bind=ALT,9,movetoworkspace,9
bind=ALT,0,movetoworkspace,10
bind=$mainMod,R,exec,wofi --show drun -o DP-3
bind=CTRL,SPACE,exec,dunstctl close
bind=CTRL+SHIFT,SPACE,exec,dunstctl close-all
bind=CTRL,grave,exec,dunstctl hystory-pop
bind=SUPERSHIFT,period,layoutmsg,cyclenext
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
@ -64,7 +69,6 @@ bind = $mainMod, mouse_up, workspace, e-1
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bindel=, XF86AudioRaiseVolume, exec, mixer update 2+
bindel=, XF86AudioLowerVolume, exec, mixer update 2%-
bindl=, Pause, exec, mixer switch
@ -73,3 +77,23 @@ bindl=, XF86AudioNext, exec, mixer next
bindl=, XF86AudioPrev, exec, mixer prev
bindl=, XF86AudioPlay, exec, mixer toggle
bindl=, XF86AudioStop, exec, mixer stop
# will switch to a submap called resize
bind=ALT,R,submap,resize
# will start a submap called "resize"
submap=resize
# sets repeatable binds for resizing the active window
binde=,right,resizeactive,10 0
binde=,left,resizeactive,-10 0
binde=,up,resizeactive,0 -10
binde=,down,resizeactive,0 10
# use reset to go back to the global submap
bind=,escape,submap,reset
# will reset the submap, meaning end the current one and return to the global one
submap=reset
# bind=$mainMod, F1, exec, ~/.config/hypr/gamemode.sh

View file

@ -5,4 +5,3 @@ layerrule = blur, laucher
layerrule = blur, notifications
windowrule = rounding 0, Rofi
windowrule = rounding 30, gtk-layer-shell

View file

@ -173,3 +173,4 @@ DEFAULT = ""
"kinfocenter" = " "
"plasma-systemmonitor" = " "
"Eww" = " "
"Rofi" = ""