Compare commits

...

8 commits

11 changed files with 41 additions and 50 deletions

View file

@ -34,7 +34,8 @@ fix-nixconf:
gc: gc:
nix-collect-garbage -d nix-collect-garbage -d
# nix-store --gc nix store gc
nix-store --gc
.PHONY: home .PHONY: home
home: home:

View file

@ -27,22 +27,15 @@ in {
"sway/workspaces" "sway/workspaces"
]; ];
modules-right = [ modules-right = [
"sway/language"
"pulseaudio"
"group/batteryinfo"
"group/hardware" "group/hardware"
"group/batteryinfo"
"pulseaudio"
"custom/display" "custom/display"
"custom/network" "custom/network"
"tray"
]; ];
"sway/workspaces" = { "sway/workspaces" = {
all-outputs = true; all-outputs = true;
}; };
"sway/language" = {
on-click = "swaymsg 'input * xkb_switch_layout next'";
on-click-right = "xdg-open https://translate.yandex.ru/";
tooltip = false;
};
"sway/scratchpad" = { "sway/scratchpad" = {
format = "{icon} {count}"; format = "{icon} {count}";
on-click = "swaymsg 'scratchpad show'"; on-click = "swaymsg 'scratchpad show'";
@ -55,9 +48,6 @@ in {
"" ""
]; ];
}; };
tray = {
spacing = 8;
};
clock = { clock = {
format-alt = "{:%H:%M %a %d %b}"; format-alt = "{:%H:%M %a %d %b}";
on-click-right = "xdg-open https://cloud.voronind.com/apps/calendar/"; on-click-right = "xdg-open https://cloud.voronind.com/apps/calendar/";
@ -104,8 +94,8 @@ in {
format-muted = "󰸈{format_source}"; format-muted = "󰸈{format_source}";
format-source = ""; format-source = "";
format-source-muted = " 󰍭"; format-source-muted = " 󰍭";
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; on-click = "pavucontrol";
on-click-middle = "pavucontrol"; on-click-middle = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
on-click-right = "pactl set-source-mute @DEFAULT_SOURCE@ toggle"; on-click-right = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
scroll-step = 5; scroll-step = 5;
}; };

View file

@ -24,11 +24,9 @@ in {
#clock, #clock,
#custom-display, #custom-display,
#custom-network, #custom-network,
#language,
#mpris, #mpris,
#pulseaudio, #pulseaudio,
#scratchpad, #scratchpad {
#tray {
padding: ${paddingV} ${paddingH}; padding: ${paddingV} ${paddingH};
} }
@ -47,11 +45,9 @@ in {
#custom-display:hover, #custom-display:hover,
#custom-network:hover, #custom-network:hover,
#hardware:hover, #hardware:hover,
#language:hover,
#mpris:hover, #mpris:hover,
#pulseaudio:hover, #pulseaudio:hover,
#scratchpad:hover, #scratchpad:hover,
#tray:hover,
#workspaces button:hover { #workspaces button:hover {
background-color: rgba(${config.module.style.color.borderR},${config.module.style.color.borderG},${config.module.style.color.borderB},${toString config.module.style.opacity.desktop}); background-color: rgba(${config.module.style.color.borderR},${config.module.style.color.borderG},${config.module.style.color.borderB},${toString config.module.style.opacity.desktop});
} }
@ -63,8 +59,7 @@ in {
#custom-network, #custom-network,
#memory, #memory,
#pulseaudio, #pulseaudio,
#temperature, #temperature {
#tray {
border-top: ${toString config.module.style.window.border}px solid transparent; border-top: ${toString config.module.style.window.border}px solid transparent;
border-bottom: ${toString config.module.style.window.border}px solid transparent; border-bottom: ${toString config.module.style.window.border}px solid transparent;
} }
@ -77,8 +72,7 @@ in {
#memory.critical, #memory.critical,
#pulseaudio.muted, #pulseaudio.muted,
#pulseaudio.source-muted, #pulseaudio.source-muted,
#temperature.critical, #temperature.critical {
#tray.needs-attention {
border-top: ${toString config.module.style.window.border}px solid #${config.module.style.color.accent}; border-top: ${toString config.module.style.window.border}px solid #${config.module.style.color.accent};
} }

View file

