Distuingish between configurations and program modifications
This commit is contained in:
parent
964b294300
commit
1afb00a3de
27 changed files with 48 additions and 44 deletions
23
configurations/base-x/default.nix
Normal file
23
configurations/base-x/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.startx.enable = true;
|
||||
libinput = {
|
||||
enable = true;
|
||||
disableWhileTyping = true;
|
||||
scrollMethod = "twofinger";
|
||||
tapping = true;
|
||||
tappingDragLock = true;
|
||||
};
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.file.".xinitrc".text = "source ~/.xsession";
|
||||
xsession = {
|
||||
enable = true;
|
||||
numlock.enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
16
configurations/direnv/default.nix
Normal file
16
configurations/direnv/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
config = {
|
||||
global = {
|
||||
strict_env = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.lorri.enable = true;
|
||||
};
|
||||
}
|
26
configurations/dropbox/default.nix
Normal file
26
configurations/dropbox/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
systemd.user.services = {
|
||||
dropbox = {
|
||||
Unit = {
|
||||
Description = "Dropbox";
|
||||
};
|
||||
Service = {
|
||||
Environment = "QT_PLUGIN_PATH=\"/run/current-system/sw/${pkgs.qt5.qtbase.qtPluginPrefix}\" QML2_IMPORT_PATH=\"/run/current-system/sw/${pkgs.qt5.qtbase.qtQmlPrefix}\"";
|
||||
ExecStart = "${pkgs.dropbox.out}/bin/dropbox";
|
||||
ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID";
|
||||
KillMode = "control-group";
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
Nice = 10;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
36
configurations/git/default.nix
Normal file
36
configurations/git/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.custom.git.email = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "charlotte@vanpetegem.me";
|
||||
example = "charlotte@vanpetegem.me";
|
||||
description = ''
|
||||
Default email set in git config
|
||||
'';
|
||||
};
|
||||
|
||||
config.home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
gitAndTools.gitflow
|
||||
git-crypt
|
||||
];
|
||||
programs.git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
branch = {
|
||||
setupautorebase = "always";
|
||||
};
|
||||
};
|
||||
ignores = [
|
||||
".envrc"
|
||||
"shell.nix"
|
||||
# Ruby dependencies in source tree
|
||||
"/vendor/rubygems"
|
||||
"**/*.patch"
|
||||
];
|
||||
userEmail = config.custom.git.email;
|
||||
userName = "Charlotte Van Petegem";
|
||||
};
|
||||
};
|
||||
}
|
41
configurations/i3/default.nix
Normal file
41
configurations/i3/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
with import <nixpkgs> { };
|
||||
{ ... }:
|
||||
let
|
||||
launcher = import ../sway/launcher.nix { inherit pkgs stdenv; };
|
||||
status-configuration = import ../sway/status-configuration.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [ ../base-x/default.nix ];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
xsession = {
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
bars = [
|
||||
{
|
||||
colors = {
|
||||
background = "#fbffff";
|
||||
statusline = "#535c65";
|
||||
focusedWorkspace = { background = "#2b7ab2"; border = "#2b7ab2"; text = "#fbffff"; };
|
||||
activeWorkspace = { background = "#6d7782"; border = "#6d7782"; text = "#fbffff"; };
|
||||
inactiveWorkspace = { background = "#fbffff"; border = "#fbffff"; text = "535c65"; };
|
||||
urgentWorkspace = { background = "#ae5865"; border = "#ae5865"; text = "#fbffff"; };
|
||||
};
|
||||
fonts = [ "Fira Code Normal 9" ];
|
||||
position = "top";
|
||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${status-configuration}";
|
||||
}
|
||||
];
|
||||
floating.criteria = [{ class = "launcher"; } { class = "accentor.Main"; }];
|
||||
fonts = [ "Fira Code Normal 9" ];
|
||||
menu = "${pkgs.kitty}/bin/kitty --class launcher -e ${launcher}/bin/launcher";
|
||||
modifier = "Mod4";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
};
|
||||
extraConfig = ''
|
||||
default_border pixel
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
46
configurations/kitty/default.nix
Normal file
46
configurations/kitty/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.kitty ];
|
||||
xdg.configFile."kitty/kitty.conf".text = ''
|
||||
font_family Fira Code
|
||||
font_size 9.0
|
||||
disable_ligatures cursor
|
||||
|
||||
background #fbffff
|
||||
foreground #535c65
|
||||
selection_background #6d7782
|
||||
selection_foreground #fbffff
|
||||
url_color #906c33
|
||||
cursor #434951
|
||||
|
||||
# normal
|
||||
color0 #fbffff
|
||||
color1 #ae5865
|
||||
color2 #4d7f43
|
||||
color3 #906c33
|
||||
color4 #2b7ab2
|
||||
color5 #8f63a2
|
||||
color6 #008483
|
||||
color7 #535c65
|
||||
|
||||
# bright
|
||||
color8 #6d7782
|
||||
color9 #ae5865
|
||||
color10 #4d7f43
|
||||
color11 #906c33
|
||||
color12 #2b7ab2
|
||||
color13 #8f63a2
|
||||
color14 #008483
|
||||
color15 #434951
|
||||
|
||||
enable_audio_bell no
|
||||
visual_bell_duration 0.25
|
||||
|
||||
remember_window_size no
|
||||
initial_window_width 1280
|
||||
initial_window_width 720
|
||||
'';
|
||||
};
|
||||
}
|
145
configurations/neovim/base.nix
Normal file
145
configurations/neovim/base.nix
Normal file
|
@ -0,0 +1,145 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
customPlugins.snow-color-theme = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "snow";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nightsense";
|
||||
repo = "snow";
|
||||
rev = "f9800e987e404efed4748fe8098e04ddbec9770b";
|
||||
sha256 = "099fky1bpppac5785bhx1jc26gfpm8n837p8487j1rf1lwq83q33";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
customRC = ''
|
||||
set autoread
|
||||
"" Theming
|
||||
|
||||
set termguicolors
|
||||
set background=light
|
||||
colorscheme snow
|
||||
|
||||
"" General settings
|
||||
|
||||
" Undo over sessions
|
||||
set undofile
|
||||
set undodir=~/.cache/nvimundo
|
||||
|
||||
" Automatically save sessions on exit and load them on start
|
||||
function! MakeSession()
|
||||
let b:sessiondir = $HOME . "/.config/nvim/sessions" . getcwd()
|
||||
if (filewritable(b:sessiondir) != 2)
|
||||
exe 'silent !mkdir -p ' b:sessiondir
|
||||
redraw!
|
||||
endif
|
||||
let b:filename = b:sessiondir . '/session.vim'
|
||||
exe "mksession! " . b:filename
|
||||
endfunction
|
||||
|
||||
function! LoadSession()
|
||||
let b:sessiondir = $HOME . "/.config/nvim/sessions" . getcwd()
|
||||
let b:sessionfile = b:sessiondir . "/session.vim"
|
||||
if (filereadable(b:sessionfile))
|
||||
exe 'source ' b:sessionfile
|
||||
else
|
||||
echo "No session loaded."
|
||||
endif
|
||||
endfunction
|
||||
if(argc() == 0)
|
||||
au VimEnter * nested :call LoadSession()
|
||||
au VimLeave * :call MakeSession()
|
||||
endif
|
||||
|
||||
"" Filetype configuration
|
||||
|
||||
" Base settings for all files
|
||||
|
||||
syntax enable
|
||||
set number
|
||||
set showcmd
|
||||
set scrolloff=8
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set linebreak
|
||||
|
||||
set list
|
||||
set listchars=tab:·\ ,trail:·
|
||||
set inccommand=split
|
||||
set clipboard=unnamedplus
|
||||
|
||||
filetype plugin indent on
|
||||
|
||||
"" Fuzzy search in vim
|
||||
|
||||
function! s:completedFiles(winid, filename, ...) abort
|
||||
bdelete!
|
||||
call win_gotoid(a:winid)
|
||||
if filereadable(a:filename)
|
||||
let lines = readfile(a:filename)
|
||||
if !empty(lines)
|
||||
exe ':e ' . lines[0]
|
||||
endif
|
||||
call delete(a:filename)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! FzyFiles()
|
||||
let file = tempname()
|
||||
let winid = win_getid()
|
||||
let cmd = split(&shell) + split(&shellcmdflag) + ["${pkgs.ripgrep.out}/bin/rg --files --hidden -g '!/.git' --smart-case | ${pkgs.fzy.out}/bin/fzy > " . file]
|
||||
let F = function('s:completedFiles', [winid, file])
|
||||
botright 10 new
|
||||
call termopen(cmd, {'on_exit': F})
|
||||
startinsert
|
||||
endfunction
|
||||
|
||||
function! s:completedGrep(winid, filename, ...) abort
|
||||
bdelete!
|
||||
call win_gotoid(a:winid)
|
||||
if filereadable(a:filename)
|
||||
let lines = readfile(a:filename)
|
||||
if !empty(lines)
|
||||
let list = split(lines[0], ':')
|
||||
let file = list[0]
|
||||
let line = list[1]
|
||||
exe ':e ' . file
|
||||
exe line
|
||||
endif
|
||||
call delete(a:filename)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! FzyGrep()
|
||||
let file = tempname()
|
||||
let winid = win_getid()
|
||||
let cmd = split(&shell) + split(&shellcmdflag) + ["${pkgs.ripgrep.out}/bin/rg --vimgrep --hidden -g '!/.git' '^' | ${pkgs.fzy.out}/bin/fzy > " . file]
|
||||
let F = function('s:completedGrep', [winid, file])
|
||||
botright 10 new
|
||||
call termopen(cmd, {'on_exit': F})
|
||||
startinsert
|
||||
endfunction
|
||||
|
||||
nnoremap <C-f> :call FzyFiles()<CR>
|
||||
nnoremap <C-g> :call FzyGrep()<CR>
|
||||
|
||||
"" Plugin configuration
|
||||
let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'] }
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
'';
|
||||
vam.knownPlugins = pkgs.vimPlugins // customPlugins;
|
||||
vam.pluginDictionaries = [
|
||||
{
|
||||
names = [
|
||||
"ale"
|
||||
"auto-pairs"
|
||||
"deoplete-nvim"
|
||||
"editorconfig-vim"
|
||||
"snow-color-theme"
|
||||
"vim-nix"
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
13
configurations/neovim/default.nix
Normal file
13
configurations/neovim/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
with import <nixpkgs> { };
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [
|
||||
(
|
||||
pkgs.neovim.override {
|
||||
configure = (import ./base.nix { inherit pkgs; });
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
14
configurations/openbox/default.nix
Normal file
14
configurations/openbox/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ../base-x/default.nix ];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
xdg.configFile."openbox/rc.xml".source = ./rc.xml;
|
||||
xsession = {
|
||||
windowManager.command = "${pkgs.openbox}/bin/openbox";
|
||||
initExtra = ''
|
||||
${pkgs.tint2}/bin/tint2 &
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
723
configurations/openbox/rc.xml
Normal file
723
configurations/openbox/rc.xml
Normal file
|
@ -0,0 +1,723 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Do not edit this file, it will be overwritten on install.
|
||||
Copy the file to $HOME/.config/openbox/ instead. -->
|
||||
|
||||
<openbox_config xmlns="http://openbox.org/3.4/rc"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<resistance>
|
||||
<strength>10</strength>
|
||||
<screen_edge_strength>20</screen_edge_strength>
|
||||
</resistance>
|
||||
|
||||
<focus>
|
||||
<focusNew>yes</focusNew>
|
||||
<!-- always try to focus new windows when they appear. other rules do
|
||||
apply -->
|
||||
<followMouse>no</followMouse>
|
||||
<!-- move focus to a window when you move the mouse into it -->
|
||||
<focusLast>yes</focusLast>
|
||||
<!-- focus the last used window when changing desktops, instead of the one
|
||||
under the mouse pointer. when followMouse is enabled -->
|
||||
<underMouse>no</underMouse>
|
||||
<!-- move focus under the mouse, even when the mouse is not moving -->
|
||||
<focusDelay>200</focusDelay>
|
||||
<!-- when followMouse is enabled, the mouse must be inside the window for
|
||||
this many milliseconds (1000 = 1 sec) before moving focus to it -->
|
||||
<raiseOnFocus>no</raiseOnFocus>
|
||||
<!-- when followMouse is enabled, and a window is given focus by moving the
|
||||
mouse into it, also raise the window -->
|
||||
</focus>
|
||||
|
||||
<placement>
|
||||
<policy>Smart</policy>
|
||||
<!-- 'Smart' or 'UnderMouse' -->
|
||||
<center>yes</center>
|
||||
<!-- whether to place windows in the center of the free area found or
|
||||
the top left corner -->
|
||||
<monitor>Primary</monitor>
|
||||
<!-- with Smart placement on a multi-monitor system, try to place new windows
|
||||
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
|
||||
the active window is, 'Primary' - only on the primary monitor -->
|
||||
<primaryMonitor>1</primaryMonitor>
|
||||
<!-- The monitor where Openbox should place popup dialogs such as the
|
||||
focus cycling popup, or the desktop switch popup. It can be an index
|
||||
from 1, specifying a particular monitor. Or it can be one of the
|
||||
following: 'Mouse' - where the mouse is, or
|
||||
'Active' - where the active window is -->
|
||||
</placement>
|
||||
|
||||
<theme>
|
||||
<name>Clearlooks</name>
|
||||
<titleLayout>NLIMC</titleLayout>
|
||||
<!--
|
||||
available characters are NDSLIMC, each can occur at most once.
|
||||
N: window icon
|
||||
L: window label (AKA title).
|
||||
I: iconify
|
||||
M: maximize
|
||||
C: close
|
||||
S: shade (roll up/down)
|
||||
D: omnipresent (on all desktops).
|
||||
-->
|
||||
<keepBorder>yes</keepBorder>
|
||||
<animateIconify>yes</animateIconify>
|
||||
<font place="ActiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuHeader">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuItem">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="ActiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
</theme>
|
||||
|
||||
<desktops>
|
||||
<!-- this stuff is only used at startup, pagers allow you to change them
|
||||
during a session
|
||||
these are default values to use when other ones are not already set
|
||||
by other applications, or saved in your session
|
||||
use obconf if you want to change these without having to log out
|
||||
and back in -->
|
||||
<number>4</number>
|
||||
<firstdesk>1</firstdesk>
|
||||
<names>
|
||||
<!-- set names up here if you want to, like this:
|
||||
<name>desktop 1</name>
|
||||
<name>desktop 2</name>
|
||||
-->
|
||||
</names>
|
||||
<popupTime>875</popupTime>
|
||||
<!-- The number of milliseconds to show the popup for when switching
|
||||
desktops. Set this to 0 to disable the popup. -->
|
||||
</desktops>
|
||||
|
||||
<resize>
|
||||
<drawContents>yes</drawContents>
|
||||
<popupShow>Nonpixel</popupShow>
|
||||
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
|
||||
<popupPosition>Center</popupPosition>
|
||||
<!-- 'Center', 'Top', or 'Fixed' -->
|
||||
<popupFixedPosition>
|
||||
<!-- these are used if popupPosition is set to 'Fixed' -->
|
||||
|
||||
<x>10</x>
|
||||
<!-- positive number for distance from left edge, negative number for
|
||||
distance from right edge, or 'Center' -->
|
||||
<y>10</y>
|
||||
<!-- positive number for distance from top edge, negative number for
|
||||
distance from bottom edge, or 'Center' -->
|
||||
</popupFixedPosition>
|
||||
</resize>
|
||||
|
||||
<!-- You can reserve a portion of your screen where windows will not cover when
|
||||
they are maximized, or when they are initially placed.
|
||||
Many programs reserve space automatically, but you can use this in other
|
||||
cases. -->
|
||||
<margins>
|
||||
<top>0</top>
|
||||
<bottom>0</bottom>
|
||||
<left>0</left>
|
||||
<right>0</right>
|
||||
</margins>
|
||||
|
||||
<dock>
|
||||
<position>TopLeft</position>
|
||||
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
|
||||
<floatingX>0</floatingX>
|
||||
<floatingY>0</floatingY>
|
||||
<noStrut>no</noStrut>
|
||||
<stacking>Above</stacking>
|
||||
<!-- 'Above', 'Normal', or 'Below' -->
|
||||
<direction>Vertical</direction>
|
||||
<!-- 'Vertical' or 'Horizontal' -->
|
||||
<autoHide>no</autoHide>
|
||||
<hideDelay>300</hideDelay>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<showDelay>300</showDelay>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<moveButton>Middle</moveButton>
|
||||
<!-- 'Left', 'Middle', 'Right' -->
|
||||
</dock>
|
||||
|
||||
<keyboard>
|
||||
<chainQuitKey>C-g</chainQuitKey>
|
||||
|
||||
<!-- Keybindings for desktop switching -->
|
||||
<keybind key="C-A-Left">
|
||||
<action name="GoToDesktop"><to>left</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Right">
|
||||
<action name="GoToDesktop"><to>right</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Up">
|
||||
<action name="GoToDesktop"><to>up</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Down">
|
||||
<action name="GoToDesktop"><to>down</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Left">
|
||||
<action name="SendToDesktop"><to>left</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Right">
|
||||
<action name="SendToDesktop"><to>right</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Up">
|
||||
<action name="SendToDesktop"><to>up</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Down">
|
||||
<action name="SendToDesktop"><to>down</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="W-F1">
|
||||
<action name="GoToDesktop"><to>1</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F2">
|
||||
<action name="GoToDesktop"><to>2</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F3">
|
||||
<action name="GoToDesktop"><to>3</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F4">
|
||||
<action name="GoToDesktop"><to>4</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-d">
|
||||
<action name="ToggleShowDesktop"/>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for windows -->
|
||||
<keybind key="A-F4">
|
||||
<action name="Close"/>
|
||||
</keybind>
|
||||
<keybind key="A-Escape">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</keybind>
|
||||
<keybind key="A-space">
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for window switching -->
|
||||
<keybind key="A-Tab">
|
||||
<action name="NextWindow">
|
||||
<finalactions>
|
||||
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="A-S-Tab">
|
||||
<action name="PreviousWindow">
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Tab">
|
||||
<action name="NextWindow">
|
||||
<panels>yes</panels><desktop>yes</desktop>
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for window switching with the arrow keys -->
|
||||
<keybind key="W-S-Right">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>right</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Left">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>left</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Up">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>up</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Down">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>down</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for running applications -->
|
||||
<keybind key="W-e">
|
||||
<action name="Execute">
|
||||
<startupnotify>
|
||||
<enabled>true</enabled>
|
||||
<name>Kitty</name>
|
||||
</startupnotify>
|
||||
<command>kitty</command>
|
||||
</action>
|
||||
</keybind>
|
||||
</keyboard>
|
||||
|
||||
<mouse>
|
||||
<dragThreshold>1</dragThreshold>
|
||||
<!-- number of pixels the mouse must move before a drag begins -->
|
||||
<doubleClickTime>500</doubleClickTime>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<screenEdgeWarpTime>400</screenEdgeWarpTime>
|
||||
<!-- Time before changing desktops when the pointer touches the edge of the
|
||||
screen while moving a window, in milliseconds (1000 = 1 second).
|
||||
Set this to 0 to disable warping -->
|
||||
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
|
||||
<!-- Set this to TRUE to move the mouse pointer across the desktop when
|
||||
switching due to hitting the edge of the screen -->
|
||||
|
||||
<context name="Frame">
|
||||
<mousebind button="A-Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Click">
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Right" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Up" action="Click">
|
||||
<action name="SendToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Down" action="Click">
|
||||
<action name="SendToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Titlebar">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="DoubleClick">
|
||||
<action name="ToggleMaximize"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="if">
|
||||
<shaded>no</shaded>
|
||||
<then>
|
||||
<action name="Shade"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
<action name="Lower"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="if">
|
||||
<shaded>yes</shaded>
|
||||
<then>
|
||||
<action name="Unshade"/>
|
||||
<action name="Raise"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Top">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>top</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Left">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>left</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Right">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>right</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Bottom">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>bottom</edge></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="TRCorner BRCorner TLCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Client">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Icon">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="AllDesktops">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleOmnipresent"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Shade">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleShade"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Iconify">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Iconify"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Maximize">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleMaximize"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Click">
|
||||
<action name="ToggleMaximize"><direction>vertical</direction></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Click">
|
||||
<action name="ToggleMaximize"><direction>horizontal</direction></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Close">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Close"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Desktop">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Root">
|
||||
<!-- Menus -->
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="ShowMenu"><menu>root-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="MoveResize">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
</mouse>
|
||||
|
||||
<menu>
|
||||
<!-- You can specify more than one menu file in here and they are all loaded,
|
||||
just don't make menu ids clash or, well, it'll be kind of pointless -->
|
||||
|
||||
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
|
||||
<file>menu.xml</file>
|
||||
<hideDelay>200</hideDelay>
|
||||
<!-- if a press-release lasts longer than this setting (in milliseconds), the
|
||||
menu is hidden again -->
|
||||
<middle>no</middle>
|
||||
<!-- center submenus vertically about the parent entry -->
|
||||
<submenuShowDelay>100</submenuShowDelay>
|
||||
<!-- time to delay before showing a submenu after hovering over the parent
|
||||
entry.
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be shown until it is clicked on -->
|
||||
<submenuHideDelay>400</submenuHideDelay>
|
||||
<!-- time to delay before hiding a submenu when selecting another
|
||||
entry in parent menu
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be hidden until a different submenu is opened -->
|
||||
<showIcons>yes</showIcons>
|
||||
<!-- controls if icons appear in the client-list-(combined-)menu -->
|
||||
<manageDesktops>yes</manageDesktops>
|
||||
<!-- show the manage desktops section in the client-list-(combined-)menu -->
|
||||
</menu>
|
||||
|
||||
<applications>
|
||||
<!--
|
||||
# this is an example with comments through out. use these to make your
|
||||
# own rules, but without the comments of course.
|
||||
# you may use one or more of the name/class/role/title/type rules to specify
|
||||
# windows to match
|
||||
<application name="the window's _OB_APP_NAME property (see obxprop)"
|
||||
class="the window's _OB_APP_CLASS property (see obxprop)"
|
||||
groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)"
|
||||
groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)"
|
||||
role="the window's _OB_APP_ROLE property (see obxprop)"
|
||||
title="the window's _OB_APP_TITLE property (see obxprop)"
|
||||
type="the window's _OB_APP_TYPE property (see obxprob)..
|
||||
(if unspecified, then it is 'dialog' for child windows)">
|
||||
# you may set only one of name/class/role/title/type, or you may use more
|
||||
# than one together to restrict your matches.
|
||||
# the name, class, role, and title use simple wildcard matching such as those
|
||||
# used by a shell. you can use * to match any characters and ? to match
|
||||
# any single character.
|
||||
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
|
||||
# or desktop
|
||||
# when multiple rules match a window, they will all be applied, in the
|
||||
# order that they appear in this list
|
||||
# each rule element can be left out or set to 'default' to specify to not
|
||||
# change that attribute of the window
|
||||
<decor>yes</decor>
|
||||
# enable or disable window decorations
|
||||
<shade>no</shade>
|
||||
# make the window shaded when it appears, or not
|
||||
<position force="no">
|
||||
# the position is only used if both an x and y coordinate are provided
|
||||
# (and not set to 'default')
|
||||
# when force is "yes", then the window will be placed here even if it
|
||||
# says you want it placed elsewhere. this is to override buggy
|
||||
# applications who refuse to behave
|
||||
<x>center</x>
|
||||
# a number like 50, or 'center' to center on screen. use a negative number
|
||||
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from
|
||||
# the right edge (or bottom). use 'default' to specify using value
|
||||
# provided by the application, or chosen by openbox, instead.
|
||||
<y>200</y>
|
||||
<monitor>1</monitor>
|
||||
# specifies the monitor in a xinerama setup.
|
||||
# 1 is the first head, or 'mouse' for wherever the mouse is
|
||||
</position>
|
||||
<size>
|
||||
# the size to make the window.
|
||||
<width>20</width>
|
||||
# a number like 20, or 'default' to use the size given by the application.
|
||||
# you can use fractions such as 1/2 or percentages such as 75% in which
|
||||
# case the value is relative to the size of the monitor that the window
|
||||
# appears on.
|
||||
<height>30%</height>
|
||||
</size>
|
||||
<focus>yes</focus>
|
||||
# if the window should try be given focus when it appears. if this is set
|
||||
# to yes it doesn't guarantee the window will be given focus. some
|
||||
# restrictions may apply, but Openbox will try to
|
||||
<desktop>1</desktop>
|
||||
# 1 is the first desktop, 'all' for all desktops
|
||||
<layer>normal</layer>
|
||||
# 'above', 'normal', or 'below'
|
||||
<iconic>no</iconic>
|
||||
# make the window iconified when it appears, or not
|
||||
<skip_pager>no</skip_pager>
|
||||
# asks to not be shown in pagers
|
||||
<skip_taskbar>no</skip_taskbar>
|
||||
# asks to not be shown in taskbars. window cycling actions will also
|
||||
# skip past such windows
|
||||
<fullscreen>yes</fullscreen>
|
||||
# make the window in fullscreen mode when it appears
|
||||
<maximized>true</maximized>
|
||||
# 'Horizontal', 'Vertical' or boolean (yes/no)
|
||||
</application>
|
||||
# end of the example
|
||||
-->
|
||||
</applications>
|
||||
|
||||
</openbox_config>
|
15
configurations/ssh/default.nix
Normal file
15
configurations/ssh/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
compression = true;
|
||||
hashKnownHosts = true;
|
||||
serverAliveInterval = 300;
|
||||
extraConfig = ''
|
||||
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
9
configurations/sway/color-picker.nix
Normal file
9
configurations/sway/color-picker.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeScriptBin "color_picker" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
color=$(${pkgs.grim}/bin/grim -t png -g "$(${pkgs.slurp}/bin/slurp -p)" - | ${pkgs.imagemagick}/bin/convert png:- -unique-colors txt:- | grep -o '#[A-F0-9]\+')
|
||||
|
||||
${pkgs.sway}/bin/swaymsg exec -- "echo -n '$color' | ${pkgs.wl-clipboard}/bin/wl-copy --foreground"
|
||||
''
|
290
configurations/sway/default.nix
Normal file
290
configurations/sway/default.nix
Normal file
|
@ -0,0 +1,290 @@
|
|||
with import <nixpkgs> { };
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
firefox = import ../../programs/firefox/default.nix { inherit pkgs; };
|
||||
launcher = import ./launcher.nix { inherit pkgs stdenv; };
|
||||
color-picker = import ./color-picker.nix { inherit pkgs; };
|
||||
screenshot = import ./screenshot.nix { inherit pkgs; };
|
||||
status-configuration = import ./status-configuration.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./kanshi.nix
|
||||
];
|
||||
programs = {
|
||||
sway = {
|
||||
enable = true;
|
||||
extraPackages = [ pkgs.xwayland ];
|
||||
extraSessionCommands = ''
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=0
|
||||
export QT_SCALE_FACTOR=1
|
||||
export GDK_SCALE=1
|
||||
export GDK_DPI_SCALE=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [ color-picker launcher screenshot ];
|
||||
xdg.configFile."sway/config".text = ''
|
||||
# Config for sway
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# Your preferred terminal emulator
|
||||
set $term ${pkgs.kitty}/bin/kitty
|
||||
# Your preferred application launcher
|
||||
# Note: it's recommended that you pass the final command to sway
|
||||
set $menu $term --class launcher -e ${launcher}/bin/launcher
|
||||
|
||||
### Output configuration
|
||||
exec_always pkill kanshi; exec ${pkgs.kanshi}/bin/kanshi
|
||||
|
||||
workspace 1 output eDP-1
|
||||
workspace 2 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 3 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 4 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 5 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 6 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 7 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 8 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 9 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
workspace 10 output DP-3 DP-4 DP-5 HDMI-A-1 eDP-1
|
||||
|
||||
### Idle configuration
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, turn off
|
||||
# your displays after another 150 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
exec ${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${pkgs.swaylock}/bin/swaylock -f -c 000000' \
|
||||
timeout 150 '${pkgs.sway}/bin/swaymsg "output * dpms off"' \
|
||||
resume '${pkgs.sway}/bin/swaymsg "output * dpms on"' \
|
||||
before-sleep '${pkgs.swaylock}/bin/swaylock -f -c 000000'
|
||||
|
||||
### Notification daemon
|
||||
#
|
||||
exec ${pkgs.mako}/bin/mako
|
||||
|
||||
# User services bound to the graphical session
|
||||
exec "${pkgs.systemd}/bin/systemctl --user import-environment; ${pkgs.systemd}/bin/systemctl --user start graphical-session.target"
|
||||
|
||||
### Window rules
|
||||
# Launcher popup
|
||||
for_window [app_id="launcher"] floating enable
|
||||
|
||||
# Start accentor as floating window
|
||||
for_window [class="accentor.Main"] floating enable
|
||||
|
||||
### Startup programs
|
||||
#
|
||||
workspace 1
|
||||
exec ${firefox}/bin/firefox
|
||||
workspace 3
|
||||
exec ${pkgs.thunderbird}/bin/thunderbird
|
||||
workspace 4
|
||||
exec ${pkgs.joplin-desktop}/bin/joplin-desktop
|
||||
workspace 6
|
||||
exec ${pkgs.teams}/bin/teams
|
||||
workspace 2
|
||||
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
||||
# dwt enabled
|
||||
# tap enabled
|
||||
# natural_scroll enabled
|
||||
# middle_emulation enabled
|
||||
# }
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout "us"
|
||||
xkb_variant "altgr-intl"
|
||||
xkb_numlock enabled
|
||||
}
|
||||
|
||||
input type:touchpad {
|
||||
drag enabled
|
||||
dwt enabled
|
||||
scroll_method two_finger
|
||||
tap enabled
|
||||
}
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+c kill
|
||||
|
||||
# start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+r reload
|
||||
|
||||
# exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec ${pkgs.sway}/bin/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' '${pkgs.sway}/bin/swaymsg exit'
|
||||
|
||||
# lock screen
|
||||
bindsym $mod+c exec ${pkgs.swaylock}/bin/swaylock -f -c 000000
|
||||
|
||||
# toggle the current view inhibiting idle
|
||||
bindsym $mod+i inhibit_idle open; border normal; mark --add inhibiting_idle
|
||||
bindsym $mod+Shift+i inhibit_idle none; border pixel; unmark inhibiting_idle
|
||||
|
||||
|
||||
# screenshot
|
||||
bindsym Print exec ${screenshot}/bin/screenshot
|
||||
bindsym Alt+Print exec ${screenshot}/bin/screenshot -d
|
||||
bindsym Shift+Print exec ${screenshot}/bin/screenshot -r
|
||||
bindsym Alt+Shift+Print exec ${screenshot}/bin/screenshot -r -d
|
||||
|
||||
# audio
|
||||
bindsym XF86AudioRaiseVolume exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioLowerVolume exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioMute exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
|
||||
# brightness
|
||||
bindsym XF86MonBrightnessDown exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-
|
||||
bindsym XF86MonBrightnessUp exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# _move_ the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
# move workspace to output
|
||||
bindsym $mod+Alt+Left move workspace to output left
|
||||
bindsym $mod+Alt+Right move workspace to output right
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position top
|
||||
|
||||
status_command ${pkgs.i3status-rust}/bin/i3status-rs ${status-configuration}
|
||||
status_padding 0
|
||||
|
||||
font Fira Code Normal 9
|
||||
|
||||
colors {
|
||||
statusline #535c65
|
||||
background #fbffff
|
||||
focused_workspace #2b7ab2 #2b7ab2 #fbffff
|
||||
active_workspace #6d7782 #6d7782 #fbffff
|
||||
inactive_workspace #fbffff #fbffff #535c65
|
||||
urgent_workspace #ae5865 #ae5865 #fbffff
|
||||
}
|
||||
|
||||
icon_theme Breeze
|
||||
}
|
||||
|
||||
default_border pixel
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
'';
|
||||
};
|
||||
}
|
22
configurations/sway/kanshi.nix
Normal file
22
configurations/sway/kanshi.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
xdg.configFile."kanshi/config".text = ''
|
||||
{
|
||||
output "Unknown 0x2036 0x00000000" position 0,0 mode 2560x1440 scale 1.0
|
||||
}
|
||||
{
|
||||
output "Unknown 0x2036 0x00000000" position 0,0 mode 2560x1440 scale 1.0
|
||||
output "Dell Inc. DELL U2715H GH85D5B90R4S" position 2560,0 mode 2560x1440 scale 1.0
|
||||
}
|
||||
{
|
||||
output "Chimei Innolux Corporation 0x14D3 0x00000000" position 0,0 mode 1920x1080 scale 1
|
||||
}
|
||||
{
|
||||
output "Chimei Innolux Corporation 0x14D3 0x00000000" position 0,0 mode 1920x1080 scale 1
|
||||
output "Dell Inc. DELL U2718Q FN84K83Q1KHL" position 1920,0 mode 3840x2160 scale 1.25
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
168
configurations/sway/launcher.nix
Normal file
168
configurations/sway/launcher.nix
Normal file
|
@ -0,0 +1,168 @@
|
|||
{ pkgs, stdenv }:
|
||||
let
|
||||
pass = import ../../programs/pass/default.nix { inherit pkgs; };
|
||||
gemoji = pkgs.buildRubyGem {
|
||||
pname = "gemoji";
|
||||
gemName = "gemoji";
|
||||
source.sha256 = "1xv38sxql1fmaxi5lzj6v98l2aqhi6bqkhi6kqd0k38vw40l3yqc";
|
||||
type = "gem";
|
||||
version = "4.0.0.rc2";
|
||||
};
|
||||
emoji_list = stdenv.mkDerivation {
|
||||
name = "emoji_list";
|
||||
buildInputs = [ pkgs.ruby gemoji ];
|
||||
unpackPhase = "true";
|
||||
buildPhase = ''
|
||||
cat > extract_emoji.rb <<HERE
|
||||
require 'emoji'
|
||||
File.open('emoji_list.txt', 'w') do |f|
|
||||
Emoji.all.each do |e|
|
||||
f.puts("#{e.raw} #{e.description} #{e.name}#{(" " + e.tags.join(" ")) if e.tags.any?} (#{e.category})")
|
||||
end
|
||||
end
|
||||
HERE
|
||||
ruby extract_emoji.rb
|
||||
'';
|
||||
installPhase = ''
|
||||
cp emoji_list.txt $out
|
||||
'';
|
||||
};
|
||||
in
|
||||
pkgs.writeScriptBin "launcher" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
_sighandler() {
|
||||
kill -INT "$child" 2>/dev/null
|
||||
}
|
||||
|
||||
calc_options() {
|
||||
echo "calc "
|
||||
}
|
||||
|
||||
calc() {
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
${pkgs.libqalculate}/bin/qalc "$1"
|
||||
sleep 5
|
||||
else
|
||||
${pkgs.libqalculate}/bin/qalc
|
||||
fi
|
||||
}
|
||||
|
||||
emoji_options() {
|
||||
cat ${emoji_list} | sed "s/^/emoji /"
|
||||
}
|
||||
|
||||
emoji() {
|
||||
char=$(echo -n "$1" | sed "s/^\([^ ]*\) .*/\1/")
|
||||
${pkgs.sway}/bin/swaymsg exec -- "echo -n $char | ${pkgs.wl-clipboard}/bin/wl-copy --foreground"
|
||||
}
|
||||
|
||||
pass_options(){
|
||||
prefix=''${PASSWORD_STORE_DIR-~/.password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
printf 'pass password %s\n' ''${''${password_files%.gpg}#$prefix/}
|
||||
printf 'pass username %s\n' ''${''${password_files%.gpg}#$prefix/}
|
||||
printf 'pass otp %s\n' ''${''${password_files%.gpg}#$prefix/}
|
||||
printf 'pass edit %s\n' ''${''${password_files%.gpg}#$prefix/}
|
||||
}
|
||||
|
||||
pass() {
|
||||
option=$(echo $1 | sed "s/^\([^ ]*\) .*$/\1/")
|
||||
passfile=$(echo $1 | sed "s/^[^ ]* \(.*$\)/\1/")
|
||||
echo $option
|
||||
echo $passfile
|
||||
case $option in
|
||||
username)
|
||||
swaymsg exec -- "${pass}/bin/pass show '$passfile' | sed -n 's/^Username: *//p' | tr -d '\n' | ${pkgs.wl-clipboard}/bin/wl-copy --foreground"
|
||||
;;
|
||||
password)
|
||||
swaymsg exec -- "${pass}/bin/pass show -c0 '$passfile'"
|
||||
;;
|
||||
otp)
|
||||
swaymsg exec -- "${pass}/bin/pass otp -c '$passfile'"
|
||||
;;
|
||||
edit)
|
||||
${pass}/bin/pass edit "$passfile"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
record_options() {
|
||||
${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[]["name"]' | sed "s/^/record /"
|
||||
echo record select
|
||||
}
|
||||
|
||||
record() {
|
||||
filename="$(${pkgs.xdg-user-dirs}/bin/xdg-user-dir VIDEOS)/$(date +'screenrecording_%y-%m-%d-%H%M%S.mp4')"
|
||||
|
||||
trap _sighandler SIGINT
|
||||
if [[ "$1" = "select" ]]
|
||||
then
|
||||
${pkgs.wf-recorder}/bin/wf-recorder -g "$(${pkgs.slurp}/bin/slurp)" -f "$filename" &
|
||||
else
|
||||
wf-recorder -o $! -f "$filename" &
|
||||
fi
|
||||
child=$!
|
||||
wait "$child"
|
||||
# We wait two times, because the first wait exits when the process receives a signal. The process might have finished though, so we ignore errors.
|
||||
wait "$child" 2>/dev/null
|
||||
if [ -f "$filename" ]
|
||||
then
|
||||
echo "Saved as $filename"
|
||||
else
|
||||
echo "Something went wrong while recording"
|
||||
fi
|
||||
sleep 5
|
||||
}
|
||||
|
||||
run_options() {
|
||||
print -rl -- ''${(ko)commands} | sed "s/^/run /"
|
||||
}
|
||||
|
||||
run() {
|
||||
${pkgs.sway}/bin/swaymsg exec $1
|
||||
}
|
||||
|
||||
ssh_options() {
|
||||
cat $HOME/.ssh/config | grep "^Host [a-zA-Z]\+" | sed "s/Host /ssh /"
|
||||
}
|
||||
|
||||
ssh() {
|
||||
${pkgs.sway}/bin/swaymsg exec "${pkgs.kitty}/bin/kitty -e ssh $1"
|
||||
}
|
||||
|
||||
systemctl_options() {
|
||||
echo systemctl hibernate
|
||||
echo systemctl poweroff
|
||||
echo systemctl reboot
|
||||
echo systemctl suspend
|
||||
}
|
||||
|
||||
tmuxinator_options() {
|
||||
ls ~/.config/tmuxinator | sed "s/\.yml$//" | sed "s/^/tmuxinator /"
|
||||
}
|
||||
|
||||
tmuxinator() {
|
||||
${pkgs.sway}/bin/swaymsg exec "${pkgs.kitty}/bin/kitty -e ${pkgs.tmuxinator}/bin/tmuxinator start $1"
|
||||
}
|
||||
|
||||
windows_options() {
|
||||
${pkgs.sway}/bin/swaymsg -t get_tree | ${pkgs.jq}/bin/jq -r 'recurse(.nodes[]?)|recurse(.floating_nodes[]?)|select(.layout=="none")|select(.app_id!="launcher")|select(.type=="con"),select(.type=="floating_con")|(if .app_id then .app_id else .window_properties.class end)+": "+.name+" ("+(.id|tostring)+")"' | sed "s/^/windows /"
|
||||
}
|
||||
|
||||
windows() {
|
||||
window=$(echo $@ | sed 's/.* (\([^)]*\))$/\1/')
|
||||
${pkgs.sway}/bin/swaymsg \[con_id="$window"\] focus
|
||||
}
|
||||
|
||||
CHOSEN=$(cat <(windows_options) <(tmuxinator_options) <(ssh_options) <(systemctl_options) <(pass_options) <(run_options) <(record_options) <(calc_options) <(emoji_options) | ${pkgs.fzy}/bin/fzy --lines 36 | tail -n1)
|
||||
|
||||
if [ -n "$CHOSEN" ]
|
||||
then
|
||||
PREFIX=$(echo $CHOSEN | sed "s/^\([^ ]*\) .*/\1/g")
|
||||
WORD=$(echo $CHOSEN | sed "s/^[^ ]* \(.*\)/\1/g")
|
||||
|
||||
$PREFIX $WORD
|
||||
fi
|
||||
''
|
38
configurations/sway/screenshot.nix
Normal file
38
configurations/sway/screenshot.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeScriptBin "screenshot" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
while getopts ":rd" opt
|
||||
do
|
||||
case "''${opt}" in
|
||||
r)
|
||||
remote=true
|
||||
;;
|
||||
d)
|
||||
delay=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
dims="$(${pkgs.slurp}/bin/slurp)"
|
||||
|
||||
if [[ -n "$delay" ]]
|
||||
then
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
if [[ -n "$remote" ]]
|
||||
then
|
||||
name=$(${pkgs.utillinux}/bin/uuidgen).png
|
||||
${pkgs.grim}/bin/grim -t png -g "$dims" - | ${pkgs.openssh}/bin/ssh sunspear "cat > /usr/share/nginx/html/screenshots/$name"
|
||||
path="https://cvpetegem.be/screenshots/$name"
|
||||
else
|
||||
name=$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
|
||||
path="$(${pkgs.xdg-user-dirs}/bin/xdg-user-dir PICTURES)/$name"
|
||||
${pkgs.grim}/bin/grim -g "$dims" "$path"
|
||||
fi
|
||||
|
||||
${pkgs.sway}/bin/swaymsg exec -- "echo -n '$path' | ${pkgs.wl-clipboard}/bin/wl-copy --foreground"
|
||||
${pkgs.libnotify}/bin/notify-send "Screenshot taken" "$path"
|
||||
''
|
85
configurations/sway/status-configuration.nix
Normal file
85
configurations/sway/status-configuration.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
mic-status = pkgs.writeScript "mic-status" ''
|
||||
#!${pkgs.zsh}/bin/zsh
|
||||
|
||||
if [ "$(${pkgs.pulseaudio}/bin/pactl list sources | grep -o 'Mute: yes')" = "Mute: yes" ]
|
||||
then
|
||||
echo -e '\uf131'
|
||||
else
|
||||
echo -e '\uf130'
|
||||
fi
|
||||
'';
|
||||
in
|
||||
pkgs.writeText "configuration.toml" ''
|
||||
[theme]
|
||||
name = "gruvbox-light"
|
||||
[theme.overrides]
|
||||
idle_bg="#fbffff"
|
||||
idle_fg="#535c65"
|
||||
info_bg="#2b7ab2"
|
||||
info_fg="#fbffff"
|
||||
good_bg="#2b7ab2"
|
||||
good_fg="#fbffff"
|
||||
warning_bg="#2b7ab2"
|
||||
warning_fg="#fbffff"
|
||||
critical_bg="#2b7ab2"
|
||||
critical_fg="#fbffff"
|
||||
separator=""
|
||||
|
||||
[icons]
|
||||
name = "awesome"
|
||||
|
||||
[[block]]
|
||||
block = "focused_window"
|
||||
max_width = 100
|
||||
|
||||
[[block]]
|
||||
block = "net"
|
||||
device = "wlp2s0"
|
||||
ssid = true
|
||||
signal_strength = true
|
||||
speed_up = false
|
||||
speed_down = false
|
||||
hide_missing = true
|
||||
hide_inactive = true
|
||||
|
||||
[[block]]
|
||||
block = "net"
|
||||
device = "wlp0s20f3"
|
||||
ssid = true
|
||||
signal_strength = false
|
||||
speed_up = false
|
||||
speed_down = false
|
||||
hide_missing = true
|
||||
hide_inactive = true
|
||||
|
||||
[[block]]
|
||||
block = "net"
|
||||
device = "enp0s31f6"
|
||||
ip = true
|
||||
speed_up = false
|
||||
speed_down = false
|
||||
hide_missing = true
|
||||
hide_inactive = true
|
||||
|
||||
[[block]]
|
||||
block = "battery"
|
||||
|
||||
[[block]]
|
||||
block = "backlight"
|
||||
|
||||
[[block]]
|
||||
block = "sound"
|
||||
|
||||
[[block]]
|
||||
block = "custom"
|
||||
command = "${mic-status}"
|
||||
interval = 1
|
||||
on_click = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
|
||||
[[block]]
|
||||
block = "time"
|
||||
interval = 1
|
||||
format = "%a %d/%m %H:%M:%S"
|
||||
''
|
7
configurations/syncthing/default.nix
Normal file
7
configurations/syncthing/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
services.syncthing.enable = true;
|
||||
};
|
||||
}
|
42
configurations/tmux/accentor.yml
Normal file
42
configurations/tmux/accentor.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: accentor
|
||||
project_root: "/home/charlotte/repos/accentor"
|
||||
windows:
|
||||
- api:
|
||||
root: "/home/charlotte/repos/accentor/api"
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- nvim
|
||||
- git status
|
||||
- web:
|
||||
root: "/home/charlotte/repos/accentor/web"
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- nvim
|
||||
- git status
|
||||
- android:
|
||||
root: "/home/charlotte/repos/accentor/android"
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- nvim
|
||||
- git status
|
||||
- desktop:
|
||||
root: "/home/charlotte/repos/accentor/desktop"
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- nvim
|
||||
- git status
|
||||
- run:
|
||||
layout: even-horizontal
|
||||
panes:
|
||||
- rails:
|
||||
- cd api
|
||||
- bundle exec rails s
|
||||
- delayed_job:
|
||||
- cd api
|
||||
- bundle exec rails jobs:work
|
||||
- vue:
|
||||
- cd web
|
||||
- yarn run serve
|
||||
- postgres:
|
||||
- cd api
|
||||
- start-db
|
24
configurations/tmux/default.nix
Normal file
24
configurations/tmux/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
extraConfig = ''
|
||||
bind q kill-session
|
||||
bind v run-shell "tmux setw main-pane-width $(($(tmux display -p '#{window_width}') * 70 / 100)); tmux select-layout main-vertical"
|
||||
bind h run-shell "tmux setw main-pane-height $(($(tmux display -p '#{window_height}') * 70 / 100)); tmux select-layout main-horizontal"
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
set -sg escape-time 10
|
||||
'';
|
||||
keyMode = "vi";
|
||||
tmuxinator.enable = true;
|
||||
};
|
||||
xdg.configFile = {
|
||||
"tmuxinator/accentor.yml".source = ./accentor.yml;
|
||||
"tmuxinator/dodona.yml".source = ./dodona.yml;
|
||||
};
|
||||
};
|
||||
}
|
55
configurations/tmux/dodona.yml
Normal file
55
configurations/tmux/dodona.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
# /home/charlotte/.config/tmuxinator/dodona.yml
|
||||
|
||||
name: dodona
|
||||
root: ~/repos/dodona/dodona
|
||||
|
||||
# Optional tmux socket
|
||||
# socket_name: foo
|
||||
|
||||
# Note that the pre and post options have been deprecated and will be replaced by
|
||||
# project hooks.
|
||||
|
||||
# Project hooks
|
||||
# Runs on project start, always
|
||||
# on_project_start: command
|
||||
# Run on project start, the first time
|
||||
# on_project_first_start: command
|
||||
# Run on project start, after the first time
|
||||
# on_project_restart: command
|
||||
# Run on project exit ( detaching from tmux session )
|
||||
# on_project_exit: command
|
||||
# Run on project stop
|
||||
# on_project_stop: command
|
||||
|
||||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
|
||||
# pre_window: rbenv shell 2.0.0-p247
|
||||
|
||||
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
|
||||
# tmux_options: -f ~/.tmux.mac.conf
|
||||
|
||||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
|
||||
# tmux_command: byobu
|
||||
|
||||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
|
||||
# startup_window: editor
|
||||
|
||||
# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used.
|
||||
# startup_pane: 1
|
||||
|
||||
# Controls whether the tmux session should be attached to automatically. Defaults to true.
|
||||
# attach: false
|
||||
|
||||
windows:
|
||||
- editor:
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- nvim
|
||||
- git status
|
||||
- server:
|
||||
layout: even-horizontal
|
||||
panes:
|
||||
- bundle exec rails s
|
||||
- bundle exec rails jobs:work
|
||||
- ./bin/webpack-dev-server
|
||||
- logs: tail -f log/development.log
|
||||
- db: start-db
|
56
configurations/zsh/default.nix
Normal file
56
configurations/zsh/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.command-not-found.enable = true;
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.autojump ];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
autocd = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
path = "\$HOME/.config/zsh/zsh_history";
|
||||
};
|
||||
initExtra = ''
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin
|
||||
'';
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"autojump"
|
||||
"command-not-found"
|
||||
"common-aliases"
|
||||
"extract"
|
||||
"history-substring-search"
|
||||
"git"
|
||||
"sudo"
|
||||
"systemd"
|
||||
"tmux"
|
||||
];
|
||||
theme = "agnoster";
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.7.1";
|
||||
sha256 = "03r6hpb5fy4yaakqm3lbf4xcvd408r44jgpv4lnzl9asp4sb9qc0";
|
||||
};
|
||||
}
|
||||
];
|
||||
sessionVariables = {
|
||||
DEFAULT_USER = "charlotte";
|
||||
EDITOR = "nvim";
|
||||
PASSWORD_STORE_DIR = "$HOME/repos/passwords";
|
||||
};
|
||||
shellAliases = {
|
||||
upgrade = "sudo nix-channel --update && sudo nixos-rebuild switch";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue