2022-07-21 00:32:09 -03:00
{ config , pkgs , lib , . . . }:
let
2022-06-12 23:47:05 -03:00
key = {
2022-07-21 00:32:09 -03:00
left = " n " ;
down = " e " ;
up = " i " ;
right = " o " ;
2022-06-12 23:47:05 -03:00
tabL = " u " ;
tabR = " Y " ;
} ;
2022-06-13 10:34:47 -03:00
font = {
mono = " H a c k N e r d F o n t " ;
interface = " L i b e r a t i o n S a n s " ;
size = {
small = " 1 2 " ;
medium = " 1 4 " ;
big = " 1 6 " ;
} ;
} ;
accents = {
2022-06-13 12:07:08 -03:00
red = {
color = " # F 4 4 3 3 6 " ;
fg = " # f f f f f f " ;
} ;
2022-06-13 10:34:47 -03:00
} ;
themes = {
dark = {
2022-07-21 00:32:09 -03:00
background = " ~ / . l o c a l / s h a r e / b a c k g r o u n d s / a s s e m b l y _ d a r k . p n g " ;
2022-08-01 21:40:12 -03:00
opacity = 98 ;
2022-08-01 20:59:20 -03:00
opacityHex = " e e " ;
2022-06-13 10:34:47 -03:00
color = {
2022-07-21 00:32:09 -03:00
type = " d a r k " ;
bg = " # 2 0 2 0 2 0 " ;
bg_light = " # 4 0 4 0 4 0 " ;
bg_dark = " # 1 9 1 9 1 9 " ;
txt = " # F F F F F F " ;
nontxt = " # 2 5 2 5 2 5 " ;
random_range = " [ a - f ] " ;
2022-06-13 10:34:47 -03:00
normal = {
2022-07-21 00:32:09 -03:00
black = " # 4 0 4 0 4 0 " ;
red = " # A B 4 6 4 2 " ;
green = " # A 1 B 5 6 C " ;
yellow = " # E 6 C 5 4 7 " ;
blue = " # 6 C 9 9 D A " ;
magenta = " # C 3 9 7 D 8 " ;
cyan = " # 7 0 C 0 B A " ;
white = " # E A E A E A " ;
#non standard
orange = " # F F 7 5 0 0 " ;
brown = " # A 0 7 0 4 0 " ;
2022-06-13 10:34:47 -03:00
} ;
} ;
} ;
} ;
2022-07-16 02:12:18 -03:00
papirus_red = ( pkgs . unstable . papirus-icon-theme . override { color = " r e d " ; } ) ;
2022-07-21 00:32:09 -03:00
orchis_theme_compact =
( pkgs . orchis-theme . override { tweaks = [ " c o m p a c t " " s o l i d " ] ; } ) ;
nerdfonts_fira_hack =
( pkgs . nerdfonts . override { fonts = [ " F i r a C o d e " " H a c k " ] ; } ) ;
2022-06-13 12:07:08 -03:00
accent = accents . red ;
2022-08-01 20:59:20 -03:00
theme = themes . dark ;
color = theme . color ;
2022-07-20 22:14:36 -03:00
pulse_sink = pkgs . writeShellScriptBin " p u l s e _ s i n k " ''
#!/bin/sh
2022-08-01 23:00:36 -03:00
output = $ ( printf " H D M I \n H e a d p h o n e s " | $ { bmenu } /bin/bmenu - b )
2022-07-20 22:14:36 -03:00
vol = $ ( $ { pkgs . pamixer } /bin/pamixer - - get-volume )
case " $ o u t p u t " in
2022-07-21 00:32:09 -03:00
HDMI )
pactl set-default-sink alsa_output . pci-0000_07_00 .1 . hdmi-stereo-extra1
; ;
Headphones )
pactl set-default-sink alsa_output . pci-0000_09_00 .4 . analog-stereo
; ;
2022-07-20 22:14:36 -03:00
esac
$ { pkgs . pamixer } /bin/pamixer - - set-volume " $ v o l "
'' ;
2022-08-01 20:59:20 -03:00
bmenu = pkgs . writeScriptBin " b m e n u " ''
#!${pkgs.fish}/bin/fish
# wrapper around bemenu
# bmenu * - use as dmenu, -p for custom prompt (man bemenu)
# bmenu run - select from .desktop files and run it
# bmenu start - internal option
2022-08-01 23:38:27 -03:00
2022-08-01 20:59:20 -03:00
set swaymsg $ { pkgs . sway } /bin/swaymsg
set swaymsg $ { pkgs . sway } /bin/swaymsg
if test " $ a r g v [ 1 ] " = " r u n "
test - n " $ a r g v [ 2 ] " && set t " $ a r g v [ 2 ] " || set t " t e r m i n a l "
test - n " $ i 3 S O C K " && set wrapper ' i3-msg exec - - '
test - n " $ S W A Y S O C K " && set wrapper ' swaymsg exec - - '
exec $ { pkgs . j4-dmenu-desktop } /bin/j4-dmenu-desktop \
- - dmenu = " b m e n u s t a r t - p I n i c i a r : " \
- - term " $ t " \
- - wrapper = " $ w r a p p e r " \
- - no-generic
end
if test - n " $ S W A Y S O C K "
swaymsg - t get_tree |
$ { pkgs . jq } /bin/jq - je ' . . | select ( . focused ? and . fullscreen_mode ? == 1 ) | " " ' &&
$ { pkgs . sway } /bin/swaymsg - q fullscreen off &&
set fullscreen
$ { pkgs . sway } /bin/swaymsg - t get_outputs |
$ { pkgs . jq } /bin/jq - r ' map ( . focused ) | reverse | index ( true ) ' |
read focused_output
test - n " $ f o c u s e d _ o u t p u t "
and set focused_output " - m $ f o c u s e d _ o u t p u t "
end
function clean_exit
set - q fullscreen
and swaymsg - q fullscreen on &
end
trap clean_exit EXIT
# t title
# f filter
# n normal
# h highlighted
# s selected
# sc scrollbar
set fn " ${ font . mono } ${ font . size . small } "
2022-08-01 23:38:27 -03:00
set tb " ${ color . bg } ${ theme . opacityHex } "
set tf " ${ accent . color } "
2022-08-01 20:59:20 -03:00
2022-08-01 23:38:27 -03:00
set fb " ${ color . bg } ${ theme . opacityHex } "
set ff " ${ color . txt } "
2022-08-01 20:59:20 -03:00
2022-08-01 23:38:27 -03:00
set nb " ${ color . bg } ${ theme . opacityHex } "
set nf " ${ color . txt } "
set hb " ${ accent . color } "
set hf " ${ accent . fg } "
2022-08-01 20:59:20 -03:00
$ { pkgs . dhist } /bin/dhist wrap - - $ { pkgs . bemenu } /bin/bemenu \
$ focused_output \
- - ignorecase \
- - bottom \
- - no-overlap \
- - list 20 \
- - prefix ' > ' \
- - fn " $ f n " \
- - tb " $ t b " - - tf " $ t f " \
- - fb " $ f b " - - ff " $ f f " \
- - nb " $ n b " - - nf " $ n f " \
- - hb " $ h b " - - hf " $ h f " \
$ argv
# vim: ft=fish
'' ;
2022-08-02 22:33:21 -03:00
volumesh =
pkgs . writeShellScriptBin " v o l u m e s h " ( builtins . readFile ./scripts/volumesh ) ;
2022-07-20 22:14:36 -03:00
in {
2022-06-05 01:43:16 -03:00
# Home Manager needs a bit of information about you and the
# paths it should manage.
home . username = " l e l g e n i o " ;
home . homeDirectory = " / h o m e / l e l g e n i o " ;
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home . stateVersion = " 2 2 . 0 5 " ;
# Let Home Manager install and manage itself.
programs . home-manager . enable = true ;
home . packages = with pkgs ; [
alacritty
exa
fd
2022-07-20 22:14:36 -03:00
# text manipulation
pkgs . unstable . helix
2022-07-20 20:07:58 -03:00
sd
2022-06-05 01:43:16 -03:00
ripgrep
2022-07-20 22:14:36 -03:00
# desktop
kanshi
xfce . thunar
2022-07-20 22:44:41 -03:00
pass
2022-08-01 20:15:26 -03:00
dhist
2022-08-01 20:59:20 -03:00
bmenu
2022-08-02 00:07:04 -03:00
volumesh
pamixer
libnotify
2022-07-20 22:14:36 -03:00
# media
2022-06-12 23:47:05 -03:00
yt-dlp
2022-06-09 23:16:20 -03:00
ffmpeg
imagemagick
mpv
2022-07-21 10:36:38 -03:00
mpc-cli
pulse_sink
2022-08-02 21:36:25 -03:00
#games
lutris
steam
2022-07-20 20:07:58 -03:00
# chat
tdesktop
2022-08-02 21:36:25 -03:00
# discord # I'm using webcord, see home.activation
2022-07-20 20:07:58 -03:00
# Theming
2022-07-20 22:14:36 -03:00
orchis_theme_compact
papirus_red
2022-07-21 00:29:12 -03:00
libsForQt5 . qtstyleplugins
qt5 . qtsvg
2022-07-20 22:14:36 -03:00
## fonts
2022-06-13 10:34:47 -03:00
liberation_ttf
hack-font
font-awesome_5
fira-code
2022-07-21 00:32:09 -03:00
nerdfonts_fira_hack
2022-07-20 20:07:58 -03:00
# Programming
vscode
cargo
rust-analyzer
gcc
2022-07-21 10:36:38 -03:00
nixfmt
2022-06-05 01:43:16 -03:00
] ;
2022-08-01 21:14:29 -03:00
programs . fish = {
enable = true ;
interactiveShellInit = ''
2022-08-01 23:38:27 -03:00
set - g __accent_color " ${ accent . color } "
alias _fish_prompt_accent " _ f i s h _ p r o m p t _ c o l o r ' $ _ _ a c c e n t _ c o l o r ' "
2022-08-01 21:14:29 -03:00
'' ;
2022-08-01 21:32:44 -03:00
shellAbbrs = {
2022-08-01 23:38:27 -03:00
sv = " s u d o s y s t e m c t " ;
suv = " s u d o s y s t e m c t - - u s e r " ;
# git abbrs
g = " g i t " ;
ga = " g i t a d d " ;
gs = " g i t s t a t u s " ;
gsh = " g i t s h o w " ;
gl = " g i t l o g " ;
gg = " g i t g r a p h " ;
gd = " g i t d i f f " ;
gds = " g i t d i f f - - s t a g e d " ;
gc = " g i t c o m m i t " ;
gca = " g i t c o m m i t - - a l l " ;
gcf = " g i t c o m m i t - - f i x u p " ;
gp = " g i t p u s h - u o r i g i n ( g i t b r a n c h - - s h o w - c u r r e n t ) " ;
gw = " g i t s w i t c h " ;
gr = " c d ( g i t r o o t ) " ;
gri = " g i t r e b a s e - - i n t e r a c t i v e F E T C H _ H E A D " ;
2022-08-01 23:18:35 -03:00
} ;
2022-08-01 23:38:27 -03:00
functions = { fish_greeting = " " ; } ;
2022-08-01 23:18:35 -03:00
} ;
programs . zoxide = {
enable = true ;
enableFishIntegration = true ;
2022-08-01 21:14:29 -03:00
} ;
home . file = {
# ".config/sway/config".source = ./sway;
" . c o n f i g / f i s h / c o n f . d / p r o m p t . f i s h " . source = ./fish_prompt.fish ;
2022-08-01 23:18:29 -03:00
" . l o c a l / s h a r e / b a c k g r o u n d s " . source = ./backgrounds ;
2022-08-01 21:14:29 -03:00
} ;
2022-08-01 21:40:12 -03:00
programs . alacritty = {
enable = true ;
settings = {
2022-08-01 23:38:27 -03:00
colors = {
primary = {
background = " ${ color . bg } " ;
foreground = " ${ color . txt } " ;
2022-08-01 21:40:12 -03:00
} ;
2022-08-01 23:38:27 -03:00
cursor = {
text = " # 0 0 0 0 0 0 " ;
cursor = " ${ accent . color } " ;
2022-08-01 21:40:12 -03:00
} ;
2022-08-01 23:38:27 -03:00
normal = {
black = " ${ color . normal . black } " ;
red = " ${ color . normal . red } " ;
green = " ${ color . normal . green } " ;
yellow = " ${ color . normal . yellow } " ;
blue = " ${ color . normal . blue } " ;
magenta = " ${ color . normal . magenta } " ;
cyan = " ${ color . normal . cyan } " ;
white = " ${ color . normal . white } " ;
2022-08-01 21:40:12 -03:00
} ;
} ;
2022-08-01 23:38:27 -03:00
draw_bold_text_with_bright_colors = false ;
window = {
opacity = theme . opacity / 100 .0 ;
dynamic_padding = true ;
2022-08-01 21:40:12 -03:00
} ;
} ;
} ;
2022-07-16 02:43:19 -03:00
programs . helix = {
2022-07-16 14:24:09 -03:00
enable = true ;
2022-07-16 15:42:27 -03:00
package = pkgs . unstable . helix ;
2022-07-16 14:24:09 -03:00
settings = {
theme = " g r u v b o x " ;
2022-07-16 15:42:27 -03:00
editor = {
whitespace . render = " a l l " ;
whitespace . characters = {
2022-07-16 15:49:57 -03:00
space = " · " ;
tab = " → " ;
2022-07-16 15:42:27 -03:00
newline = " ¬ " ;
} ;
} ;
keys . normal = {
2022-07-21 00:32:09 -03:00
# basic movement
n = " m o v e _ c h a r _ l e f t " ;
e = " m o v e _ l i n e _ d o w n " ;
i = " m o v e _ l i n e _ u p " ;
o = " m o v e _ c h a r _ r i g h t " ;
# search
l = " s e a r c h _ n e x t " ;
L = " s e a r c h _ p r e v " ;
# edits
s = " i n s e r t _ m o d e " ;
# open newline
h = " o p e n _ b e l o w " ;
H = " o p e n _ a b o v e " ;
# selections
k = " s e l e c t _ r e g e x " ;
K = " s p l i t _ s e l e c t i o n " ;
" C - k " = " s p l i t _ s e l e c t i o n _ o n _ n e w l i n e " ;
# goto mode
g . n = " g o t o _ l i n e _ s t a r t " ;
g . o = " g o t o _ l i n e _ e n d " ;
} ;
2022-07-19 23:53:22 -03:00
keys . select = {
2022-07-21 00:32:09 -03:00
# basic movement
n = " e x t e n d _ c h a r _ l e f t " ;
e = " e x t e n d _ l i n e _ d o w n " ;
i = " e x t e n d _ l i n e _ u p " ;
o = " e x t e n d _ c h a r _ r i g h t " ;
# search
l = " s e a r c h _ n e x t " ;
L = " s e a r c h _ p r e v " ;
# edits
s = " i n s e r t _ m o d e " ;
# open newline
h = " o p e n _ b e l o w " ;
H = " o p e n _ a b o v e " ;
# selections
k = " s e l e c t _ r e g e x " ;
K = " s p l i t _ s e l e c t i o n " ;
" C - k " = " s p l i t _ s e l e c t i o n _ o n _ n e w l i n e " ;
# goto mode
g . n = " g o t o _ l i n e _ s t a r t " ;
g . o = " g o t o _ l i n e _ e n d " ;
} ;
keys . insert = { " A - k " = " n o r m a l _ m o d e " ; } ;
2022-07-16 02:43:19 -03:00
} ;
2022-07-16 15:42:27 -03:00
} ;
2022-08-02 22:33:21 -03:00
home . sessionVariables = {
2022-08-02 00:07:04 -03:00
EDITOR = " h x " ;
2022-08-02 22:33:21 -03:00
VOLUME_CHANGE_SOUND =
" ${ pkgs . sound-theme-freedesktop } / s h a r e / s o u n d s / f r e e d e s k t o p / s t e r e o / a u d i o - v o l u m e - c h a n g e . o g a " ;
2022-08-02 00:07:04 -03:00
} ;
2022-06-05 01:43:16 -03:00
programs . firefox = {
enable = true ;
package = pkgs . firefox ;
2022-07-19 23:43:50 -03:00
extensions = with pkgs . nur . repos . rycee . firefox-addons ; [
darkreader
ublock-origin
tree-style-tab
sponsorblock
duckduckgo-privacy-essentials
] ;
2022-06-13 20:10:58 -03:00
profiles = {
main = {
isDefault = true ;
settings = {
" d e v t o o l s . t h e m e " = " d a r k " ;
" t o o l k i t . l e g a c y U s e r P r o f i l e C u s t o m i z a t i o n s . s t y l e s h e e t s " = true ;
" b r o w s e r . t a b s . i n T i t l e b a r " = 0 ;
} ;
userChrome = ''
2022-07-16 02:12:18 -03:00
#tabbrowser-tabs { visibility: collapse !important; }
2022-06-13 20:10:58 -03:00
'' ;
} ;
} ;
2022-06-05 01:43:16 -03:00
} ;
2022-06-12 23:47:05 -03:00
programs . command-not-found . enable = true ;
# home.file = {
# ".config/sway/config".source = ./sway;
# };
2022-06-13 09:45:20 -03:00
programs . waybar = {
enable = true ;
2022-06-13 10:34:47 -03:00
systemd . enable = true ;
systemd . target = " s w a y - s e s s i o n . t a r g e t " ;
2022-06-13 09:45:20 -03:00
settings = [ {
layer = " t o p " ;
2022-07-21 00:32:09 -03:00
modules-left = [ " s w a y / w o r k s p a c e s " " s w a y / m o d e " ] ;
modules-center = [ " c l o c k " ] ;
modules-right = [ " p u l s e a u d i o " " n e t w o r k " ] ;
network = {
interval = 5 ;
tooltip = false ;
on-click = " t e r m i n a l i w d " ;
format-wifi = " { i c o n } " ;
format-icons = [ " " " " " " " " " " ] ;
format-ethernet = " " ;
format-linked = " " ;
format-disconnected = " " ;
2022-07-20 23:08:00 -03:00
} ;
2022-07-21 00:38:34 -03:00
" s w a y / w o r k s p a c e s " = {
enable-bar-scroll = true ;
format = " { i c o n } " ;
format-icons = {
" 1 " = " " ;
" 2 " = " " ;
" 3 " = " " ;
" 4 " = " " ;
" 5 " = " " ;
" 6 " = " " ;
" 7 " = " " ;
" 8 " = " " ;
" 9 " = " " ;
" 1 0 " = " " ;
urgent = " " ;
focused = " " ;
default = " " ;
} ;
} ;
2022-07-21 00:32:09 -03:00
clock = {
interval = 60 ;
format = " < b > { : % H : % M % a % d / % m } < / b > " ;
tooltip = false ;
2022-07-21 00:29:12 -03:00
} ;
2022-07-21 00:32:09 -03:00
pulseaudio = {
interval = 5 ;
tooltip = false ;
scroll-step = 10 ;
format = " { i c o n } " ;
format-bluetooth = " " ;
format-bluetooth-muted = " " ;
format-muted = " ﱝ " ;
format-icons = {
headphone = [ " 奄 " " 奔 " " 墳 " ] ;
handsfree = " " ;
headset = " " ;
phone = " " ;
portable = " " ;
car = " " ;
default = [ " 奄 " " 奔 " " 墳 " ] ;
} ;
on-click = " p a v u c o n t r o l " ;
on-click-right = " p u l s e - s i n k " ;
2022-07-19 23:34:15 -03:00
} ;
2022-06-13 09:45:20 -03:00
} ] ;
2022-06-13 10:34:47 -03:00
style = ''
/* { % @ @ s e t b g _ r g b = h e x 2 r g b ( c o l o r . b g ) @ @ % } */
* {
2022-07-21 00:32:09 -03:00
font : $ { font . size . medium } px " ${ font . interface } " , Font Awesome , Fira Code Nerd Font ;
border-radius:0 ;
margin:0 ;
padding : 0 ;
transition-duration:0 ;
2022-06-13 10:34:47 -03:00
}
window #waybar {
2022-07-21 00:32:09 -03:00
/* b a c k g r o u n d - c o l o r : r g b a ( 3 0 , 3 0 , 3 0 , . 9 ) ; */
transition-duration : . 5 s ;
/* T O D O : b a c k g r o u n d o p a c i t y */
background-color : $ { color . bg } ;
/* { % @ @ i f b a r _ p o s = = " t o p " @ @ % }
border-bottom :
{ % @ @ else @ @ % }
border-top :
{ % @ @ endif @ @ % } * /
2022-06-13 10:34:47 -03:00
border-bottom :
2022-07-21 00:32:09 -03:00
2 px solid $ { color . bg_dark } ;
2022-06-13 10:34:47 -03:00
}
window #waybar.solo {
2022-07-21 00:32:09 -03:00
background-color : $ { color . bg } ;
2022-06-13 10:34:47 -03:00
}
#workspaces button {
2022-07-21 00:32:09 -03:00
color : $ { color . bg_light } ;
min-width:50px ;
background-color : transparent ;
border : 3 px solid transparent ;
2022-06-13 10:34:47 -03:00
}
#workspaces button.focused {
2022-07-21 00:32:09 -03:00
color : $ { color . txt } ;
/* { % @ @ i f b a r _ p o s = = " t o p " @ @ % }
border-top :
{ % @ @ else @ @ % }
border-bottom :
{ % @ @ endif @ @ % } * /
border-top :
3 px solid $ { accent . color } ;
/* b o r d e r - b o t t o m : 3 p x s o l i d t r a n s p a r e n t ; */
2022-06-13 10:34:47 -03:00
}
/* W i n d o w T i t l e */
#window {
2022-07-21 00:32:09 -03:00
color : $ { color . txt } ;
margin:0 4 px ;
2022-06-13 10:34:47 -03:00
}
#mode {
2022-07-21 00:32:09 -03:00
color : $ { accent . color } ;
2022-06-13 10:34:47 -03:00
}
#mpd,
#custom-mpd,
#tray,
#clock,
#network,
#battery,
#backlight,
#bluetooth,
#pulseaudio,
#custom-mail,
#custom-spigot,
#custom-updates,
#custom-weather,
#custom-unpushed,
#custom-transmissionD,
#custom-transmissionS,
#custom-delugeD,
#custom-delugeS,
#custom-caffeine
{
2022-07-21 00:32:09 -03:00
margin : 0 7 px ;
color : $ { color . txt } ;
opacity:.7 ;
2022-06-13 10:34:47 -03:00
}
#battery{
2022-07-21 00:32:09 -03:00
margin-right:15px ;
2022-06-13 10:34:47 -03:00
}
#clock,
#custom-weather
{
2022-07-21 00:32:09 -03:00
font-size : $ { font . size . big } px ;
2022-06-13 10:34:47 -03:00
}
#network,
#pulseaudio,
#custom-caffeine
{
2022-07-21 00:32:09 -03:00
margin-top:-1px ;
font-size:16px ;
2022-06-13 10:34:47 -03:00
}
#mpd,
#window,
#workspaces
{
2022-07-21 00:32:09 -03:00
font-weight:normal ;
2022-06-13 10:34:47 -03:00
}
#custom-unpushed,
#custom-recording {
2022-07-21 00:32:09 -03:00
min-width:15px ;
color : #ee4040;
2022-06-13 10:34:47 -03:00
}
#tray {
2022-07-21 00:32:09 -03:00
padding : 0 ;
margin : 0 ;
2022-06-13 10:34:47 -03:00
}
#language {
2022-07-21 00:32:09 -03:00
font-size : $ { font . size . medium } px ;
color : $ { color . bg_light } ;
2022-06-13 10:34:47 -03:00
}
#custom-sleep {
2022-07-21 00:32:09 -03:00
color : $ { accent . color } ;
font-size : $ { font . size . big } px ;
font-weight : bold ;
2022-06-13 10:34:47 -03:00
}
'' ;
2022-06-13 09:45:20 -03:00
} ;
2022-06-12 23:47:05 -03:00
wayland . windowManager . sway = {
enable = true ;
config = {
2022-07-11 21:34:23 -03:00
bars = [ ] ;
2022-06-13 12:07:08 -03:00
window . titlebar = false ;
gaps = {
smartGaps = true ;
smartBorders = " o n " ;
inner = 5 ;
} ;
2022-07-21 00:32:09 -03:00
colors = let
acc = accent . color ;
fg_acc = accent . fg ;
fg_color = color . txt ;
bg_color = color . bg_dark ;
alert = " # 0 0 0 0 0 0 " ;
client = border : background : text : indicator : childBorder : {
inherit border background text indicator childBorder ;
2022-06-13 12:07:08 -03:00
} ;
2022-07-21 00:32:09 -03:00
in {
focused = client acc acc fg_acc acc acc ;
focusedInactive = client bg_color bg_color fg_color bg_color bg_color ;
unfocused = client bg_color bg_color fg_color bg_color bg_color ;
urgent = client alert alert fg_color alert alert ;
} ;
2022-08-01 23:38:27 -03:00
output = { " * " = { bg = " ${ theme . background } f i l l " ; } ; } ;
2022-06-12 23:47:05 -03:00
input . " t y p e : t o u c h p a d " = {
# Disable While Typing
dwt = " d i s a b l e d " ;
natural_scroll = " e n a b l e d " ;
tap = " e n a b l e d " ;
} ;
input . " * " = {
2022-07-20 19:48:29 -03:00
xkb_layout = " u s ( c o l e m a k ) , b r " ;
2022-06-12 23:47:05 -03:00
xkb_options = " l v 3 : l s g t _ s w i t c h , g r p : s h i f t s _ t o g g l e " ;
xkb_numlock = " e n a b l e d " ;
repeat_rate = " 3 0 " ;
repeat_delay = " 2 0 0 " ;
} ;
2022-07-20 22:14:36 -03:00
assigns = {
" 1 0 " = [
2022-07-21 00:32:09 -03:00
{ app_id = " . * [ T t ] e l e g r a m . * " ; }
{ class = " . * [ T t ] e l e g r a m . * " ; }
{ class = " J i t s i M e e t " ; }
{ class = " d i s c o r d " ; }
{ title = " D i s c o r d " ; }
2022-08-02 21:17:03 -03:00
{ class = " W e b C o r d " ; }
2022-07-20 22:14:36 -03:00
] ;
} ;
2022-07-21 00:32:09 -03:00
modes = let return_mode = lib . mapAttrs ( k : v : " ${ v } ; m o d e d e f a u l t " ) ;
2022-07-20 22:14:36 -03:00
in {
2022-08-02 00:07:04 -03:00
audio = {
2022-08-02 22:33:21 -03:00
$ { key . tabL } = " v o l u m e s d e c r e a s e " ;
2022-08-02 00:07:04 -03:00
} // return_mode {
" s p a c e " = " e x e c m p c t o g g l e " ;
2022-07-20 22:14:36 -03:00
" e s c a p e " = " " ;
" s " = " e x e c ${ pulse_sink } / b i n / p u l s e _ s i n k " ;
} ;
} ;
2022-08-01 21:42:30 -03:00
floating . modifier = " M o d 4 " ;
2022-07-21 00:32:09 -03:00
keybindings = let
2022-06-12 23:47:05 -03:00
mod = " M o d 4 " ;
2022-08-01 20:59:20 -03:00
menu = " b m e n u r u n " ;
2022-06-12 23:47:05 -03:00
terminal = " a l a c r i t t y " ;
2022-06-13 09:45:20 -03:00
workspace_binds = {
2022-06-12 23:47:05 -03:00
" ${ mod } + 1 " = " w o r k s p a c e n u m b e r 1 " ;
" ${ mod } + 2 " = " w o r k s p a c e n u m b e r 2 " ;
" ${ mod } + 3 " = " w o r k s p a c e n u m b e r 3 " ;
" ${ mod } + 4 " = " w o r k s p a c e n u m b e r 4 " ;
" ${ mod } + 5 " = " w o r k s p a c e n u m b e r 5 " ;
" ${ mod } + 6 " = " w o r k s p a c e n u m b e r 6 " ;
" ${ mod } + 7 " = " w o r k s p a c e n u m b e r 7 " ;
" ${ mod } + 8 " = " w o r k s p a c e n u m b e r 8 " ;
" ${ mod } + 9 " = " w o r k s p a c e n u m b e r 9 " ;
2022-06-13 09:45:20 -03:00
" ${ mod } + 0 " = " w o r k s p a c e n u m b e r 1 0 " ;
2022-07-21 00:32:09 -03:00
" ${ mod } + S h i f t + 1 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 1 " ;
" ${ mod } + S h i f t + 2 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 2 " ;
" ${ mod } + S h i f t + 3 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 3 " ;
" ${ mod } + S h i f t + 4 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 4 " ;
" ${ mod } + S h i f t + 5 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 5 " ;
" ${ mod } + S h i f t + 6 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 6 " ;
" ${ mod } + S h i f t + 7 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 7 " ;
" ${ mod } + S h i f t + 8 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 8 " ;
" ${ mod } + S h i f t + 9 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 9 " ;
" ${ mod } + S h i f t + 0 " = " m o v e c o n t a i n e r t o w o r k s p a c e n u m b e r 1 0 " ;
2022-06-13 09:45:20 -03:00
} ;
2022-07-21 00:32:09 -03:00
prev_next_binds = let
join_dict_arr = builtins . foldl' ( a : v : a // v ) { } ;
maybe_window = key :
if ( lib . strings . hasInfix " b u t t o n " key ) then
" - - w h o l e - w i n d o w "
else
" " ;
prev_binds = map ( key : {
" ${ maybe_window key } ${ mod } + ${ key } " = " w o r k s p a c e p r e v _ o n _ o u t p u t " ;
} ) [ key . tabL " b r a c k e t l e f t " " P r i o r " " b u t t o n 9 " " b u t t o n 4 " ] ;
next_binds = map ( key : {
" ${ maybe_window key } ${ mod } + ${ key } " = " w o r k s p a c e n e x t _ o n _ o u t p u t " ;
} ) [ key . tabR " b r a c k e t r i g h t " " N e x t " " b u t t o n 8 " " b u t t o n 5 " ] ;
in join_dict_arr ( prev_binds ++ next_binds ) ;
2022-06-13 09:45:20 -03:00
movement_binds = {
" ${ mod } + ${ key . left } " = " f o c u s l e f t " ;
" ${ mod } + ${ key . down } " = " f o c u s d o w n " ;
" ${ mod } + ${ key . up } " = " f o c u s u p " ;
" ${ mod } + ${ key . right } " = " f o c u s r i g h t " ;
" ${ mod } + L e f t " = " f o c u s l e f t " ;
" ${ mod } + D o w n " = " f o c u s d o w n " ;
" ${ mod } + U p " = " f o c u s u p " ;
" ${ mod } + R i g h t " = " f o c u s r i g h t " ;
" ${ mod } + S h i f t + ${ key . left } " = " m o v e l e f t " ;
" ${ mod } + S h i f t + ${ key . down } " = " m o v e d o w n " ;
" ${ mod } + S h i f t + ${ key . up } " = " m o v e u p " ;
" ${ mod } + S h i f t + ${ key . right } " = " m o v e r i g h t " ;
" ${ mod } + S h i f t + L e f t " = " m o v e l e f t " ;
" ${ mod } + S h i f t + D o w n " = " m o v e d o w n " ;
" ${ mod } + S h i f t + U p " = " m o v e u p " ;
" ${ mod } + S h i f t + R i g h t " = " m o v e r i g h t " ;
" ${ mod } + C o n t r o l + ${ key . left } " = " r e s i z e s h r i n k w i d t h " ;
" ${ mod } + C o n t r o l + ${ key . down } " = " r e s i z e g r o w h e i g h t " ;
" ${ mod } + C o n t r o l + ${ key . up } " = " r e s i z e s h r i n k h e i g h t " ;
" ${ mod } + C o n t r o l + ${ key . right } " = " r e s i z e g r o w w i d t h " ;
" ${ mod } + C o n t r o l + L e f t " = " r e s i z e s h r i n k w i d t h " ;
" ${ mod } + C o n t r o l + D o w n " = " r e s i z e g r o w h e i g h t " ;
" ${ mod } + C o n t r o l + U p " = " r e s i z e s h r i n k h e i g h t " ;
" ${ mod } + C o n t r o l + R i g h t " = " r e s i z e g r o w w i d t h " ;
" ${ mod } + m o d 1 + ${ key . left } " = " f o c u s o u t p u t l e f t " ;
" ${ mod } + m o d 1 + ${ key . down } " = " f o c u s o u t p u t d o w n " ;
" ${ mod } + m o d 1 + ${ key . up } " = " f o c u s o u t p u t u p " ;
" ${ mod } + m o d 1 + ${ key . right } " = " f o c u s o u t p u t r i g h t " ;
" ${ mod } + m o d 1 + L e f t " = " f o c u s o u t p u t l e f t " ;
" ${ mod } + m o d 1 + D o w n " = " f o c u s o u t p u t d o w n " ;
" ${ mod } + m o d 1 + U p " = " f o c u s o u t p u t u p " ;
" ${ mod } + m o d 1 + R i g h t " = " f o c u s o u t p u t r i g h t " ;
" ${ mod } + m o d 1 + S h i f t + ${ key . left } " = " m o v e w o r k s p a c e o u t p u t l e f t " ;
" ${ mod } + m o d 1 + S h i f t + ${ key . down } " = " m o v e w o r k s p a c e o u t p u t d o w n " ;
" ${ mod } + m o d 1 + S h i f t + ${ key . up } " = " m o v e w o r k s p a c e o u t p u t u p " ;
" ${ mod } + m o d 1 + S h i f t + ${ key . right } " = " m o v e w o r k s p a c e o u t p u t r i g h t " ;
" ${ mod } + m o d 1 + S h i f t + L e f t " = " m o v e w o r k s p a c e o u t p u t l e f t " ;
" ${ mod } + m o d 1 + S h i f t + D o w n " = " m o v e w o r k s p a c e o u t p u t d o w n " ;
" ${ mod } + m o d 1 + S h i f t + U p " = " m o v e w o r k s p a c e o u t p u t u p " ;
" ${ mod } + m o d 1 + S h i f t + R i g h t " = " m o v e w o r k s p a c e o u t p u t r i g h t " ;
} ;
audio_binds = {
2022-07-21 00:32:09 -03:00
XF86AudioRaiseVolume =
" e x e c p a c t l s e t - s i n k - v o l u m e @ D E F A U L T _ S I N K @ + 1 0 % " ;
XF86AudioLowerVolume =
" e x e c p a c t l s e t - s i n k - v o l u m e @ D E F A U L T _ S I N K @ - 1 0 % " ;
2022-06-13 09:45:20 -03:00
XF86AudioMute = " e x e c p a c t l s e t - s i n k - m u t e @ D E F A U L T _ S I N K @ t o g g l e " ;
2022-07-21 00:32:09 -03:00
XF86AudioMicMute =
" e x e c p a c t l s e t - s o u r c e - m u t e @ D E F A U L T _ S O U R C E @ t o g g l e " ;
2022-06-13 09:45:20 -03:00
# Control media
XF86AudioPlay = " e x e c p l a y e r c t l p l a y - p a u s e " ;
XF86AudioPause = " e x e c p l a y e r c t l p l a y - p a u s e " ;
XF86AudioNext = " e x e c p l a y e r c t l n e x t " ;
XF86AudioPrev = " e x e c p l a y e r c t l p r e v i o u s " ;
} ;
2022-07-21 00:32:09 -03:00
system_binds = { " C t r l + ${ mod } + z " = " e x e c s y s t e m c t l s u s p e n d " ; } ;
2022-06-13 09:45:20 -03:00
in {
" ${ mod } + R e t u r n " = " e x e c ${ terminal } " ;
2022-07-20 20:07:58 -03:00
" ${ mod } + C t r l + R e t u r n " = " e x e c t h u n a r " ;
2022-06-13 09:45:20 -03:00
" ${ mod } + x " = " k i l l " ;
" ${ mod } + s " = " e x e c ${ menu } " ;
2022-07-20 22:14:36 -03:00
" ${ mod } + m " = " m o d e a u d i o " ;
2022-06-13 09:45:20 -03:00
" ${ mod } + b " = " s p l i t h " ;
" ${ mod } + v " = " s p l i t v " ;
" ${ mod } + f " = " f u l l s c r e e n t o g g l e " ;
" ${ mod } + a " = " f o c u s p a r e n t " ;
# "${mod}+s" = "layout stacking";
" ${ mod } + w " = " l a y o u t t a b b e d " ;
# "${mod}+e" = "layout toggle split";
" ${ mod } + S h i f t + s p a c e " = " f l o a t i n g t o g g l e " ;
" ${ mod } + s p a c e " = " f o c u s m o d e _ t o g g l e " ;
" ${ mod } + S h i f t + m i n u s " = " m o v e s c r a t c h p a d " ;
" ${ mod } + m i n u s " = " s c r a t c h p a d s h o w " ;
" ${ mod } + S h i f t + c " = " r e l o a d " ;
# "${mod}+Shift+e" =
# "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
" ${ mod } + r " = " m o d e r e s i z e " ;
2022-07-21 00:32:09 -03:00
} // workspace_binds // prev_next_binds // movement_binds // audio_binds
2022-07-20 19:48:29 -03:00
// system_binds
2022-06-12 23:47:05 -03:00
# // map (key: "$mod+${key} workspace prev_on_output") [ key.tabL "bracketleft" "Prior" "button9" "button4" ]
# // map (key: "$mod+${key} workspace next_on_output") [ key.tabL "bracketleft" "Prior" "button9" "button4" ]
;
terminal = pkgs . alacritty . executable ;
2022-06-13 09:45:20 -03:00
} ;
} ;
2022-08-01 23:38:27 -03:00
services . swayidle = {
enable = true ;
timeouts = [
{
timeout = 360 ;
command = " s w a y l o c k - f " ;
}
{
timeout = 1800 ;
2022-08-02 22:33:21 -03:00
command = ''
mpc status | grep " ^ [ p l a y i n g ] " > /dev/null || swaymsg " o u t p u t * d p m s o f f " '' ;
resumeCommand = '' s w a y m s g " o u t p u t * d p m s o n " '' ;
2022-08-01 23:38:27 -03:00
}
] ;
events = [ {
event = " b e f o r e - s l e e p " ;
command = " s w a y l o c k - f " ;
} ] ;
} ;
2022-08-02 22:33:21 -03:00
home . file . " . c o n f i g / s w a y l o c k / c o n f i g " . text = ''
image = $ { theme . background }
font = $ { font . interface }
font-size = $ { font . size . medium }
indicator-thickness = 20
color = $ { color . bg }
inside-color = #FFFFFF00
bs-hl-color = $ { color . normal . red }
ring-color = $ { color . normal . green }
key-hl-color = $ { accent . color }
# divisor lines
separator-color = #aabbcc00
line-color = #aabbcc00
line-clear-color = #aabbcc00
line-caps-lock-color = #aabbcc00
line-ver-color = #aabbcc00
line-wrong-color = #aabbcc00
'' ;
2022-07-21 01:04:22 -03:00
services . gammastep = {
enable = true ;
provider = " g e o c l u e 2 " ;
} ;
2022-06-13 09:45:20 -03:00
services . kanshi = {
enable = true ;
profiles = {
sedetary = {
2022-07-21 00:32:09 -03:00
outputs = [
{
criteria = " e D P - 1 " ;
status = " d i s a b l e " ;
position = " 1 9 2 0 , 3 1 2 " ;
}
{
criteria = " H D M I - A - 1 " ;
position = " 0 , 0 " ;
}
2022-07-16 02:12:18 -03:00
] ;
2022-07-21 00:32:09 -03:00
exec = [ " x r d b . X r e s o u r c e s " ] ;
2022-07-16 02:12:18 -03:00
} ;
2022-06-13 09:45:20 -03:00
nomad = {
outputs = [ {
criteria = " e D P - 1 " ;
status = " e n a b l e " ;
position = " 1 9 2 0 , 3 1 2 " ;
} ] ;
2022-07-21 00:32:09 -03:00
exec = [ " x r d b . X r e s o u r c e s " ] ;
2022-06-13 09:45:20 -03:00
} ;
2022-06-12 23:47:05 -03:00
} ;
2022-08-02 00:16:05 -03:00
} ;
programs . mako = {
enable = true ;
borderSize = 2 ;
2022-08-02 22:33:21 -03:00
padding = " 5 " ;
margin = " 1 5 " ;
2022-08-02 00:16:05 -03:00
layer = " o v e r l a y " ;
backgroundColor = color . bg ;
borderColor = accent . color ;
progressColor = " o v e r ${ accent . color } 8 8 " ;
2022-08-02 22:33:21 -03:00
defaultTimeout = 10000 ;
# # {{@@ header() @@}}
# # text
# font={{@@ font.interface @@}} {{@@ font.size.small @@}}
# text-color={{@@ color.txt @@}}
2022-08-02 00:16:05 -03:00
2022-08-02 22:33:21 -03:00
# # colors
# background-color={{@@ color.bg @@}}{{@@ opacity | clamp_to_hex @@}}
# border-color={{@@ accent_color @@}}
# progress-color=over {{@@ accent_color @@}}88
2022-08-02 00:16:05 -03:00
2022-08-02 22:33:21 -03:00
# # decoration
# border-size=2
# padding=5
# margin=15
2022-08-02 00:16:05 -03:00
2022-08-02 22:33:21 -03:00
# # features
# icons=1
# markup=1
# actions=1
# default-timeout=10000
2022-08-02 00:16:05 -03:00
2022-08-02 22:33:21 -03:00
# # position
# layer=overlay
2022-08-02 00:16:05 -03:00
2022-08-02 22:33:21 -03:00
# [app-name=volumesh]
# default-timeout=5000
# group-by=app-name
# format=<b>%s</b>\n%b
2022-08-02 00:16:05 -03:00
2022-08-02 22:33:21 -03:00
# [app-name=dotdrop]
# default-timeout=5000
# group-by=app-name
# format=<b>%s</b>\n%b
2022-08-02 00:16:05 -03:00
2022-08-02 22:33:21 -03:00
# # vim: ft=ini
2022-08-02 00:16:05 -03:00
2022-08-02 21:17:03 -03:00
} ;
home . activation = {
2022-08-02 22:33:21 -03:00
install_flatpaks = lib . hm . dag . entryAfter [ " w r i t e B o u n d a r y " ] ''
2022-08-02 21:17:03 -03:00
$ DRY_RUN_CMD flatpak $ VERBOSE_ARG remote-add - - if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
$ DRY_RUN_CMD flatpak $ VERBOSE_ARG install - y flathub io . github . spacingbat3 . webcord
'' ;
2022-06-12 23:47:05 -03:00
} ;
2022-06-13 12:07:08 -03:00
services . kdeconnect = {
enable = true ;
indicator = true ;
} ;
2022-07-21 10:36:38 -03:00
services . mpd = {
enable = true ;
musicDirectory = " ~ / M ú s i c a " ;
} ;
2022-07-19 22:20:55 -03:00
home . pointerCursor = {
name = " c a p i t a i n e - c u r s o r s " ;
package = pkgs . capitaine-cursors ;
x11 . enable = true ;
gtk . enable = true ;
} ;
2022-06-13 22:21:47 -03:00
gtk = {
enable = true ;
theme = {
name = " O r c h i s - R e d - D a r k - C o m p a c t " ;
package = orchis_theme_compact ;
} ;
iconTheme = {
name = " P a p i r u s - D a r k " ;
2022-07-16 02:12:18 -03:00
package = papirus_red ;
2022-06-13 22:21:47 -03:00
} ;
} ;
2022-07-19 22:05:48 -03:00
qt = {
enable = true ;
platformTheme = " g t k " ;
style . package = pkgs . libsForQt5 . qtstyleplugins ;
style . name = " g t k 2 " ;
} ;
2022-07-21 00:29:12 -03:00
2022-07-20 00:14:01 -03:00
programs . mangohud . enable = true ;
2022-07-20 20:07:58 -03:00
systemd . user . services = {
firefox = {
Unit = {
Description = " F i r e f o x W e b b r o w s e r " ;
Documentation = " h t t p s : / / g i t h u b . c o m / A l e x a y s / W a y b a r / w i k i " ;
PartOf = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
After = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
} ;
Service = {
2022-08-02 21:17:03 -03:00
ExecStart = " ${ pkgs . firefox } / b i n / f i r e f o x " ;
2022-07-20 20:07:58 -03:00
Restart = " o n - f a i l u r e " ;
} ;
Install = { WantedBy = [ " s w a y - s e s s i o n . t a r g e t " ] ; } ;
} ;
discord = {
Unit = {
Description = " D i s c o r d I n t e r n e t v o i c e c h a t " ;
PartOf = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
After = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
} ;
Service = {
2022-08-02 21:17:03 -03:00
ExecStart = " / u s r / b i n / e n v f l a t p a k r u n i o . g i t h u b . s p a c i n g b a t 3 . w e b c o r d " ;
2022-07-20 20:07:58 -03:00
Restart = " o n - f a i l u r e " ;
} ;
Install = { WantedBy = [ " s w a y - s e s s i o n . t a r g e t " ] ; } ;
} ;
telegram = {
Unit = {
Description = " T e l e g r a m I n t e r n e t c h a t " ;
PartOf = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
After = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
} ;
Service = {
ExecStart = " ${ pkgs . tdesktop } / b i n / t e l e g r a m - d e s k t o p " ;
Restart = " o n - f a i l u r e " ;
} ;
Install = { WantedBy = [ " s w a y - s e s s i o n . t a r g e t " ] ; } ;
} ;
2022-08-02 00:16:05 -03:00
mako = {
Unit = {
Description = " N o t i f i c a t i o n d a e m o n " ;
PartOf = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
After = [ " g r a p h i c a l - s e s s i o n . t a r g e t " ] ;
} ;
Service = {
ExecStart = " ${ pkgs . mako } / b i n / m a k o " ;
Restart = " o n - f a i l u r e " ;
} ;
Install = { WantedBy = [ " s w a y - s e s s i o n . t a r g e t " ] ; } ;
} ;
2022-07-20 20:07:58 -03:00
} ;
2022-07-21 00:32:09 -03:00
}