2024-01-15 14:26:21 -05:00
{ scripts , config , lib , pkgs , . . . }:
2024-01-04 21:21:04 -05:00
2024-01-15 14:11:14 -05:00
let
2024-01-15 14:26:21 -05:00
dynscreenshot = pkgs . writeShellScript " d y n s c r e e n s h o t " ( builtins . readFile " ${ scripts } / d y n s c r e e n s h o t . s h " ) ;
changebrightness = pkgs . writeShellScript " c h a n g e b r i g h t n e s s " ( builtins . readFile " ${ scripts } / c h a n g e b r i g h t n e s s . s h " ) ;
2024-01-15 14:11:14 -05:00
mod = config . wayland . windowManager . sway . config . modifier ;
in {
2024-01-04 21:21:04 -05:00
enable = true ;
2024-01-05 16:38:09 -05:00
config = rec {
2024-01-23 10:45:26 -05:00
terminal = " w e z t e r m " ;
2024-01-04 21:21:04 -05:00
modifier = " M o d 4 " ;
2024-01-05 13:02:09 -05:00
fonts = {
2024-01-05 22:01:44 -05:00
names = [ " R e d H a t D i s p l a y " ] ;
2024-01-05 13:02:09 -05:00
style = " R e g u l a r " ;
size = 12 .0 ;
} ;
2024-01-10 10:26:07 -05:00
input = { " t y p e : t o u c h p a d " = { natural_scroll = " d i s a b l e d " ; } ; } ;
2024-01-05 16:38:09 -05:00
bars = let config = config ; in [ {
position = " t o p " ;
inherit fonts ;
statusCommand = " ${ pkgs . i3status } / b i n / i 3 s t a t u s " ;
} ] ;
2024-01-04 21:21:04 -05:00
window = {
border = 2 ;
titlebar = true ;
} ;
2024-01-15 14:11:14 -05:00
keybindings = let screenshotPath = " P i c t u r e s / S c r e e n s h o t s / s c r e e n s h o t ` d a t e + % Y % m % d % H % M % S ` . p n g " ; in lib . mkOptionDefault ( { # Screenshot keybinds
" P r i n t " = " e x e c g r i m ${ screenshotPath } & & w l - c o p y < ${ screenshotPath } " ; # Take screenshot of whole screen, save it, and copy it to clipboard
" S h i f t + P r i n t " = " e x e c s w a y m s g - t g e t _ t r e e | j q - r ' . . | s e l e c t ( . f o c u s e d ? ) | . r e c t | \" \\ ( . x ) , \\ ( . y ) \\ ( . w i d t h ) x \\ ( . h e i g h t ) \" ' | g r i m - g - ${ screenshotPath } & & w l - c o p y < ${ screenshotPath } " ; # Take screenshot of current window, save it, and copy it to clipboard
" C t r l + P r i n t " = " e x e c b a s h ${ dynscreenshot } " ; # Take screenshot of selection, save it, and copy it to clipboard
} // { # Function Media Keys
XF86MonBrightnessUp = " e x e c b a s h ${ changebrightness } 1 " ;
XF86MonBrightnessDown = " e x e c b a s h ${ changebrightness } - 1 " ;
XF86AudioRaiseVolume = " e x e c w p c t l s e t - v o l u m e @ D E F A U L T _ A U D I O _ S I N K @ 0 . 0 5 + " ;
XF86AudioLowerVolume = " e x e c w p c t l s e t - v o l u m e @ D E F A U L T _ A U D I O _ S I N K @ 0 . 0 5 - " ;
" ${ mod } + X F 8 6 A u d i o R a i s e V o l u m e " = " e x e c w p c t l s e t - v o l u m e @ D E F A U L T _ A U D I O _ S O U R C E @ 0 . 0 5 + " ;
" ${ mod } + X F 8 6 A u d i o L o w e r V o l u m e " = " e x e c w p c t l s e t - v o l u m e @ D E F A U L T _ A U D I O _ S O U R C E @ 0 . 0 5 - " ;
} ) ;
2024-01-23 10:45:26 -05:00
menu = " j 4 - d m e n u - d e s k t o p - - n o - g e n e r i c - - t e r m = w e z t e r m - - d m e n u = ' b e m e n u - i - - f n R e d H a t D i s p l a y 1 2 - H 2 4 - p \" \" - B 2 - - h p 5 ' " ; # I don't like hardcoding kitty here, TODO think of better way to do it
2024-01-05 13:02:09 -05:00
focus . followMouse = false ;
2024-01-04 21:21:04 -05:00
} ;
2024-01-05 13:02:09 -05:00
extraConfig =
''
output ' eDP-1' scale 1 .50
'' + # F r a c t i o n a l s c a l i n g t o 1 . 5 0
''
input type:touchpad {
dwt disabled
click_method clickfinger
}
'' ; # D i s a b l e f a k e s c r o l l d i r e c t i o n a n d d i s a b l i n g t o u c h p a d w h i l e t y p i n g , e n a b l e m u l t i f i n g e r c l i c k i n g
}