@ -141,6 +141,11 @@
use = use ++ defaultUse; use = use ++ defaultUse;
}; };
in [ in [
(mkName "*.xlsx" [ "document" ])
(mkName "*.mka" [ "audio" ])
(mkName "*.nsp" [ "switch_install" ])
(mkName "*.nsz" [ "switch_install" ])
# Use `file -i file.txt` to find file mime type. # Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app. # Use `xdg-mime query default "text/plain"` to find default app.
(mkMime "application/gzip" [ "unpack" ]) (mkMime "application/gzip" [ "unpack" ])
@ -152,15 +157,12 @@
(mkMime "application/x-raw-disk-image" [ "unlock" ]) (mkMime "application/x-raw-disk-image" [ "unlock" ])
(mkMime "application/pdf" [ "pdf" ]) (mkMime "application/pdf" [ "pdf" ])
(mkMime "audio/*" [ "audio" ]) (mkMime "audio/*" [ "audio" ])
(mkName "*.mka" [ "audio" ])
(mkName "*.nsp" [ "switch_install" ])
(mkName "*.nsz" [ "switch_install" ])
(mkMime "image/*" [ "picture" "picture_copy" "picture_edit" "picture_edit_quick" ]) (mkMime "image/*" [ "picture" "picture_copy" "picture_edit" "picture_edit_quick" ])
(mkMime "video/*" [ "video" ]) (mkMime "video/*" [ "video" ])
(mkMime "text/html" [ "browser" ]) (mkMime "text/html" [ "browser" ])
(mkMime "application/vnd.openxmlformats-officedocument.*" [ "document" ]) (mkMime "application/vnd.openxmlformats-officedocument.*" [ "document" ])
(mkName "*.xlsx" [ "document" ])
(mkMime "application/x-executable" [ "steam_run" ]) (mkMime "application/x-executable" [ "steam_run" ])
{ mime = "inode/directory"; use = [ "archive" "bottle_run" "audio_shuffle" ]; } { mime = "inode/directory"; use = [ "archive" "bottle_run" "audio_shuffle" ]; }
(mkMime "*" [ ]) (mkMime "*" [ ])
]; ];

View file

@ -1,9 +1,9 @@
{ ... }: { { ... }: {
networking = { networking = {
firewall.extraCommands = '' firewall.extraCommands = ''
# Ssh access. # Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143 iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143 ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
''; '';
}; };
} }

View file

@ -1,14 +1,9 @@
{ ... }: { { ... }: {
networking = { networking = {
firewall.extraCommands = '' firewall.extraCommands = ''
# Ssh access. # Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143 iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143 ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
# Syncthing.
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22000
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p udp --dport 22000
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p udp --dport 21027
''; '';
}; };
} }

View file

@ -52,8 +52,8 @@
mv ''${paper} ''${path_backup}/paper/ || report "Backup: Failed to save paper!" mv ''${paper} ''${path_backup}/paper/ || report "Backup: Failed to save paper!"
cd - cd -
rcp_merge_fast ''${path_src}/sync/save/ ''${path_backup}/save/tmp/ || report "Backup: Failed to save game saves!" rcp_merge ''${path_src}/sync/save/ ''${path_backup}/save/tmp/ || report "Backup: Failed to save game saves!"
rcp_merge_fast ''${path_src}/sync/photo/ ''${path_backup}/photo/tmp/ || report "Backup: Failed to save photos!" rcp_merge ''${path_src}/sync/photo/ ''${path_backup}/photo/tmp/ || report "Backup: Failed to save photos!"
# Prune media copies. # Prune media copies.
cd ''${path_backup}/paper/ cd ''${path_backup}/paper/

View file

@ -1,9 +1,9 @@
{ ... }: { { ... }: {
networking = { networking = {
firewall.extraCommands = '' firewall.extraCommands = ''
# Ssh access. # Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143 iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143 ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
''; '';
}; };
} }

View file

@ -0,0 +1,9 @@
{ ... }: {
networking = {
firewall.extraCommands = ''
# Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
'';
};
}

View file

@ -1,9 +1,9 @@
{ ... }: { { ... }: {
networking = { networking = {
firewall.extraCommands = '' firewall.extraCommands = ''
# Ssh access. # Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143 iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143 ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
''; '';
}; };
} }

View file

@ -4,9 +4,9 @@
function networkwidget() { function networkwidget() {
local IFS=$'\n' local IFS=$'\n'
local internet=$(nmcli networking connectivity check) local internet=$(nmcli networking connectivity check)
local _ethernets=($(nmcli connection show --active | rg ethernet | cut -f1 -d\ )) local _ethernets=($(nmcli connection show --active | rg ethernet | sed "s/ .*//"))
local _vpns=($(nmcli connection show --active | rg vpn | cut -f1 -d\ )) local _vpns=($(nmcli connection show --active | rg vpn | sed "s/ .*//"))
local _wifis=($(nmcli connection show --active | rg wifi | cut -f1 -d\ )) local _wifis=($(nmcli connection show --active | rg wifi | sed "s/ .*//"))
local _bts=($(bluetoothctl devices Connected | cut -d\ -f3)) local _bts=($(bluetoothctl devices Connected | cut -d\ -f3))
local icon="󰖩" local icon="󰖩"
local class="" local class=""