mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-08 09:24:17 +01:00
Split more configs into separate modules
This commit is contained in:
parent
70d7091d17
commit
537357307e
25
home-manager/dunst/default.nix
Normal file
25
home-manager/dunst/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
geometry = "1870x5-25+45";
|
||||
width = 350;
|
||||
separator_height = 5;
|
||||
padding = 24;
|
||||
horizontal_padding = 24;
|
||||
frame_width = 3;
|
||||
idle_threshold = 120;
|
||||
alignment = "center";
|
||||
word_wrap = "yes";
|
||||
transparency = 5;
|
||||
format = "<b>%s</b>: %b";
|
||||
markup = "full";
|
||||
min_icon_size = 128;
|
||||
max_icon_size = 128;
|
||||
};
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
30
home-manager/editorconfig/default.nix
Normal file
30
home-manager/editorconfig/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"*" = {
|
||||
charset = "utf-8";
|
||||
end_of_line = "lf";
|
||||
insert_final_newline = true;
|
||||
indent_size = 2;
|
||||
indent_style = "space";
|
||||
trim_trailing_whitespace = true;
|
||||
};
|
||||
"*.md" = { indent_style = "tab"; };
|
||||
"Makefile" = {
|
||||
indent_style = "tab";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.html" = {
|
||||
indent_style = "tab";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.go" = {
|
||||
indent_style = "tab";
|
||||
indent_size = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
75
home-manager/feh/default.nix
Normal file
75
home-manager/feh/default.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.feh = {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
toggle_actions = null;
|
||||
toggle_aliasing = null;
|
||||
toggle_caption = null;
|
||||
toggle_filenames = "d";
|
||||
toggle_exif = null;
|
||||
save_filelist = null;
|
||||
toggle_fixed_geometry = "g";
|
||||
toggle_pause = "h";
|
||||
toggle_info = null;
|
||||
toggle_keep_vp = null;
|
||||
toggle_menu = null;
|
||||
next_img = [ "k" "Right" ];
|
||||
toggle_pointer = "a";
|
||||
prev_img = [ "j" "Left" ];
|
||||
quit = "q";
|
||||
reload_image = null;
|
||||
save_image = null;
|
||||
toggle_fullscreen = "f";
|
||||
size_to_image = "w";
|
||||
close = null;
|
||||
jump_random = "z";
|
||||
prev_dir = null;
|
||||
next_dir = null;
|
||||
orient_3 = null;
|
||||
orient_1 = null;
|
||||
flip = null;
|
||||
mirror = null;
|
||||
action_0 = null;
|
||||
action_1 = null;
|
||||
action_2 = null;
|
||||
action_3 = null;
|
||||
action_4 = null;
|
||||
action_5 = null;
|
||||
action_6 = null;
|
||||
action_7 = null;
|
||||
action_8 = null;
|
||||
action_9 = null;
|
||||
jump_first = "J";
|
||||
jump_last = "K";
|
||||
jump_fwd = "H";
|
||||
jump_back = "L";
|
||||
reload_plus = null;
|
||||
reload_minus = null;
|
||||
remove = null;
|
||||
delete = null;
|
||||
scroll_left = "b";
|
||||
scroll_right = "n";
|
||||
scroll_up = [ "u" "Up" ];
|
||||
scroll_down = [ "d" "Down" ];
|
||||
scroll_left_page = null;
|
||||
scroll_right_page = null;
|
||||
scroll_up_page = null;
|
||||
scroll_down_page = null;
|
||||
render = null;
|
||||
zoom_in = "h";
|
||||
zoom_out = "l";
|
||||
zoom_default = "o";
|
||||
zoom_fit = null;
|
||||
zoom_fill = "p";
|
||||
menu_close = null;
|
||||
menu_up = null;
|
||||
menu_down = null;
|
||||
menu_parent = null;
|
||||
menu_child = null;
|
||||
menu_select = null;
|
||||
toggle_auto_zoom = "m";
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
43
home-manager/git/default.nix
Normal file
43
home-manager/git/default.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
include = { path = "~/.gituser"; };
|
||||
commit = { gpgsign = true; };
|
||||
core = {
|
||||
editor = "nvim";
|
||||
autocrlf = false;
|
||||
quotePath = false;
|
||||
};
|
||||
web = { browser = "librewolf"; };
|
||||
push = { default = "simple"; };
|
||||
branch = { autosetuprebase = "always"; };
|
||||
init = { defaultBranch = "master"; };
|
||||
rerere = { enabled = true; };
|
||||
color = { ui = true; };
|
||||
alias = {
|
||||
contrib = "shortlog -n -s";
|
||||
remotes = "remote -v";
|
||||
praise = "blame";
|
||||
verify = "log --show-signature";
|
||||
};
|
||||
"color \"diff-highlight\"" = {
|
||||
oldNormal = "red bold";
|
||||
oldHighlight = "red bold";
|
||||
newNormal = "green bold";
|
||||
newHighlight = "green bold";
|
||||
};
|
||||
"color \"diff\"" = {
|
||||
meta = "yellow";
|
||||
frag = "magenta bold";
|
||||
commit = "yellow bold";
|
||||
old = "red bold";
|
||||
new = "green bold";
|
||||
whitespace = "red reverse";
|
||||
};
|
||||
};
|
||||
diff-so-fancy = { enable = true; };
|
||||
};
|
||||
}];
|
||||
}
|
25
home-manager/gtk/default.nix
Normal file
25
home-manager/gtk/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.phinger-cursors;
|
||||
name = "phinger-cursors";
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-decoration-layout = "menu:";
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintfull";
|
||||
gtk-xft-rgba = "rgb";
|
||||
gtk-recent-files-enabled = false;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.fluent-icon-theme;
|
||||
name = "Fluent-dark";
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
26
home-manager/kitty/default.nix
Normal file
26
home-manager/kitty/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enable_audio_bell = false;
|
||||
allow_remote_control = true;
|
||||
dynamic_background_opacity = true;
|
||||
background_opacity = "0.95";
|
||||
close_on_child_death = true;
|
||||
cursor_blink_interval = 0;
|
||||
wayland_titlebar_color = "background";
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
open_url_with = "librewolf";
|
||||
window_padding_width = 5;
|
||||
tab_bar_margin_width = 5;
|
||||
};
|
||||
};
|
||||
xdg.configFile."kitty/diff.conf".text = ''
|
||||
map d scroll_to next-page
|
||||
map u scroll_to prev-page
|
||||
map g scroll_to start
|
||||
map G scroll_to end
|
||||
'';
|
||||
}];
|
||||
}
|
34
home-manager/mpv/default.nix
Normal file
34
home-manager/mpv/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
screenshot-format = "png";
|
||||
profile = "gpu-hq";
|
||||
scale = "ewa_lanczossharp";
|
||||
cscale = "ewa_lanczossharp";
|
||||
video-sync = "display-resample";
|
||||
interpolation = true;
|
||||
tscale = "oversample";
|
||||
sub-auto = "fuzzy";
|
||||
sub-font = "Noto Sans CJK JP Medium";
|
||||
sub-blur = 10;
|
||||
sub-file-paths = "subs:subtitles:字幕";
|
||||
fullscreen = "yes";
|
||||
title = "\${filename} - mpv";
|
||||
script-opts =
|
||||
"osc-title=\${filename},osc-boxalpha=150,osc-showfullscreen=no,osc-boxvideo=yes";
|
||||
osc = "no";
|
||||
osd-on-seek = "no";
|
||||
osd-bar = "no";
|
||||
osd-bar-w = 30;
|
||||
osd-bar-h = "0.2";
|
||||
osd-duration = 750;
|
||||
really-quiet = "yes";
|
||||
};
|
||||
scripts = [ pkgs.mpvScripts.thumbnail ];
|
||||
};
|
||||
}];
|
||||
}
|
46
home-manager/ncmpcpp/default.nix
Normal file
46
home-manager/ncmpcpp/default.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
bindings = [
|
||||
{ key = "mouse"; command = "dummy"; }
|
||||
{ key = "h"; command = ["previous_column" "jump_to_parent_directory"]; }
|
||||
{ key = "j"; command = "scroll_down"; }
|
||||
{ key = "k"; command = "scroll_up"; }
|
||||
{ key = "l"; command = [ "next_column" "enter_directory" "play_item"]; }
|
||||
{ key = "H"; command = [ "select_item" "scroll_down"]; }
|
||||
{ key = "J"; command = ["move_sort_order_down" "move_selected_items_down"]; }
|
||||
{ key = "K"; command = ["move_sort_order_up" "move_selected_items_up"]; }
|
||||
{ key = "L"; command = [ "select_item" "scroll_up"]; }
|
||||
{ key = "'"; command = "remove_selection"; }
|
||||
{ key = "ctrl-u"; command = "page_up"; }
|
||||
{ key = "ctrl-d"; command = "page_down"; }
|
||||
{ key = "u"; command = "page_up"; }
|
||||
{ key = "d"; command = "page_down"; }
|
||||
{ key = "n"; command = "next_found_item"; }
|
||||
{ key = "N"; command = "previous_found_item"; }
|
||||
{ key = "t"; command = "next_screen"; }
|
||||
{ key = "g"; command = "move_home"; }
|
||||
{ key = "G"; command = "move_end"; }
|
||||
{ key = "w"; command = "next"; }
|
||||
{ key = "b"; command = "previous"; }
|
||||
{ key = ";"; command = "seek_forward"; }
|
||||
{ key = ","; command = "seek_backward"; }
|
||||
{ key = "f"; command = "apply_filter"; }
|
||||
{ key = "i"; command = "select_item"; }
|
||||
{ key = "x"; command = [ "delete_playlist_items" "delete_browser_items" "delete_stored_playlist" ]; }
|
||||
{ key = "U"; command = "update_database"; }
|
||||
{ key = "m"; command = "add_random_items"; }
|
||||
];
|
||||
settings = {
|
||||
ncmpcpp_directory = "~/.config/ncmpcpp";
|
||||
user_interface = "alternative";
|
||||
autocenter_mode = "yes";
|
||||
allow_for_physical_item_deletion = "no";
|
||||
mouse_support = "no";
|
||||
execute_on_song_change = "~/.config/mpd/mpdnotify";
|
||||
mpd_crossfade_time = 3;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
168
home-manager/qutebrowser/default.nix
Normal file
168
home-manager/qutebrowser/default.nix
Normal file
@ -0,0 +1,168 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
package = pkgs.qutebrowser-qt6;
|
||||
extraConfig = ''
|
||||
# Mute tabs by default
|
||||
from qutebrowser.mainwindow import tabwidget
|
||||
tabwidget.TabWidget.MUTE_STRING = ""
|
||||
tabwidget.TabWidget.AUDIBLE_STRING = "[A]"
|
||||
|
||||
# Don't close while browsing / downloading
|
||||
c.confirm_quit = ['multiple-tabs', 'downloads']
|
||||
|
||||
# Restore previous tabs
|
||||
c.session.lazy_restore = True
|
||||
|
||||
# Use ranger as the file selector
|
||||
c.fileselect.handler = 'external'
|
||||
c.fileselect.folder.command = ['kitty', '-e', 'ranger', '--choosedir={}']
|
||||
c.fileselect.multiple_files.command = ['kitty', '-e', 'ranger', '--choosefiles={}']
|
||||
c.fileselect.single_file.command = ['kitty', '-e', 'ranger', '--choosefile={}']
|
||||
|
||||
# Better context menu colors
|
||||
c.colors.contextmenu.disabled.fg = '#808080'
|
||||
c.colors.contextmenu.menu.bg = '#353535'
|
||||
c.colors.contextmenu.menu.fg = '#ffffff'
|
||||
c.colors.contextmenu.selected.bg = '#909090'
|
||||
|
||||
# Use spellcheck
|
||||
c.spellcheck.languages = ["en-US"]
|
||||
|
||||
# Chromium flags
|
||||
c.qt.args = ["disable-backing-store-limit", "enable-accelerated-video-decode", "disable-gpu-driver-bug-workarounds"]
|
||||
c.qt.chromium.low_end_device_mode = 'never'
|
||||
|
||||
# Make new tab position more sane
|
||||
c.tabs.new_position.unrelated = 'next'
|
||||
|
||||
# Download settings
|
||||
c.downloads.location.directory = "$HOME/Downloads"
|
||||
c.downloads.location.prompt = False
|
||||
c.downloads.position = "bottom"
|
||||
c.downloads.remove_finished = 5000
|
||||
|
||||
# Only show tabs when multiple are open
|
||||
c.tabs.show = "multiple"
|
||||
|
||||
# Don't switch tabs with mouse
|
||||
c.tabs.mousewheel_switching = False
|
||||
|
||||
# Edit text with neovim
|
||||
c.editor.command = ['kitty', '-e', 'nvim', '{}']
|
||||
|
||||
# Use J/K for prev/next
|
||||
config.bind('J', 'tab-prev')
|
||||
config.bind('K', 'tab-next')
|
||||
|
||||
# Use F12 for devtools
|
||||
config.bind('<F12>', 'devtools')
|
||||
|
||||
# Use zb to delete bookmarks
|
||||
config.bind('zb', 'bookmark-del')
|
||||
|
||||
# Increase the default scroll offset of j/k
|
||||
# NOTE: Unfortunately this breaks websites that use their own keybinds for j/k/etc
|
||||
# config.bind('j', 'run-with-count 5 scroll down')
|
||||
# config.bind('k', 'run-with-count 5 scroll up')
|
||||
|
||||
# NOTE: Use with smooth smooth scrolling enabled to scroll smoothly
|
||||
# config.bind('d', 'run-with-count 12 scroll down')
|
||||
# config.bind('u', 'run-with-count 12 scroll up')
|
||||
|
||||
# Use d/u to scroll down/up
|
||||
config.bind('d', 'scroll-page 0 0.5')
|
||||
config.bind('u', 'scroll-page 0 -0.5')
|
||||
config.bind('D', 'scroll-page 0 0.5')
|
||||
config.bind('U', 'scroll-page 0 -0.5')
|
||||
|
||||
# Use alt+left/right to go back/forward
|
||||
config.bind('<Alt+Left>', 'back')
|
||||
config.bind('<Alt+Right>', 'forward')
|
||||
|
||||
# Use x to close tabs and X to undo
|
||||
config.bind('x', 'tab-close')
|
||||
config.bind('X', 'undo')
|
||||
|
||||
# Toggle tab visibility for more screen space
|
||||
config.bind('st', 'config-cycle tabs.show multiple switching')
|
||||
|
||||
# Easily change the position of tabs
|
||||
config.bind('sTh', 'set tabs.position left')
|
||||
config.bind('sTj', 'set tabs.position bottom')
|
||||
config.bind('sTk', 'set tabs.position top')
|
||||
config.bind('sTl', 'set tabs.position right')
|
||||
|
||||
# Don't paste something by accident
|
||||
config.unbind('pp', mode='normal')
|
||||
config.unbind('pP', mode='normal')
|
||||
config.unbind('Pp', mode='normal')
|
||||
config.unbind('PP', mode='normal')
|
||||
config.unbind('wp', mode='normal')
|
||||
config.unbind('wP', mode='normal')
|
||||
|
||||
# Easily enter account information
|
||||
# NOTE: I re-evaluated pass when I was focusing on a terminal-centric workflow.
|
||||
config.bind('zl', 'spawn --userscript qute-pass')
|
||||
config.bind('zpl', 'spawn --userscript qute-pass --password-only')
|
||||
config.bind('zol', 'spawn --userscript qute-pass --otp-only')
|
||||
|
||||
# Support previous/next tab with traditional keybinds
|
||||
config.bind('<Ctrl+Shift+Tab>', 'tab-prev')
|
||||
config.bind('<Ctrl+Tab>', 'tab-next')
|
||||
|
||||
# Hide the status bar except under exceptional circumstances
|
||||
# NOTE: This broke more things than not, which is why I ultimately decided
|
||||
# to always use the status bar. More information can be found in the
|
||||
# following discussion: https://github.com/qutebrowser/qutebrowser/issues/2236
|
||||
# config.bind('o', 'set statusbar.show always;; set-cmd-text -s :open')
|
||||
# config.bind('O', 'set statusbar.show always;; set-cmd-text -s :open -t')
|
||||
# config.bind('T', 'set statusbar.show always;; set-cmd-text -sr :tab-focus')
|
||||
# config.bind(':', 'set statusbar.show always;; set-cmd-text :')
|
||||
# config.bind('/', 'set statusbar.show always;; set-cmd-text /')
|
||||
# config.bind('<Escape>', 'mode-enter normal;; set statusbar.show in-mode', mode='command')
|
||||
# config.bind('<Return>', 'command-accept;; set statusbar.show in-mode', mode='command')
|
||||
|
||||
# Easily start a new temporary container
|
||||
config.bind(';s', 'hint links spawn ~/.local/bin/tmp {hint-url}')
|
||||
|
||||
# Open the current tab / selected link in mpv
|
||||
config.bind('zM', 'spawn mpv --force-window=immediate {url}')
|
||||
config.bind('zm', 'hint links spawn mpv --force-window=immediate {hint-url}')
|
||||
|
||||
# Automatically mute tabs
|
||||
c.content.mute = True
|
||||
|
||||
# Use proxy websites for popular services
|
||||
config.bind('zu', 'hint links spawn -u untrack-url -O {hint-url}')
|
||||
|
||||
# Enable expected permissions to avoid websites asking every time
|
||||
c.content.persistent_storage = True
|
||||
c.content.notifications.enabled = True
|
||||
c.content.register_protocol_handler = True
|
||||
|
||||
# Hide the window title bar on GNOME
|
||||
# NOTE: This is no longer necessary since GNOME has an extension called
|
||||
# pixel-saver that # automatically handles this for us, and without
|
||||
# the downsides of not having a window bar.
|
||||
# c.window.hide_decoration = True
|
||||
|
||||
# Close qutebrowser when there are no tabs left
|
||||
c.tabs.last_close = "close"
|
||||
|
||||
# Don't automatically enter/leave insert mode
|
||||
# NOTE: This was originally done to prevent insert mode from prematurely exiting
|
||||
# in certain # cases (such as mouse usage), although keeping auto functionality
|
||||
# seems to be more useful # long-term.
|
||||
c.input.insert_mode.auto_enter = False
|
||||
c.input.insert_mode.auto_leave = False
|
||||
|
||||
# Prioritize Japanese content (en-US is necessary to avoid breaking things)
|
||||
c.content.headers.accept_language = 'ja-JP,en-US'
|
||||
'';
|
||||
};
|
||||
}];
|
||||
}
|
24
home-manager/ranger/default.nix
Normal file
24
home-manager/ranger/default.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
xdg.configFile."ranger/rc.conf".text = ''
|
||||
set line_numbers absolute
|
||||
set padding_right false
|
||||
set vcs_aware true
|
||||
set show_hidden true
|
||||
set confirm_on_delete always
|
||||
set save_console_history false
|
||||
set mouse_enabled false
|
||||
set tilde_in_titlebar true
|
||||
|
||||
alias r rename
|
||||
alias d delete
|
||||
|
||||
map DD shell trash %s
|
||||
|
||||
set use_preview_script true
|
||||
set preview_files true
|
||||
set preview_images true
|
||||
set preview_images_method kitty
|
||||
'';
|
||||
}];
|
||||
}
|
19
home-manager/swaylock/default.nix
Normal file
19
home-manager/swaylock/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.swaylock = {
|
||||
package = pkgs."swaylock-effects";
|
||||
settings = {
|
||||
show-keyboard-layout = true;
|
||||
daemonize = true;
|
||||
effect-blur = "5x2";
|
||||
clock = true;
|
||||
indicator = true;
|
||||
font-size = 25;
|
||||
indicator-radius = 85;
|
||||
indicator-thickness = 16;
|
||||
screenshots = true;
|
||||
fade-in = 1;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
8
home-manager/thunar/default.nix
Normal file
8
home-manager/thunar/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
xdg.configFile."xfce4/helpers.rc".text = ''
|
||||
TerminalEmulator=kitty
|
||||
TerminalEmulatorDismissed=true
|
||||
'';
|
||||
}];
|
||||
}
|
9
home-manager/tig/default.nix
Normal file
9
home-manager/tig/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
xdg.configFile."tig/config".text = ''
|
||||
color cursor black green bold
|
||||
color title-focus black blue bold
|
||||
color title-blur black blue bold
|
||||
'';
|
||||
}];
|
||||
}
|
137
home-manager/waybar/default.nix
Normal file
137
home-manager/waybar/default.nix
Normal file
@ -0,0 +1,137 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
package = hyprland.packages."x86_64-linux".waybar-hyprland;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "left";
|
||||
width = 45;
|
||||
spacing = 8;
|
||||
modules-left = [ "wlr/workspaces" "custom/new-workspace" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right =
|
||||
[ "tray" "wireplumber" "backlight" "battery" "clock" ];
|
||||
"tray" = {
|
||||
"icon-size" = 24;
|
||||
spacing = 8;
|
||||
};
|
||||
"hyprland/window" = {
|
||||
"rotate" = 90;
|
||||
};
|
||||
"wlr/workspaces" = {
|
||||
on-click = "activate";
|
||||
sort-by-number = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "一";
|
||||
"2" = "二";
|
||||
"3" = "三";
|
||||
"4" = "四";
|
||||
"5" = "五";
|
||||
"6" = "六";
|
||||
"7" = "七";
|
||||
"8" = "八";
|
||||
"9" = "九";
|
||||
"10" = "十";
|
||||
};
|
||||
};
|
||||
wireplumber = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "{volume}% {node_name}";
|
||||
format-muted = "";
|
||||
format-icons = ["" ""];
|
||||
};
|
||||
battery = {
|
||||
"format" = "{icon}";
|
||||
"tooltip-format" = "{capacity}% {timeTo}";
|
||||
"format-icons" = ["" "" "" "" ""];
|
||||
};
|
||||
clock = {
|
||||
"format" = "{:%H\n%M}";
|
||||
"tooltip-format" = "<tt>{calendar}</tt>";
|
||||
};
|
||||
backlight = {
|
||||
"format" = "{icon}";
|
||||
"format-icons" = ["" ""];
|
||||
};
|
||||
"custom/new-workspace" = {
|
||||
"format" = "+";
|
||||
"on-click" = "hyprctl dispatch workspace empty && rofi -show drun";
|
||||
"tooltip" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
style = lib.mkForce ''
|
||||
@define-color base00 #272822;
|
||||
@define-color base01 #383830;
|
||||
@define-color base02 #49483e;
|
||||
@define-color base03 #75715e;
|
||||
@define-color base04 #a59f85;
|
||||
@define-color base05 #f8f8f2;
|
||||
@define-color base06 #f5f4f1;
|
||||
@define-color base07 #f9f8f5;
|
||||
@define-color base08 #f92672;
|
||||
@define-color base09 #fd971f;
|
||||
@define-color base0A #f4bf75;
|
||||
@define-color base0B #a6e22e;
|
||||
@define-color base0C #a1efe4;
|
||||
@define-color base0D #66d9ef;
|
||||
@define-color base0E #ae81ff;
|
||||
@define-color base0F #cc6633;
|
||||
|
||||
* {
|
||||
color: @base05;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: alpha(@base00, 0.95);
|
||||
border-right: 1px solid alpha(@base02, 0.67);
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 12px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: alpha(@base02, 0.67);
|
||||
}
|
||||
|
||||
#window {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
tooltip, #tray menu {
|
||||
background: @base00;
|
||||
border: 1px solid alpha(@base09, 0.93);
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#backlight, #battery, #wireplumber {
|
||||
font-family: "Font Awesome 6 Free Solid";
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#custom-new-workspace {
|
||||
font-family: "Font Awesome 6 Free Solid";
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
color: alpha(@base0A, 0.67);
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}];
|
||||
}
|
14
home-manager/zathura/default.nix
Normal file
14
home-manager/zathura/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
home-manager.sharedModules = [{
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
guioptions = "v";
|
||||
adjust-open = "width";
|
||||
statusbar-basename = true;
|
||||
render-loading = false;
|
||||
scroll-step = 120;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
615
home.nix
615
home.nix
@ -206,10 +206,6 @@
|
||||
"Xft.hintstyle" = "hintfull";
|
||||
"Xft.rgba" = "rgb";
|
||||
};
|
||||
xdg.configFile."xfce4/helpers.rc".text = ''
|
||||
TerminalEmulator=kitty
|
||||
TerminalEmulatorDismissed=true
|
||||
'';
|
||||
xdg.configFile."mozc/ibus_config.textproto".force = true;
|
||||
xdg.configFile."mozc/ibus_config.textproto".text = ''
|
||||
engines {
|
||||
@ -222,26 +218,6 @@
|
||||
}
|
||||
active_on_launch: True
|
||||
'';
|
||||
xdg.configFile."ranger/rc.conf".text = ''
|
||||
set line_numbers absolute
|
||||
set padding_right false
|
||||
set vcs_aware true
|
||||
set show_hidden true
|
||||
set confirm_on_delete always
|
||||
set save_console_history false
|
||||
set mouse_enabled false
|
||||
set tilde_in_titlebar true
|
||||
|
||||
alias r rename
|
||||
alias d delete
|
||||
|
||||
map DD shell trash %s
|
||||
|
||||
set use_preview_script true
|
||||
set preview_files true
|
||||
set preview_images true
|
||||
set preview_images_method kitty
|
||||
'';
|
||||
xdg.configFile."fish/config.fish".text = ''
|
||||
set -U fish_greeting ""
|
||||
|
||||
@ -299,344 +275,13 @@
|
||||
# end
|
||||
# end
|
||||
'';
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.phinger-cursors;
|
||||
name = "phinger-cursors";
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-decoration-layout = "menu:";
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintfull";
|
||||
gtk-xft-rgba = "rgb";
|
||||
gtk-recent-files-enabled = false;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.fluent-icon-theme;
|
||||
name = "Fluent-dark";
|
||||
};
|
||||
};
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enable_audio_bell = false;
|
||||
allow_remote_control = true;
|
||||
dynamic_background_opacity = true;
|
||||
background_opacity = "0.95";
|
||||
close_on_child_death = true;
|
||||
cursor_blink_interval = 0;
|
||||
wayland_titlebar_color = "background";
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
open_url_with = "librewolf";
|
||||
window_padding_width = 5;
|
||||
tab_bar_margin_width = 5;
|
||||
};
|
||||
};
|
||||
xdg.configFile."kitty/diff.conf".text = ''
|
||||
map d scroll_to next-page
|
||||
map u scroll_to prev-page
|
||||
map g scroll_to start
|
||||
map G scroll_to end
|
||||
'';
|
||||
programs.bat = { enable = true; };
|
||||
programs.swaylock = {
|
||||
package = pkgs."swaylock-effects";
|
||||
settings = {
|
||||
show-keyboard-layout = true;
|
||||
daemonize = true;
|
||||
effect-blur = "5x2";
|
||||
clock = true;
|
||||
indicator = true;
|
||||
font-size = 25;
|
||||
indicator-radius = 85;
|
||||
indicator-thickness = 16;
|
||||
screenshots = true;
|
||||
fade-in = 1;
|
||||
};
|
||||
};
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
geometry = "1870x5-25+45";
|
||||
width = 350;
|
||||
separator_height = 5;
|
||||
padding = 24;
|
||||
horizontal_padding = 24;
|
||||
frame_width = 3;
|
||||
idle_threshold = 120;
|
||||
alignment = "center";
|
||||
word_wrap = "yes";
|
||||
transparency = 5;
|
||||
format = "<b>%s</b>: %b";
|
||||
markup = "full";
|
||||
min_icon_size = 128;
|
||||
max_icon_size = 128;
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
package = hyprland.packages."x86_64-linux".waybar-hyprland;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "left";
|
||||
width = 45;
|
||||
spacing = 8;
|
||||
modules-left = [ "wlr/workspaces" "custom/new-workspace" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right =
|
||||
[ "tray" "wireplumber" "backlight" "battery" "clock" ];
|
||||
"tray" = {
|
||||
"icon-size" = 24;
|
||||
spacing = 8;
|
||||
};
|
||||
"hyprland/window" = {
|
||||
"rotate" = 90;
|
||||
};
|
||||
"wlr/workspaces" = {
|
||||
on-click = "activate";
|
||||
sort-by-number = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "一";
|
||||
"2" = "二";
|
||||
"3" = "三";
|
||||
"4" = "四";
|
||||
"5" = "五";
|
||||
"6" = "六";
|
||||
"7" = "七";
|
||||
"8" = "八";
|
||||
"9" = "九";
|
||||
"10" = "十";
|
||||
};
|
||||
};
|
||||
wireplumber = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "{volume}% {node_name}";
|
||||
format-muted = "";
|
||||
format-icons = ["" ""];
|
||||
};
|
||||
battery = {
|
||||
"format" = "{icon}";
|
||||
"tooltip-format" = "{capacity}% {timeTo}";
|
||||
"format-icons" = ["" "" "" "" ""];
|
||||
};
|
||||
clock = {
|
||||
"format" = "{:%H\n%M}";
|
||||
"tooltip-format" = "<tt>{calendar}</tt>";
|
||||
};
|
||||
backlight = {
|
||||
"format" = "{icon}";
|
||||
"format-icons" = ["" ""];
|
||||
};
|
||||
"custom/new-workspace" = {
|
||||
"format" = "+";
|
||||
"on-click" = "hyprctl dispatch workspace empty && rofi -show drun";
|
||||
"tooltip" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
style = lib.mkForce ''
|
||||
@define-color base00 #272822;
|
||||
@define-color base01 #383830;
|
||||
@define-color base02 #49483e;
|
||||
@define-color base03 #75715e;
|
||||
@define-color base04 #a59f85;
|
||||
@define-color base05 #f8f8f2;
|
||||
@define-color base06 #f5f4f1;
|
||||
@define-color base07 #f9f8f5;
|
||||
@define-color base08 #f92672;
|
||||
@define-color base09 #fd971f;
|
||||
@define-color base0A #f4bf75;
|
||||
@define-color base0B #a6e22e;
|
||||
@define-color base0C #a1efe4;
|
||||
@define-color base0D #66d9ef;
|
||||
@define-color base0E #ae81ff;
|
||||
@define-color base0F #cc6633;
|
||||
|
||||
* {
|
||||
color: @base05;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: alpha(@base00, 0.95);
|
||||
border-right: 1px solid alpha(@base02, 0.67);
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 12px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: alpha(@base02, 0.67);
|
||||
}
|
||||
|
||||
#window {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
tooltip, #tray menu {
|
||||
background: @base00;
|
||||
border: 1px solid alpha(@base09, 0.93);
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#backlight, #battery, #wireplumber {
|
||||
font-family: "Font Awesome 6 Free Solid";
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#custom-new-workspace {
|
||||
font-family: "Font Awesome 6 Free Solid";
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
color: alpha(@base0A, 0.67);
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
guioptions = "v";
|
||||
adjust-open = "width";
|
||||
statusbar-basename = true;
|
||||
render-loading = false;
|
||||
scroll-step = 120;
|
||||
};
|
||||
};
|
||||
programs.feh = {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
toggle_actions = null;
|
||||
toggle_aliasing = null;
|
||||
toggle_caption = null;
|
||||
toggle_filenames = "d";
|
||||
toggle_exif = null;
|
||||
save_filelist = null;
|
||||
toggle_fixed_geometry = "g";
|
||||
toggle_pause = "h";
|
||||
toggle_info = null;
|
||||
toggle_keep_vp = null;
|
||||
toggle_menu = null;
|
||||
next_img = [ "k" "Right" ];
|
||||
toggle_pointer = "a";
|
||||
prev_img = [ "j" "Left" ];
|
||||
quit = "q";
|
||||
reload_image = null;
|
||||
save_image = null;
|
||||
toggle_fullscreen = "f";
|
||||
size_to_image = "w";
|
||||
close = null;
|
||||
jump_random = "z";
|
||||
prev_dir = null;
|
||||
next_dir = null;
|
||||
orient_3 = null;
|
||||
orient_1 = null;
|
||||
flip = null;
|
||||
mirror = null;
|
||||
action_0 = null;
|
||||
action_1 = null;
|
||||
action_2 = null;
|
||||
action_3 = null;
|
||||
action_4 = null;
|
||||
action_5 = null;
|
||||
action_6 = null;
|
||||
action_7 = null;
|
||||
action_8 = null;
|
||||
action_9 = null;
|
||||
jump_first = "J";
|
||||
jump_last = "K";
|
||||
jump_fwd = "H";
|
||||
jump_back = "L";
|
||||
reload_plus = null;
|
||||
reload_minus = null;
|
||||
remove = null;
|
||||
delete = null;
|
||||
scroll_left = "b";
|
||||
scroll_right = "n";
|
||||
scroll_up = [ "u" "Up" ];
|
||||
scroll_down = [ "d" "Down" ];
|
||||
scroll_left_page = null;
|
||||
scroll_right_page = null;
|
||||
scroll_up_page = null;
|
||||
scroll_down_page = null;
|
||||
render = null;
|
||||
zoom_in = "h";
|
||||
zoom_out = "l";
|
||||
zoom_default = "o";
|
||||
zoom_fit = null;
|
||||
zoom_fill = "p";
|
||||
menu_close = null;
|
||||
menu_up = null;
|
||||
menu_down = null;
|
||||
menu_parent = null;
|
||||
menu_child = null;
|
||||
menu_select = null;
|
||||
toggle_auto_zoom = "m";
|
||||
};
|
||||
};
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
auto_update "yes"
|
||||
'';
|
||||
};
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
bindings = [
|
||||
{ key = "mouse"; command = "dummy"; }
|
||||
{ key = "h"; command = ["previous_column" "jump_to_parent_directory"]; }
|
||||
{ key = "j"; command = "scroll_down"; }
|
||||
{ key = "k"; command = "scroll_up"; }
|
||||
{ key = "l"; command = [ "next_column" "enter_directory" "play_item"]; }
|
||||
{ key = "H"; command = [ "select_item" "scroll_down"]; }
|
||||
{ key = "J"; command = ["move_sort_order_down" "move_selected_items_down"]; }
|
||||
{ key = "K"; command = ["move_sort_order_up" "move_selected_items_up"]; }
|
||||
{ key = "L"; command = [ "select_item" "scroll_up"]; }
|
||||
{ key = "'"; command = "remove_selection"; }
|
||||
{ key = "ctrl-u"; command = "page_up"; }
|
||||
{ key = "ctrl-d"; command = "page_down"; }
|
||||
{ key = "u"; command = "page_up"; }
|
||||
{ key = "d"; command = "page_down"; }
|
||||
{ key = "n"; command = "next_found_item"; }
|
||||
{ key = "N"; command = "previous_found_item"; }
|
||||
{ key = "t"; command = "next_screen"; }
|
||||
{ key = "g"; command = "move_home"; }
|
||||
{ key = "G"; command = "move_end"; }
|
||||
{ key = "w"; command = "next"; }
|
||||
{ key = "b"; command = "previous"; }
|
||||
{ key = ";"; command = "seek_forward"; }
|
||||
{ key = ","; command = "seek_backward"; }
|
||||
{ key = "f"; command = "apply_filter"; }
|
||||
{ key = "i"; command = "select_item"; }
|
||||
{ key = "x"; command = [ "delete_playlist_items" "delete_browser_items" "delete_stored_playlist" ]; }
|
||||
{ key = "U"; command = "update_database"; }
|
||||
{ key = "m"; command = "add_random_items"; }
|
||||
];
|
||||
settings = {
|
||||
ncmpcpp_directory = "~/.config/ncmpcpp";
|
||||
user_interface = "alternative";
|
||||
autocenter_mode = "yes";
|
||||
allow_for_physical_item_deletion = "no";
|
||||
mouse_support = "no";
|
||||
execute_on_song_change = "~/.config/mpd/mpdnotify";
|
||||
mpd_crossfade_time = 3;
|
||||
};
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "curses";
|
||||
@ -800,267 +445,7 @@
|
||||
rust-vim
|
||||
];
|
||||
};
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"*" = {
|
||||
charset = "utf-8";
|
||||
end_of_line = "lf";
|
||||
insert_final_newline = true;
|
||||
indent_size = 2;
|
||||
indent_style = "space";
|
||||
trim_trailing_whitespace = true;
|
||||
};
|
||||
"*.md" = { indent_style = "tab"; };
|
||||
"Makefile" = {
|
||||
indent_style = "tab";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.html" = {
|
||||
indent_style = "tab";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.go" = {
|
||||
indent_style = "tab";
|
||||
indent_size = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.configFile."tig/config".text = ''
|
||||
color cursor black green bold
|
||||
color title-focus black blue bold
|
||||
color title-blur black blue bold
|
||||
'';
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
screenshot-format = "png";
|
||||
profile = "gpu-hq";
|
||||
scale = "ewa_lanczossharp";
|
||||
cscale = "ewa_lanczossharp";
|
||||
video-sync = "display-resample";
|
||||
interpolation = true;
|
||||
tscale = "oversample";
|
||||
sub-auto = "fuzzy";
|
||||
sub-font = "Noto Sans CJK JP Medium";
|
||||
sub-blur = 10;
|
||||
sub-file-paths = "subs:subtitles:字幕";
|
||||
fullscreen = "yes";
|
||||
title = "\${filename} - mpv";
|
||||
script-opts =
|
||||
"osc-title=\${filename},osc-boxalpha=150,osc-showfullscreen=no,osc-boxvideo=yes";
|
||||
osc = "no";
|
||||
osd-on-seek = "no";
|
||||
osd-bar = "no";
|
||||
osd-bar-w = 30;
|
||||
osd-bar-h = "0.2";
|
||||
osd-duration = 750;
|
||||
really-quiet = "yes";
|
||||
};
|
||||
scripts = [ pkgs.mpvScripts.thumbnail ];
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
include = { path = "~/.gituser"; };
|
||||
commit = { gpgsign = true; };
|
||||
core = {
|
||||
editor = "nvim";
|
||||
autocrlf = false;
|
||||
quotePath = false;
|
||||
};
|
||||
web = { browser = "librewolf"; };
|
||||
push = { default = "simple"; };
|
||||
branch = { autosetuprebase = "always"; };
|
||||
init = { defaultBranch = "master"; };
|
||||
rerere = { enabled = true; };
|
||||
color = { ui = true; };
|
||||
alias = {
|
||||
contrib = "shortlog -n -s";
|
||||
remotes = "remote -v";
|
||||
praise = "blame";
|
||||
verify = "log --show-signature";
|
||||
};
|
||||
"color \"diff-highlight\"" = {
|
||||
oldNormal = "red bold";
|
||||
oldHighlight = "red bold";
|
||||
newNormal = "green bold";
|
||||
newHighlight = "green bold";
|
||||
};
|
||||
"color \"diff\"" = {
|
||||
meta = "yellow";
|
||||
frag = "magenta bold";
|
||||
commit = "yellow bold";
|
||||
old = "red bold";
|
||||
new = "green bold";
|
||||
whitespace = "red reverse";
|
||||
};
|
||||
};
|
||||
diff-so-fancy = { enable = true; };
|
||||
};
|
||||
services.udiskie.enable = true;
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
package = pkgs.qutebrowser-qt6;
|
||||
extraConfig = ''
|
||||
# Mute tabs by default
|
||||
from qutebrowser.mainwindow import tabwidget
|
||||
tabwidget.TabWidget.MUTE_STRING = ""
|
||||
tabwidget.TabWidget.AUDIBLE_STRING = "[A]"
|
||||
|
||||
# Don't close while browsing / downloading
|
||||
c.confirm_quit = ['multiple-tabs', 'downloads']
|
||||
|
||||
# Restore previous tabs
|
||||
c.session.lazy_restore = True
|
||||
|
||||
# Use ranger as the file selector
|
||||
c.fileselect.handler = 'external'
|
||||
c.fileselect.folder.command = ['kitty', '-e', 'ranger', '--choosedir={}']
|
||||
c.fileselect.multiple_files.command = ['kitty', '-e', 'ranger', '--choosefiles={}']
|
||||
c.fileselect.single_file.command = ['kitty', '-e', 'ranger', '--choosefile={}']
|
||||
|
||||
# Better context menu colors
|
||||
c.colors.contextmenu.disabled.fg = '#808080'
|
||||
c.colors.contextmenu.menu.bg = '#353535'
|
||||
c.colors.contextmenu.menu.fg = '#ffffff'
|
||||
c.colors.contextmenu.selected.bg = '#909090'
|
||||
|
||||
# Use spellcheck
|
||||
c.spellcheck.languages = ["en-US"]
|
||||
|
||||
# Chromium flags
|
||||
c.qt.args = ["disable-backing-store-limit", "enable-accelerated-video-decode", "disable-gpu-driver-bug-workarounds"]
|
||||
c.qt.chromium.low_end_device_mode = 'never'
|
||||
|
||||
# Make new tab position more sane
|
||||
c.tabs.new_position.unrelated = 'next'
|
||||
|
||||
# Download settings
|
||||
c.downloads.location.directory = "$HOME/Downloads"
|
||||
c.downloads.location.prompt = False
|
||||
c.downloads.position = "bottom"
|
||||
c.downloads.remove_finished = 5000
|
||||
|
||||
# Only show tabs when multiple are open
|
||||
c.tabs.show = "multiple"
|
||||
|
||||
# Don't switch tabs with mouse
|
||||
c.tabs.mousewheel_switching = False
|
||||
|
||||
# Edit text with neovim
|
||||
c.editor.command = ['kitty', '-e', 'nvim', '{}']
|
||||
|
||||
# Use J/K for prev/next
|
||||
config.bind('J', 'tab-prev')
|
||||
config.bind('K', 'tab-next')
|
||||
|
||||
# Use F12 for devtools
|
||||
config.bind('<F12>', 'devtools')
|
||||
|
||||
# Use zb to delete bookmarks
|
||||
config.bind('zb', 'bookmark-del')
|
||||
|
||||
# Increase the default scroll offset of j/k
|
||||
# NOTE: Unfortunately this breaks websites that use their own keybinds for j/k/etc
|
||||
# config.bind('j', 'run-with-count 5 scroll down')
|
||||
# config.bind('k', 'run-with-count 5 scroll up')
|
||||
|
||||
# NOTE: Use with smooth smooth scrolling enabled to scroll smoothly
|
||||
# config.bind('d', 'run-with-count 12 scroll down')
|
||||
# config.bind('u', 'run-with-count 12 scroll up')
|
||||
|
||||
# Use d/u to scroll down/up
|
||||
config.bind('d', 'scroll-page 0 0.5')
|
||||
config.bind('u', 'scroll-page 0 -0.5')
|
||||
config.bind('D', 'scroll-page 0 0.5')
|
||||
config.bind('U', 'scroll-page 0 -0.5')
|
||||
|
||||
# Use alt+left/right to go back/forward
|
||||
config.bind('<Alt+Left>', 'back')
|
||||
config.bind('<Alt+Right>', 'forward')
|
||||
|
||||
# Use x to close tabs and X to undo
|
||||
config.bind('x', 'tab-close')
|
||||
config.bind('X', 'undo')
|
||||
|
||||
# Toggle tab visibility for more screen space
|
||||
config.bind('st', 'config-cycle tabs.show multiple switching')
|
||||
|
||||
# Easily change the position of tabs
|
||||
config.bind('sTh', 'set tabs.position left')
|
||||
config.bind('sTj', 'set tabs.position bottom')
|
||||
config.bind('sTk', 'set tabs.position top')
|
||||
config.bind('sTl', 'set tabs.position right')
|
||||
|
||||
# Don't paste something by accident
|
||||
config.unbind('pp', mode='normal')
|
||||
config.unbind('pP', mode='normal')
|
||||
config.unbind('Pp', mode='normal')
|
||||
config.unbind('PP', mode='normal')
|
||||
config.unbind('wp', mode='normal')
|
||||
config.unbind('wP', mode='normal')
|
||||
|
||||
# Easily enter account information
|
||||
# NOTE: I re-evaluated pass when I was focusing on a terminal-centric workflow.
|
||||
config.bind('zl', 'spawn --userscript qute-pass')
|
||||
config.bind('zpl', 'spawn --userscript qute-pass --password-only')
|
||||
config.bind('zol', 'spawn --userscript qute-pass --otp-only')
|
||||
|
||||
# Support previous/next tab with traditional keybinds
|
||||
config.bind('<Ctrl+Shift+Tab>', 'tab-prev')
|
||||
config.bind('<Ctrl+Tab>', 'tab-next')
|
||||
|
||||
# Hide the status bar except under exceptional circumstances
|
||||
# NOTE: This broke more things than not, which is why I ultimately decided
|
||||
# to always use the status bar. More information can be found in the
|
||||
# following discussion: https://github.com/qutebrowser/qutebrowser/issues/2236
|
||||
# config.bind('o', 'set statusbar.show always;; set-cmd-text -s :open')
|
||||
# config.bind('O', 'set statusbar.show always;; set-cmd-text -s :open -t')
|
||||
# config.bind('T', 'set statusbar.show always;; set-cmd-text -sr :tab-focus')
|
||||
# config.bind(':', 'set statusbar.show always;; set-cmd-text :')
|
||||
# config.bind('/', 'set statusbar.show always;; set-cmd-text /')
|
||||
# config.bind('<Escape>', 'mode-enter normal;; set statusbar.show in-mode', mode='command')
|
||||
# config.bind('<Return>', 'command-accept;; set statusbar.show in-mode', mode='command')
|
||||
|
||||
# Easily start a new temporary container
|
||||
config.bind(';s', 'hint links spawn ~/.local/bin/tmp {hint-url}')
|
||||
|
||||
# Open the current tab / selected link in mpv
|
||||
config.bind('zM', 'spawn mpv --force-window=immediate {url}')
|
||||
config.bind('zm', 'hint links spawn mpv --force-window=immediate {hint-url}')
|
||||
|
||||
# Automatically mute tabs
|
||||
c.content.mute = True
|
||||
|
||||
# Use proxy websites for popular services
|
||||
config.bind('zu', 'hint links spawn -u untrack-url -O {hint-url}')
|
||||
|
||||
# Enable expected permissions to avoid websites asking every time
|
||||
c.content.persistent_storage = True
|
||||
c.content.notifications.enabled = True
|
||||
c.content.register_protocol_handler = True
|
||||
|
||||
# Hide the window title bar on GNOME
|
||||
# NOTE: This is no longer necessary since GNOME has an extension called
|
||||
# pixel-saver that # automatically handles this for us, and without
|
||||
# the downsides of not having a window bar.
|
||||
# c.window.hide_decoration = True
|
||||
|
||||
# Close qutebrowser when there are no tabs left
|
||||
c.tabs.last_close = "close"
|
||||
|
||||
# Don't automatically enter/leave insert mode
|
||||
# NOTE: This was originally done to prevent insert mode from prematurely exiting
|
||||
# in certain # cases (such as mouse usage), although keeping auto functionality
|
||||
# seems to be more useful # long-term.
|
||||
c.input.insert_mode.auto_enter = False
|
||||
c.input.insert_mode.auto_leave = False
|
||||
|
||||
# Prioritize Japanese content (en-US is necessary to avoid breaking things)
|
||||
c.content.headers.accept_language = 'ja-JP,en-US'
|
||||
'';
|
||||
};
|
||||
xdg.configFile."hypr/swapmaster.sh".source = ./swapmaster.sh;
|
||||
xdg.configFile."hypr/tags.sh".source = ./tags.sh;
|
||||
xdg = { userDirs = { enable = true; }; };
|
||||
|
Loading…
Reference in New Issue
Block a user