test2
This commit is contained in:
parent
7f1abd6092
commit
120ba475b9
20 changed files with 1945 additions and 29 deletions
|
|
@ -1 +1,3 @@
|
|||
Это мои приватные дотсы
|
||||
Это мои приватные дотсы
|
||||
|
||||
Искать иконки для nerd шрифта можно [тут](https://www.nerdfonts.com/cheat-sheet).
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
# let
|
||||
# system = "x86_64-linux";
|
||||
# system = "x86_64-linux"; # Не понимаю зачем, если это в hardware.nix указывается
|
||||
# pkgs = nixpkgs.legacyPackages.${system};
|
||||
# in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
# General
|
||||
|
||||
# Search (Если надо вернуть гугл поисковик в стоке)
|
||||
# # Search (Если надо вернуть гугл поисковик в стоке)
|
||||
# "browser.policies.runOncePerModification.extensionsUninstall" = [ # Удалить расширения
|
||||
# "amazondotcom@search.mozilla.org"
|
||||
# "ebay@search.mozilla.org"
|
||||
|
|
|
|||
|
|
@ -21,9 +21,11 @@
|
|||
./terminal/zellij.nix
|
||||
./terminal/zsh.nix
|
||||
|
||||
./wm/bspwm.nix
|
||||
./wm/bspwm/bspwm.nix
|
||||
./wm/rofi/rofi.nix
|
||||
./wm/dunst.nix
|
||||
./wm/lockscreen.nix
|
||||
./wm/polybar.nix
|
||||
./wm/rofi.nix
|
||||
./wm/sxhkd.nix
|
||||
|
||||
./default-apps.nix
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ class YankContentWl(Command):
|
|||
self.fm.notify("{} is not a file".format(file.relative_path))
|
||||
return
|
||||
if file.is_binary or file.image:
|
||||
subprocess.check_call("wl-copy" + " < " + file.path, shell=True)
|
||||
# subprocess.check_call("wl-copy" + " < " + file.path, shell=True) # Это было в стоке, не работает с видео
|
||||
subprocess.check_call(f'for path in "{file.path}"; do echo "file://$path"; done | wl-copy -t text/uri-list', shell=True)
|
||||
else:
|
||||
self.fm.notify("{} is not an image file or a text file".format(file.relative_path))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
{ # Управление окнами
|
||||
|
||||
}
|
||||
1234
modules/home-manager/wm/bspwm/bspwm.md
Normal file
1234
modules/home-manager/wm/bspwm/bspwm.md
Normal file
File diff suppressed because it is too large
Load diff
7
modules/home-manager/wm/bspwm/bspwm.nix
Normal file
7
modules/home-manager/wm/bspwm/bspwm.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ # Управление окнами. В инете примерно ноль нормальной документации с описанием всех параметров. Проклинал
|
||||
xsession.windowManager.bspwm = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.file.".config/bspwm/bspwmrc".source = "./bspwmrc";
|
||||
}
|
||||
91
modules/home-manager/wm/bspwm/bspwmrc
Normal file
91
modules/home-manager/wm/bspwm/bspwmrc
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Описание настроек можно найти тут https://manpages.debian.org/testing/bspwm/bspc.1.en.html
|
||||
# Или через "man bspc" в терминале
|
||||
# Или в ./bspwm.md
|
||||
|
||||
################
|
||||
## Автозапуск ##
|
||||
################
|
||||
|
||||
# Это по сути терминал. Пишем то, как запускается прога через терминал и в конце & обязательно
|
||||
|
||||
# # Как я понял, их не надо запускать, ведь они активированы через services..enable = true;
|
||||
# # Если в nixos что-то включается через services, а не через programs, то nixos сам отвечает за автозапуск сервисов
|
||||
# pgrep -x sxhkd > /dev/null || sxhkd & # Запускаем sxhkd если он не запущен
|
||||
# pgrep -x polybar > /dev/null || polybar & # Запускаем polybar если он не запущен
|
||||
# pgrep -x dunst > /dev/null || dunst & # Запускаем dunst если он не запущен
|
||||
|
||||
# ksnip &
|
||||
# nekoray &
|
||||
# obsidian &
|
||||
# planify &
|
||||
|
||||
#########################
|
||||
## Настройки мониторов ##
|
||||
#########################
|
||||
|
||||
# bspc monitor -d I II III IV V VI VII VIII IX X # Это было в стоке
|
||||
|
||||
# Получаем имена активных мониторов
|
||||
MONITORS=( $(xrandr --listactivemonitors | grep -E '^ [0-9]+:' | cut -d' ' -f6 | sed 's/\n/ /') )
|
||||
|
||||
# Если переменная MONITOR уже задана, то используется её значение.
|
||||
# Если она не задана (то есть пуста или не существует), то используется первый элемент из массива MONITORS (то есть, первый активный монитор).
|
||||
# Это гарантирует, что переменная MONITOR всегда будет содержать значение: либо установленное ранее, либо первый активный монитор по умолчанию.
|
||||
# ":-" Это оператор в Bash, который используется для установки значения по умолчанию. Если переменная не задана или пуста, используется значение после :-
|
||||
MONITOR="${MONITOR:-${MONITORS[0]}}"
|
||||
|
||||
# Для запуска приложений на втором мониторе, если он доступен. Если второго монитора нет, используем первый.
|
||||
MONITOR2="${MONITORS[1]:-${MONITORS[0]}}"
|
||||
|
||||
# # Устанавливаем рабочие столы с именами от 1 до 10 для каждого монитора
|
||||
# for mon in ${MONITORS[@]}; do
|
||||
# bspc monitor $mon -d {1,2,3,4,5,6,7,8,9,10}
|
||||
# done
|
||||
|
||||
# Устанавливаем рабочие столы с именами от 1 до 10 для каждого монитора
|
||||
bspc monitor -d 1 2 3 4 5 6 7 8 9 10 # Можно заменить на {1,2,3,4,5,6,7,8,9,10}
|
||||
|
||||
# Настройка автоматического удаления настроек для отключённых и отсоединённых мониторов
|
||||
bspc config remove_disabled_monitors true
|
||||
bspc config remove_unplugged_monitors true
|
||||
|
||||
#####################
|
||||
## Настройки bspwm ##
|
||||
#####################
|
||||
|
||||
# Syntax - bspc config [-m MONITOR_SEL|-d DESKTOP_SEL|-n NODE_SEL] <setting> [<value>]
|
||||
|
||||
# Устанавливает ширину границ окон в 2 пикселя.
|
||||
bspc config border_width 2
|
||||
|
||||
# Задаёт расстояние между окнами (отступ) в 5 пикселей.
|
||||
bspc config window_gap 5
|
||||
|
||||
# Настраивает коэффициент разделения окон при их разделении. Значение 0.52 означает, что при разделении окно будет занимать 52% доступного пространства.
|
||||
bspc config split_ratio 0.52
|
||||
|
||||
# В режиме monocle (максимизация окна на весь экран) границы окон будут скрыты.
|
||||
bspc config borderless_monocle true
|
||||
|
||||
# В режиме monocle будет отсутствовать отступ между окнами.
|
||||
bspc config gapless_monocle true
|
||||
|
||||
# Eсли вы активируете режим "monocle" на одном мониторе, другие мониторы остаются в обычном режиме
|
||||
bspc config single_monocle false
|
||||
|
||||
# Фокусировка следует за курсором
|
||||
bspc config focus_follows_pointer true
|
||||
|
||||
###############################
|
||||
## Поведение конкретных окон ##
|
||||
###############################
|
||||
|
||||
|
||||
# Yдаляет все существующие правила для всех окон
|
||||
# bspc rule -r '*'
|
||||
|
||||
bspc rule -a 'polybar' layer=above
|
||||
|
||||
bspc rule -a Screenkey manage=off
|
||||
366
modules/home-manager/wm/dunst.nix
Normal file
366
modules/home-manager/wm/dunst.nix
Normal file
|
|
@ -0,0 +1,366 @@
|
|||
{ pkgs, ... }: {
|
||||
# Оповещения. Бинды можно делать через "dunstctl"
|
||||
# https://wiki.archlinux.org/title/Dunst
|
||||
# https://dunst-project.org/documentation/
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
|
||||
iconTheme = {
|
||||
name = "Gruvbox-Plus-Dark"; # Имя каталога в /usr/share/icons/
|
||||
package = pkgs.gruvbox-plus-icons; # Пакет иконок
|
||||
size = "32x32";
|
||||
};
|
||||
|
||||
settings = {
|
||||
global = {
|
||||
###############
|
||||
### Monitor ###
|
||||
###############
|
||||
|
||||
monitor = 0; # Which monitor should the notifications be displayed on.
|
||||
follow = "mouse"; # Display notification on focused monitor. Ignore "monitor" option
|
||||
|
||||
################
|
||||
### Geometry ###
|
||||
################
|
||||
|
||||
width = 300; # Можно задать динамический размер. Например от 0 до 300 "width = (0, 300)"
|
||||
height = 300; # The maximum height of a single notification, excluding the frame.
|
||||
origin = "top-right"; # Position the notification in the top right corner
|
||||
offset = "20x20"; # Offset from the origin
|
||||
scale = 0; # Scale factor. It is auto-detected if value is 0.
|
||||
notification_limit = 20; # Maximum number of notification (0 means no limit)
|
||||
|
||||
####################
|
||||
### Progress bar ###
|
||||
####################
|
||||
|
||||
# Затестить прогресс бар через терминал: dunstify -h int:value:50 "Загрузка" "Процесс загрузки на 50%"
|
||||
progress_bar = true; # Turn on the progess bar. It appears when a progress hint is passed with
|
||||
progress_bar_height = 10; # This includes the frame, so make sure it's at least twice as big as the frame width.
|
||||
progress_bar_frame_width = 1; # Set the frame width of the progress bar
|
||||
progress_bar_min_width = 150; # Set the minimum width for the progress bar
|
||||
progress_bar_max_width = 300; # Set the maximum width for the progress bar
|
||||
|
||||
indicate_hidden = "yes"; # Show how many messages are currently hidden (because of notification_limit).
|
||||
#transparency = 5; # Прозрачность от 0 до 100%. Требует композитор, например picom. Не вижу смысла его ставить
|
||||
padding = 6; # Padding between text and separator.
|
||||
horizontal_padding = 6; # Horizontal padding.
|
||||
text_icon_padding = 0; # Padding between text and icon.
|
||||
frame_width = 3; # Defines width in pixels of frame around the notification window. Set to 0 to disable.
|
||||
frame_color = "#8EC07C"; # Defines color of the frame around the notification window.
|
||||
sort = "no"; # Sort messages by urgency.
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input) for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules section for how to disable this if necessary
|
||||
idle_threshold = 0;
|
||||
|
||||
separator_height = 2; # Draw a line of "separator_height" pixel height between two notifications. Set to 0 to disable.
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = "frame";
|
||||
|
||||
############
|
||||
### Text ###
|
||||
############
|
||||
|
||||
font = "JetBrainsMono Nerd Font 11";
|
||||
|
||||
# The spacing between lines.
|
||||
# If the height is smaller than the font height, it will get raised to the font height.
|
||||
line_height = 3;
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <https://docs.gtk.org/Pango/pango_markup.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = "full";
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b";
|
||||
|
||||
alignment = "center"; # Alignment of message text. Possible values are "left", "center" and "right".
|
||||
vertical_alignment = "center"; # Vertical alignment of message text and icon. Possible values are "top", "center" and "bottom".
|
||||
show_age_threshold = -1; # Show age of message if message is older than show_age_threshold seconds. Set to -1 to disable.
|
||||
ellipsize = "middle"; # Specify where to make an ellipsis in long lines. Possible values are "start", "middle" and "end".
|
||||
ignore_newline = "no"; # Ignore newlines '\n' in notifications.
|
||||
stack_duplicates = true; # Stack together notifications with the same content
|
||||
hide_duplicate_count = true; # Hide the count of stacked notifications with the same content
|
||||
show_indicators = "no"; # Display indicators for URLs (U) and actions (A).
|
||||
word_wrap = "yes"; # Split notifications into multiple lines if they don't fit into geometry.
|
||||
|
||||
#############
|
||||
### Icons ###
|
||||
#############
|
||||
|
||||
enable_recursive_icon_lookup = true; # Чтоб не надо было указывать icon_path
|
||||
icon_position = "off"; # Align icons left/right/off
|
||||
|
||||
# Не знаю надо ли, когда я указал размер иконок в начале файла
|
||||
#min_icon_size = 80; # Scale small icons up to this size, set to 0 to disable.
|
||||
#max_icon_size = 80; # Scale larger icons down to this size, set to 0 to disable.
|
||||
|
||||
###############
|
||||
### History ###
|
||||
###############
|
||||
|
||||
sticky_history = "yes"; # Should a notification popped up from history be sticky or timeout as if it would normally do.
|
||||
history_length = 15; # Maximum amount of notifications kept in history
|
||||
|
||||
#####################
|
||||
### Misc/Advanced ###
|
||||
#####################
|
||||
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -dmenu -p dunst:"; # dmenu path (через что отображать gui)
|
||||
browser = "${pkgs.xdg-utils}/bin/xdg-open"; # Browser for opening urls in context menu.
|
||||
always_run_script = true; # Always run rule-defined scripts, even if the notification is suppressed
|
||||
title = "Dunst"; # Define the title of the windows spawned by dunst
|
||||
class = "Dunst"; # Define the class of the windows spawned by dunst
|
||||
corner_radius = 0; # Скругление окон?
|
||||
|
||||
# Ignore the dbus closeNotification message.
|
||||
# Useful to enforce the timeout set by dunst configuration.
|
||||
# Without this parameter, an application may close the notification sent before the user defined timeout.
|
||||
ignore_dbusclose = false;
|
||||
|
||||
##############
|
||||
### Legacy ###
|
||||
##############
|
||||
|
||||
force_xinerama = false; # Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
|
||||
#############
|
||||
### Mouse ###
|
||||
#############
|
||||
|
||||
# Defines list of actions for each mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: Invoke the action determined by the action_name rule. If there is no
|
||||
# such action, open the context menu.
|
||||
# * open_url: If the notification has exactly one url, open it. If there are multiple
|
||||
# ones, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
# * context: Open context menu for the notification.
|
||||
# * context_all: Open context menu for all notifications.
|
||||
# These values can be strung together for each mouse event, and
|
||||
# will be executed in sequence.
|
||||
mouse_left_click = "close_current";
|
||||
mouse_middle_click = "do_action, close_current";
|
||||
mouse_right_click = "close_all";
|
||||
|
||||
###############
|
||||
### Wayland ###
|
||||
###############
|
||||
|
||||
# These settings are Wayland-specific. They have no effect when using X11
|
||||
|
||||
# Uncomment this if you want to let notications appear under fullscreen
|
||||
# applications (default: overlay)
|
||||
# layer = top
|
||||
|
||||
# Set this to true to use X11 output on Wayland.
|
||||
# force_xwayland = false
|
||||
|
||||
};
|
||||
|
||||
# Experimental features that may or may not work correctly.
|
||||
# Do not expect them to have a consistent behaviour across releases.
|
||||
experimental = {
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false;
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
frame_color = "#3B7C87";
|
||||
foreground = "#3B7C87";
|
||||
background = "#191311";
|
||||
#background = "#2B313C";
|
||||
timeout = 4;
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#default_icon = /path/to/icon;
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
frame_color = "#5B8234";
|
||||
foreground = "#5B8234";
|
||||
background = "#191311";
|
||||
#background = "#2B313C";
|
||||
timeout = 6;
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#default_icon = /path/to/icon;
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
frame_color = "#B7472A";
|
||||
foreground = "#B7472A";
|
||||
background = "#191311";
|
||||
#background = "#2B313C";
|
||||
timeout = 8;
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#default_icon = /path/to/icon;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname: Имя приложения, отправившего уведомление (не рекомендуется использовать, см. desktop_entry).
|
||||
# body: Тело сообщения уведомления.
|
||||
# category: Категория уведомления.
|
||||
# desktop_entry: Имя записи в меню рабочего стола приложения.
|
||||
# icon: Иконка уведомления.
|
||||
# match_transient: Сопоставление с временными уведомлениями.
|
||||
# msg_urgency: Срочность уведомления.
|
||||
# stack_tag: Тег стека уведомлений.
|
||||
# summary: Заголовок уведомления.
|
||||
#
|
||||
# and you can override the
|
||||
# background: Цвет фона.
|
||||
# foreground: Цвет текста.
|
||||
# format: Форматирование текста.
|
||||
# frame_color: Цвет рамки.
|
||||
# fullscreen: Поведение при полноэкранных приложениях.
|
||||
# new_icon: Новая иконка.
|
||||
# set_stack_tag: Установка тега стека.
|
||||
# set_transient: Установка временного уведомления.
|
||||
# set_category: Установка категории.
|
||||
# timeout: Время отображения уведомления.
|
||||
# urgency: Срочность.
|
||||
# skip_display: Пропуск отображения.
|
||||
# history_ignore: Игнорирование истории.
|
||||
# action_name: Имя действия.
|
||||
# word_wrap: Перенос слов.
|
||||
# ellipsize: Укорачивание текста.
|
||||
# alignment: Выравнивание текста.
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# skip_display = true
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
#[stack-volumes]
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
# vim: ft=cfg
|
||||
80
modules/home-manager/wm/lockscreen.nix
Normal file
80
modules/home-manager/wm/lockscreen.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# Есть разные варианты блокировки дисплея. Надо выбрать один
|
||||
# - i3lock и разные бафы для него (https://i3wm.org/i3lock/)
|
||||
# В стоке должен нормально работать. Со скриптами на визуал лагает и имеет кд секунды три
|
||||
# - betterlockscreen (https://github.com/betterlockscreen/betterlockscreen/)
|
||||
# Бафнутый i3lock без лагов
|
||||
# - slock (https://tools.suckless.org/slock/)
|
||||
# Suckless soft. Simple X display locker. Минимализм
|
||||
|
||||
# Есть разные варианты автоматической блокировки дисплея. Требуют блокировщик, сами им не являются
|
||||
# - xautolock (https://linux.die.net/man/1/xautolock)
|
||||
# Утилита для автоматической блокировки экрана через определенный промежуток времени бездействия.
|
||||
# - xidlehook (https://github.com/jD91mZM2/xidlehook)
|
||||
# Утилита для выполнения команд или скриптов в зависимости от времени бездействия пользователя.
|
||||
|
||||
|
||||
############################################
|
||||
## Вариант 1. Используем betterlockscreen ##
|
||||
############################################
|
||||
|
||||
# Чтоб задать изображение для локскрина, надо написать это:
|
||||
# betterlockscreen -u путь
|
||||
# Путь может быть до изображения или каталога. Если каталог, то рандомит картинку
|
||||
# betterlockscreen --lock (или -l) блокирует экран и применяет указанные фильтры для картинки
|
||||
|
||||
# {
|
||||
# services.betterlockscreen = {
|
||||
# enable = true;
|
||||
# inactiveInterval = 10; # Value used for {option}services.screen-locker.inactiveInterval.
|
||||
# arguments = [ # List of arguments appended to ./betterlockscreen --lock [args]
|
||||
# "dimblur"
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
|
||||
################################################################
|
||||
## Вариант 2. Используем betterlockscreen через другой сервис ##
|
||||
################################################################
|
||||
|
||||
# { pkgs, ... }: {
|
||||
# services.screen-locker = {
|
||||
# enable = true;
|
||||
|
||||
# # Inactive time interval in minutes after which session will be locked.
|
||||
# # The minimum is 1 minute, and the maximum is 1 hour.
|
||||
# # If {option}xautolock.enable is true, it will use this setting.
|
||||
# # Otherwise, this will be used with {command}xset to configure the X server's screensaver timeout.
|
||||
# inactiveInterval = 10;
|
||||
|
||||
# # Команда для запуска локсрина. Тут "-c 000000" это чёрный цвет фона
|
||||
# lockCmd = "${pkgs.betterlockscreen}/bin/betterlockscreen -l dimblur";
|
||||
# };
|
||||
# }
|
||||
|
||||
########################################################################
|
||||
## Вариант 3. Используем betterlockscreen через продвинутый xidlehook ##
|
||||
########################################################################
|
||||
|
||||
# { pkgs, ... }: {
|
||||
# services.xidlehook = {
|
||||
# enable = true;
|
||||
# not-when-audio = true;
|
||||
# not-when-fullscreen = true;
|
||||
# timers = [
|
||||
# {
|
||||
# delay = 600;
|
||||
# command = "${pkgs.betterlockscreen}/bin/betterlockscreen -l dimblur";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
|
||||
###################################################################################
|
||||
## Вариант 4. Просто скачать betterlockscreen. Без автолока. Чтоб с биндом юзать ##
|
||||
###################################################################################
|
||||
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
betterlockscreen
|
||||
];
|
||||
}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
{ # Статус бар внизу
|
||||
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ # Запускатор софта и не только
|
||||
|
||||
}
|
||||
46
modules/home-manager/wm/rofi/rofi.nix
Normal file
46
modules/home-manager/wm/rofi/rofi.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Много готовых дизайнов для rofi https://github.com/adi1090x/rofi
|
||||
# Там разделены launchers и applets. Я не сразу понял в чём разница
|
||||
# Launchers просто запускает приложение и ничего больше
|
||||
# Applets это кнопка, которой задаёшь своё имя и скрипт, который будет выполнен при нажатии
|
||||
# Через applets можно запускать скрипты, проги от рута или отображать информацию по типу заряда акума
|
||||
# Описание и генератор стилей https://comfoxx.github.io/rofi-old-generator/old.html
|
||||
# Полезная инфа https://wiki.archlinux.org/title/Rofi
|
||||
# Готовые скрипты https://github.com/davatorium/rofi/wiki/User-scripts
|
||||
|
||||
{ pkgs, ... }: { # Запускатор софта и не только
|
||||
programs.rofi = { # https://github.com/davatorium/rofi
|
||||
enable = true;
|
||||
font = "JetBrainsMono Nerd Font 10";
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty"; # Path to the terminal which will be used to run console applications
|
||||
location = "center"; # The location rofi appears on the screen.
|
||||
# cycle = true; # Whether to cycle through the results list.
|
||||
|
||||
pass = { # https://github.com/carnager/rofi-pass
|
||||
enable = true;
|
||||
# stores = []; # Directory roots of your password-stores.
|
||||
# extraConfig = ''
|
||||
# https://github.com/carnager/rofi-pass/blob/master/config.example
|
||||
# '';
|
||||
};
|
||||
|
||||
plugins = with pkgs; [
|
||||
rofi-calc # https://github.com/svenstaro/rofi-calc
|
||||
rofi-power-menu # https://github.com/jluttine/rofi-power-menu
|
||||
# rofi-bluetooth # https://github.com/nickclyde/rofi-bluetooth
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
# Заменил на greenclip, который включается как сервис в packages.nix
|
||||
# services.clipmenu = { # https://github.com/cdown/clipmenu
|
||||
# enable = true;
|
||||
# launcher = "rofi";
|
||||
# };
|
||||
|
||||
# home.file = {
|
||||
# ".config/rofi".source = "config.rasi";
|
||||
# };
|
||||
}
|
||||
|
|
@ -1,3 +1,65 @@
|
|||
{ # Бинды системы
|
||||
{ pkgs, ... }: let
|
||||
mainTerminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
secondTerminal = "${pkgs.kitty}/bin/kitty";
|
||||
in {
|
||||
services.sxhkd = { # Бинды системы
|
||||
enable = true;
|
||||
|
||||
}
|
||||
keybindings = {
|
||||
# bspwm
|
||||
"super + q" = "oa";
|
||||
|
||||
# rofi
|
||||
|
||||
# applications
|
||||
|
||||
# terminal
|
||||
"super + t" = mainTerminal;
|
||||
"super ctrl + t" = secondTerminal;
|
||||
# "super + shift + t" = mainTerminal; # Floating в центре экрана треть на треть или пиксели задать
|
||||
# "super + shift + ctrl + t" = secondTerminal; # Floating в центре экрана треть на треть или пиксели задать
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# | Бинд | Описание |
|
||||
# | ------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
# | `Print` | Выделить область |
|
||||
# | `Print + Alt` | Все мониторы целиком |
|
||||
# | `Print + Ctrl` | Активный монитор |
|
||||
# | `Print + Shift` | Активное окно |
|
||||
# | `Win + A` | Applications. Запускатор приложений. Rofi |
|
||||
# | `Win + B` | Browser LibreWolf. Основа |
|
||||
# | `Win + Shift + B` | Browser Firefox. Паблик активность |
|
||||
# | `Win + Shift + Ctrl + B` | Browser Chromium. Пусть будет |
|
||||
# | `Win + C` | Calculator имбовый. Можно даже написать `5600 USD to BTC` или `500 + 25%`. Через rofi |
|
||||
# | `Win + Shift + C` | Color picker. Получить hex в буфер обмена |
|
||||
# | `Win + Ctrl + C` | Color picker. Получить rgb в буфер обмена |
|
||||
# | `Win + ЛКМ` | Переместить окно |
|
||||
# | `Win + ПКМ` | Ресайзить окно |
|
||||
# | `Win + scroll` | Скролишь колесо вверх = -1 воркспейс. Если вниз, то +1 |
|
||||
# | `Win + 0-9/F1-F12` | Переключать воркспейсы с 1 по 22 |
|
||||
# | `Win + Shift + 0-9/F1-F12` | Перекинуть активное окно на воркспейс с 1 по 22. Желательно silent, чтоб меня не перекидывало к проге |
|
||||
# | `Win + arrow` | Менять фокус приложения через вин + стрелки |
|
||||
# | `Win + Ctrl + left/right` | Переключает активные воркспейсы на мониторе. На левом 1 и 3, на правом 2 и 4. С 1 он делает +1 не на 2, а на 3 |
|
||||
# | `Win + Ctrl + Down` | Переключиться на первый пустой воркспейс |
|
||||
# | `Win + Shift + arrows` | Resize windows на 30 пикселей |
|
||||
# | `Win + Shift + Ctrl + arrows` | Перемещает активное окно в указанном направлении |
|
||||
# | `Win + Ctrl + Alt + left/right` | Как без альта, но не просто переключает, а перекидывает туда активное окно |
|
||||
# | `Win + Enter` | Fullscreen toggle. Думал на F сделать, но не с моей раскладкой. Мб Alt + Enter |
|
||||
# | `Win + Esc` | Прошлый воркспейс |
|
||||
# | `Win + L` (мб с шифтом) | Lock screen |
|
||||
# | `Win + P` | Passwords. Для утилиты pass всплывающее меню через rofi |
|
||||
# | `Win + Q` | Quit. Офнуть приложение. Хз надо ли Alt + F4 добавлять |
|
||||
# | `Win + V` | История буферa обмена (rofi) |
|
||||
# | `Win + Alt + T` | Timer. Думаю через rofi сделать и утилиту timer |
|
||||
# | `Win + I` | `I`DE? text `E`ditor? `N`ixVim? |
|
||||
# | `Win + E` | `F`ile manager? `E`xplorer? |
|
||||
# | `Win + F` | Toggle `f`loating. На f? сука не удобно на моей клаве |
|
||||
# | Win + хз | Меняет позиционирование с горизонтального на вертикальный и обратно. Сейчас на `J`. Мб на `S`, от слова toggle split |
|
||||
# | `Win + N` | `O`bsidian? `N`ote taking app? |
|
||||
# | Win + хз | `T`odo. `T`ask tracker. Сука всё на Т, но не вариант. Либо с шифтом, либо придумать что-то типо `Z`адачи :D |
|
||||
# | `Win + Backspace` | Launch logout menu. Через rofi |
|
||||
# | `Ctrl + Shift + Esc` | Launch system monitor (btop) |
|
||||
# | `Win + Tab` | Window switcher (rofi). Выбирать окно, а на нужный воркспейс само перекинет. Мб сделать alt+tab? |
|
||||
# | `CapsLock` | Switch keyboard layout |
|
||||
|
|
|
|||
|
|
@ -10,10 +10,11 @@
|
|||
};
|
||||
|
||||
networking = {
|
||||
# enableIPv6 = false;
|
||||
networkmanager.enable = true;
|
||||
hostName = "nixos";
|
||||
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
services.blueman.enable = true; # Tray for bluetooth
|
||||
}
|
||||
|
|
@ -14,7 +14,8 @@
|
|||
extraConfig.pipewire = {
|
||||
"10-clock-rate" = {
|
||||
context.properties = {
|
||||
default.clock.rate = 48000; # Ниже измени под свой пк. У меня цап поддерживает всё это
|
||||
default.clock.rate = 48000;
|
||||
# Ниже измени под свой пк. У меня цап поддерживает всё это. Можешь оставить только 48000, если не знаешь что ставить
|
||||
default.clock.allowed-rates = [ 44100 48000 88200 96000 176400 192000 352800 384000 705600 768000 ];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ in {
|
|||
inputs.home-manager.nixosModules.default
|
||||
../modules/nixos/bundle.nix
|
||||
./packages.nix
|
||||
# ./filesystems.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
|
|
@ -30,7 +31,7 @@ in {
|
|||
users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = username;
|
||||
extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" ];
|
||||
extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" "storage" "docker" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
9
nixos/filesystems.nix
Normal file
9
nixos/filesystems.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
fileSystems = {
|
||||
"/mnt/backups" = {
|
||||
device = "/dev/disk/by-uuid/55287544-ce9f-4c93-a2f6-a63b69623fe1";
|
||||
fsType = "ext4";
|
||||
options = [ "defaults" "noatime" ]; #"uid=1000" "gid=1000" "dmask=007" "fmask=117" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
services = {
|
||||
gvfs.enable = true; # Mount, trash, and other functionalities for Thunar file manager
|
||||
tumbler.enable = true; # Thumbnail support for Thunar file manager
|
||||
greenclip.enable = true; # Clipboard manager. https://github.com/erebe/greenclip
|
||||
openssh.enable = true; # Потом удали. Это ставится на виртуалку, чтоб к ней конект по ssh работал.
|
||||
spice-vdagentd.enable = true; # Общий буфер обмена с виртуалкой
|
||||
#fstrim.enable = true; # Чистит ssd для норм производительности. Пока не пользуюсь
|
||||
|
|
@ -34,7 +35,15 @@
|
|||
go
|
||||
rustup
|
||||
|
||||
# Надо
|
||||
# Архивы
|
||||
zip # Архивировать
|
||||
unzip # Разархивировать
|
||||
unrar # Разархивировать
|
||||
gnutar # Для .tar?
|
||||
_7zz # Это пакет для 7z?
|
||||
bzip2 # .bz2 архивы
|
||||
|
||||
# Разное для терминала
|
||||
wget
|
||||
curl
|
||||
git
|
||||
|
|
@ -42,29 +51,30 @@
|
|||
xclip # Для работы буфера обмена
|
||||
ffmpeg_7 # Обработка видео. Нужен всегда и везде
|
||||
imagemagick # Обработка изображений. Мб тоже нужен всегда
|
||||
|
||||
# Архивы
|
||||
zip # Архивировать
|
||||
unzip # Разархивировать
|
||||
unrar # Разархивировать
|
||||
gnutar # Для .tar?
|
||||
_7zz # Это пакет для 7z?
|
||||
|
||||
# Разное для терминала
|
||||
tree # Структура файлов в терминале
|
||||
gnugrep # Поиск в терминале
|
||||
gawk # Обработка и анализ текста в терминале
|
||||
rsync # Синхронизация файлов
|
||||
bat # A cat(1) clone with syntax highlighting and Git integration.
|
||||
xorg.xwininfo # Для команды xprop?
|
||||
xorg.xrandr # Для команды xrandr
|
||||
xdg-utils # Set of command line tools that assist applications with a variety of desktop integration tasks
|
||||
feh # Смотреть изображения. Вроде нужен в большом количестве софта как зависимость
|
||||
playerctl # Command-line utility and library for controlling media players that implement MPRIS
|
||||
xdotool # Fake keyboard/mouse input, window management, and more. Автоматизация
|
||||
|
||||
|
||||
pass # Менеджер паролей в терминале
|
||||
btop # Монитор ресурсов в терминале
|
||||
yt-dlp # Скачивать и смотреть медиа с разных сайтов
|
||||
tasktimer # TUI task timer. Можно несколько таймеров с описанием запустить
|
||||
timer # A "sleep" with progress. Таймер на пельмени "timer 5m"
|
||||
|
||||
libqalculate # Advanced calculator library
|
||||
fastfetch # Пишешь в теримнал и кидаешь всем со словами I use nixos btw
|
||||
|
||||
alacritty # Минималистичный терминал. Основной у меня
|
||||
kitty # Самый быстрый протокол отображения медиа, но ssh через жопу работает
|
||||
|
||||
# GUI
|
||||
nekoray # VPN # TODO: Настройки надо сделать декларативными
|
||||
ksnip # Скрины. Аналоги - Flameshot # TODO: Настройки надо сделать декларативными
|
||||
|
|
@ -72,6 +82,13 @@
|
|||
qbittorrent # Торренты качать
|
||||
thunderbird # Почтовый клиент для своей почты
|
||||
opentabletdriver # Дрова на графический планшет # TODO: Настройки надо сделать декларативными?
|
||||
screenkey # A screencast tool to display your keys
|
||||
pavucontrol # PulseAudio Volume Control
|
||||
# pwvucontrol # Pipewire Volume Control (Не знаю может ли полностью заменить pavucontrol)
|
||||
networkmanagerapplet # Tray for network manager
|
||||
brightnessctl # Brightness control for laptop
|
||||
gcolor3 # GUI color picker
|
||||
xcolor # CLI color picker https://github.com/Soft/xcolor
|
||||
|
||||
# Browsers
|
||||
librewolf
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue