Merge branch 'zenix/hm-cosmic' into nixbook/cosmic

This commit is contained in:
tristan 2024-10-15 19:48:13 +01:00
commit 70e6d7ced5
12 changed files with 199 additions and 34 deletions

View file

@ -0,0 +1,85 @@
{
pkgs,
config,
...
}: let
inherit (config.lib.cosmic) Actions;
in {
programs.cosmic = {
enable = true;
input.asDefaults = true;
input.binds = {
# Navigation
Super. "h" = Actions.Focus "Left";
Super. "l" = Actions.Focus "Right";
Super. "j" = Actions.Focus "Down";
Super. "k" = Actions.Focus "Up";
Super.Shift. "h" = Actions.Move "Left";
Super.Shift. "l" = Actions.Move "Right";
Super.Shift. "j" = Actions.Move "Down";
Super.Shift. "k" = Actions.Move "Up";
Super. "1" = Actions.Workspace 1;
Super. "2" = Actions.Workspace 2;
Super. "3" = Actions.Workspace 3;
Super. "4" = Actions.Workspace 4;
Super. "5" = Actions.Workspace 5;
Super.Shift. "1" = Actions.MoveToWorkspace 1;
Super.Shift. "2" = Actions.MoveToWorkspace 2;
Super.Shift. "3" = Actions.MoveToWorkspace 3;
Super.Shift. "4" = Actions.MoveToWorkspace 4;
Super.Shift. "5" = Actions.MoveToWorkspace 5;
Super. "Space" = Actions.ToggleWindowFloating;
Super. "f" = Actions.Maximize;
Super. "m" = Actions.Minimize;
Super.Shift. "x" = Actions.Close;
Super.Shift. "v" = Actions.ToggleStacking;
Super.Shift. "y" = Actions.ToggleSticky;
# System
Super. "d" = Actions.Spawn config.programs.menu.drunCommand;
Super. "Return" = Actions.Spawn pkgs.alacritty;
Super. "o" = Actions.System "HomeFolder";
Super.Shift. "s" = Actions.System "Screenshot";
};
background = {
displays = {
all = {
source = ../../../images/nier2.jpg;
};
};
};
panels = {
"Bar" = {
applets = {
start = [
"com.system76.CosmicAppletWorkspaces"
];
center = [
"com.system76.CosmicAppletMinimize"
];
end = [
"com.system76.CosmicAppletTime"
"com.system76.CosmicAppletTiling"
"com.system76.CosmicAppletAudio"
"com.system76.CosmicAppletNetwork"
"com.system76.CosmicAppletNotifications"
"com.system76.CosmicAppletStatusArea"
"com.system76.CosmicAppletPower"
];
};
options = {
size = "XS";
border_radius = 0;
};
};
};
settings = {
"com.system76.CosmicComp".options = {
autotile = true;
active_hint = true;
focus_follows_cursor = true;
focus_follows_cursor_delay = 0;
cursor_follows_focus = true;
};
};
};
}

View file

@ -9,11 +9,18 @@
bclone = "!sh ${pkgs.writeShellScriptBin "bare-clone" ''
url=$1
basename=''${url##*/}
name=''${2:-''${basename%.*}}
if [[ $2 == -* ]]
then
opts=''${@:2}
name=''${basename%.*}
else
opts=''${@:3}
name=''${2:-''${basename%.*}}
fi
mkdir "$name"
git clone --bare "$url" "$name/.bare" || {
git clone --bare "$url" "$name/.bare" $opts || {
rm -r "$name"
exit 1
}
@ -23,7 +30,7 @@
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git fetch origin $opts
''}/bin/bare-clone";
};
difftastic = {

View file

@ -9,11 +9,10 @@
# system
selectdefaultapplication
easyeffects
pavucontrol
pwvucontrol
helvum
# tools
obs-studio
inkscape
libsForQt5.okular
gimp
@ -31,6 +30,14 @@
bitwarden
];
programs.obs-studio = {
enable = true;
plugins = [
pkgs.obs-studio-plugins.wlrobs
pkgs.obs-studio-plugins.obs-pipewire-audio-capture
];
};
xdg.mimeApps.defaultApplications = {
"application/pdf" = "sioyek.desktop";
};
@ -46,6 +53,4 @@
"file:///home/tristan/Downloads"
];
};
programs.librewolf.enable = true;
}

View file

@ -37,6 +37,7 @@ in {
R = "drag";
"<f-2>" = ":rename";
"<enter>" = "open-with";
"<f-5>" = ":reload";
};
programs.lf.extraConfig = ''
set sixel true

View file

@ -37,6 +37,7 @@
programs.rbw.settings.pinentry = pkgs.pinentry-gnome3;
# https://docs.pipewire.org/page_module_raop_discover.html
xdg.configFile."pipewire/pipewire.conf.d/raop-discover.conf".text = ''
context.modules = [
{
@ -45,6 +46,30 @@
}
]
'';
xdg.configFile."pipewire/pipewire.conf.d/raop-sink.conf".text = ''
context.modules = [
{ name = libpipewire-module-raop-sink
args = {
# Set the remote address to tunnel to
raop.ip = "127.0.0.1"
raop.port = 8190
raop.name = "my-raop-device"
raop.hostname = "My Service"
#raop.transport = "udp"
raop.encryption.type = "RSA"
#raop.audio.codec = "PCM"
#raop.password = "****"
#audio.format = "S16"
#audio.rate = 44100
#audio.channels = 2
#audio.position = [ FL FR ]
stream.props = {
# extra sink properties
}
}
}
]
'';
services.gnome-keyring.enable = true;
}