update
This commit is contained in:
parent
c131ce4037
commit
90d81d4185
|
@ -12,7 +12,8 @@
|
||||||
|
|
||||||
kernel.sysctl."vm.max_map_count" = 16777216; #Star Citizen crash fix
|
kernel.sysctl."vm.max_map_count" = 16777216; #Star Citizen crash fix
|
||||||
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
#kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
supportedFilesystems = [ "bcachefs" ];
|
||||||
kernelModules = [ "i2c-dev" "i2c-piix4" ];
|
kernelModules = [ "i2c-dev" "i2c-piix4" ];
|
||||||
kernelParams =
|
kernelParams =
|
||||||
[
|
[
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
loader = {
|
loader = {
|
||||||
efi = {
|
efi = {
|
||||||
canTouchEfiVariables = true;
|
canTouchEfiVariables = true;
|
||||||
efiSysMountPoint = "/boot/efi";
|
efiSysMountPoint = "/boot";
|
||||||
};
|
};
|
||||||
|
|
||||||
grub = {
|
grub = {
|
||||||
|
|
|
@ -8,41 +8,32 @@
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "bcache" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/f2c5e4e6-b94c-496a-90ef-0f77b8e5c645";
|
{ device = "/dev/nvme1n1p2";
|
||||||
fsType = "btrfs";
|
fsType = "bcachefs";
|
||||||
options = [ "subvol=@nixos" "compress-force=zstd" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/BE4D-EFA9";
|
{ device = "/dev/disk/by-uuid/BE4D-EFA9";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/btrfs" =
|
|
||||||
{ device = "/dev/disk/by-uuid/f2c5e4e6-b94c-496a-90ef-0f77b8e5c645";
|
|
||||||
fsType = "btrfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/mnt/hdd" =
|
fileSystems."/mnt/hdd" =
|
||||||
{ device = "/dev/disk/by-uuid/ecbbfb05-ada8-4044-81a6-9a280f93802f";
|
{ device = "/dev/disk/by-uuid/ecbbfb05-ada8-4044-81a6-9a280f93802f";
|
||||||
fsType = "xfs";
|
fsType = "xfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
{ device = "/dev/disk/by-uuid/4dd7a8ea-311a-458b-8839-1d92c7abab1f";
|
{ device = "/dev/disk/by-uuid/4af74e31-5ec6-4244-bb1e-192df0b8a175";
|
||||||
fsType = "xfs";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ {
|
swapDevices = [ ];
|
||||||
device = "/var/lib/swapfile";
|
|
||||||
size = 16*1024;
|
|
||||||
} ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
vim.opt.list = true
|
||||||
|
vim.opt.listchars:append "eol:↴"
|
||||||
|
|
||||||
|
require("indent_blankline").setup {
|
||||||
|
show_end_of_line = true,
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ require("plugins.colorizer")
|
||||||
require("plugins.colorscheme")
|
require("plugins.colorscheme")
|
||||||
require("plugins.comment")
|
require("plugins.comment")
|
||||||
require("plugins.dressing")
|
require("plugins.dressing")
|
||||||
|
require("plugins.indent-blankline")
|
||||||
require("plugins.lspconfig")
|
require("plugins.lspconfig")
|
||||||
require("plugins.lualine")
|
require("plugins.lualine")
|
||||||
require("plugins.smartsplits")
|
require("plugins.smartsplits")
|
||||||
|
|
|
@ -2,8 +2,8 @@ vim.g.mapleader = " "
|
||||||
|
|
||||||
-- 4 space tabs
|
-- 4 space tabs
|
||||||
vim.o.expandtab = true
|
vim.o.expandtab = true
|
||||||
vim.o.shiftwidth = 2
|
vim.o.shiftwidth = 4
|
||||||
vim.o.tabstop = 2
|
vim.o.tabstop = 4
|
||||||
vim.o.smartindent = true
|
vim.o.smartindent = true
|
||||||
|
|
||||||
vim.o.background = "dark"
|
vim.o.background = "dark"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
gruvbox-nvim
|
gruvbox-nvim
|
||||||
comment-nvim
|
comment-nvim
|
||||||
dressing-nvim
|
dressing-nvim
|
||||||
|
indent-blankline-nvim
|
||||||
lualine-nvim
|
lualine-nvim
|
||||||
luasnip
|
luasnip
|
||||||
neo-tree-nvim
|
neo-tree-nvim
|
||||||
|
|
|
@ -1,114 +1,183 @@
|
||||||
const { Widget } = ags.Widget;
|
const { Mpris, Hyprland, SystemTray, Audio } = ags.Service;
|
||||||
const { Mpris, Hyprland, SystemTray } = ags.Service;
|
|
||||||
const { execAsync } = ags.Utils;
|
const { execAsync } = ags.Utils;
|
||||||
const { Box, Button, Label, Icon, CenterBox, Window } = Widget;
|
const { Box, Button, Label, Icon, CenterBox, Stack, Window } = ags.Widget;
|
||||||
|
|
||||||
const Workspaces = (monitor) => Box({
|
const Workspaces = (monitor) => Box({
|
||||||
className: 'workspaces',
|
className: 'workspaces',
|
||||||
connections: [[Hyprland, box => {
|
connections: [[Hyprland, box => {
|
||||||
if (monitor == 0) {
|
if (monitor == 0) {
|
||||||
box.children = [1,2,3].map(i => Button({
|
box.children = [1,2,3].map(i => Button({
|
||||||
onClicked: () => execAsync(`hyprctl dispatch workspace ${i}`),
|
onClicked: () => execAsync(`hyprctl dispatch workspace ${i}`),
|
||||||
child: Label({ label: `${i}` }),
|
onScrollUp: () => execAsync(`hyprctl dispatch workspace +1`),
|
||||||
className: Hyprland.active.workspace.id == i ? 'focused' : '',
|
onScrollDown: () => execAsync(`hyprctl dispatch workspace -1`),
|
||||||
}));
|
child: Label({ label: `${i}` }),
|
||||||
} else if (monitor == 1) {
|
className: Hyprland.active.workspace.id == i ? 'focused' : '',
|
||||||
box.children = [4,5,6].map(i => Button({
|
}));
|
||||||
onClicked: () => execAsync(`hyprctl dispatch workspace ${i}`),
|
} else if (monitor == 1) {
|
||||||
child: Label({ label: `${i}` }),
|
box.children = [4,5,6].map(i => Button({
|
||||||
className: Hyprland.active.workspace.id == i ? 'focused' : '',
|
onClicked: () => execAsync(`hyprctl dispatch workspace ${i}`),
|
||||||
}));
|
onScrollUp: () => execAsync(`hyprctl dispatch workspace +1`),
|
||||||
}
|
onScrollDown: () => execAsync(`hyprctl dispatch workspace -1`),
|
||||||
}]],
|
child: Label({ label: `${i}` }),
|
||||||
|
className: Hyprland.active.workspace.id == i ? 'focused' : '',
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}]],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const WindowTitle = () => Label({
|
const WindowTitle = () => Label({
|
||||||
connections: [[Hyprland, label => {
|
connections: [[Hyprland, label => {
|
||||||
label.label = Hyprland.active.client.title || '';
|
label.label = Hyprland.active.client.title || '';
|
||||||
label.toggleClassName('windowTitle', label.label);
|
label.toggleClassName('windowTitle', label.label);
|
||||||
}]],
|
}]],
|
||||||
|
});
|
||||||
|
|
||||||
|
const Volume = () => Button({
|
||||||
|
className: 'volume',
|
||||||
|
onScrollUp: () => execAsync('pamixer -i 10'),
|
||||||
|
onScrollDown: () => execAsync('pamixer -d 10'),
|
||||||
|
child: Box({
|
||||||
|
children: [
|
||||||
|
Stack({
|
||||||
|
items: [
|
||||||
|
// tuples of [string, Widget]
|
||||||
|
['101', Icon('audio-volume-overamplified-symbolic')],
|
||||||
|
['67', Icon('audio-volume-high-symbolic')],
|
||||||
|
['34', Icon('audio-volume-medium-symbolic')],
|
||||||
|
['1', Icon('audio-volume-low-symbolic')],
|
||||||
|
['0', Icon('audio-volume-muted-symbolic')],
|
||||||
|
],
|
||||||
|
connections: [[Audio, stack => {
|
||||||
|
if (!Audio.speaker)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Audio.speaker.isMuted) {
|
||||||
|
stack.shown = '0';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const show = [101, 67, 34, 1, 0].find(
|
||||||
|
threshold => threshold <= Audio.speaker.volume * 100);
|
||||||
|
|
||||||
|
stack.shown = `${show}`;
|
||||||
|
}, 'speaker-changed']],
|
||||||
|
}),
|
||||||
|
|
||||||
|
Label({
|
||||||
|
connections: [[Audio, label => {
|
||||||
|
label.label = ` ${Math.ceil((Audio.speaker.volume * 100) / 10) * 10}%`; // round up to nearest 10
|
||||||
|
}, 'speaker-changed' ]],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const Media = () => Button({
|
const Media = () => Button({
|
||||||
className: 'media',
|
className: 'media',
|
||||||
onPrimaryClick: () => Mpris.getPlayer('mpd')?.playPause(),
|
onPrimaryClick: () => Mpris.getPlayer('mpd')?.playPause(),
|
||||||
onScrollUp: () => Mpris.getPlayer('mpd')?.previous(),
|
onScrollUp: () => Mpris.getPlayer('mpd')?.previous(),
|
||||||
onScrollDown: () => Mpris.getPlayer('mpd')?.next(),
|
onScrollDown: () => Mpris.getPlayer('mpd')?.next(),
|
||||||
child: Label({
|
|
||||||
connections: [[Mpris, label => {
|
child: Box({
|
||||||
const mpris = Mpris.getPlayer('mpd');
|
children: [
|
||||||
if (!mpris || mpris.playBackStatus == "Stopped")
|
Stack({
|
||||||
label.label = ' Stopped';
|
items: [
|
||||||
else
|
['paused', Icon('media-playback-pause-symbolic')],
|
||||||
label.label = `${mpris.playBackStatus == 'Playing' ? ' ' : ' '}${mpris.trackArtists.join(', ')} - ${mpris.trackTitle}`;
|
['playing', Icon('media-playback-start-symbolic')],
|
||||||
}]],
|
['stopped', Icon('media-playback-stop-symbolic')],
|
||||||
}),
|
],
|
||||||
});
|
|
||||||
|
connections: [[Mpris, stack => {
|
||||||
|
const mpris = Mpris.getPlayer('mpd');
|
||||||
|
if (mpris.playBackStatus == 'Playing')
|
||||||
|
stack.shown = 'playing';
|
||||||
|
else if (mpris.playBackStatus == 'Paused')
|
||||||
|
stack.shown = 'paused';
|
||||||
|
else
|
||||||
|
stack.shown = 'stopped';
|
||||||
|
}]],
|
||||||
|
}),
|
||||||
|
|
||||||
|
Label({
|
||||||
|
connections: [[Mpris, label => {
|
||||||
|
const mpris = Mpris.getPlayer('mpd');
|
||||||
|
if (!mpris || mpris.playBackStatus == "Stopped")
|
||||||
|
label.label = ' Stopped';
|
||||||
|
else
|
||||||
|
label.label = ` ${mpris.trackArtists.join(', ')} - ${mpris.trackTitle}`;
|
||||||
|
}]],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
const SysTray = () => Box({
|
const SysTray = () => Box({
|
||||||
className: 'tray',
|
className: 'tray',
|
||||||
connections: [[SystemTray, box => {
|
connections: [[SystemTray, box => {
|
||||||
box.children = SystemTray.items.map(item => Button({
|
box.children = SystemTray.items.map(item => Button({
|
||||||
className: 'tray-icon',
|
className: 'tray-icon',
|
||||||
child: Icon(),
|
child: Icon(),
|
||||||
onPrimaryClick: (_, event) => item.activate(event),
|
onPrimaryClick: (_, event) => item.activate(event),
|
||||||
onSecondaryClick: (_, event) => item.openMenu(event),
|
onSecondaryClick: (_, event) => item.openMenu(event),
|
||||||
connections: [[item, button => {
|
connections: [[item, button => {
|
||||||
button.child.icon = item.icon;
|
button.child.icon = item.icon;
|
||||||
button.tooltipMarkup = item.tooltipMarkup;
|
button.tooltipMarkup = item.tooltipMarkup;
|
||||||
}]],
|
}]],
|
||||||
}));
|
}));
|
||||||
}]],
|
}]],
|
||||||
});
|
});
|
||||||
|
|
||||||
const Clock = () => Box({
|
const Clock = () => Box({
|
||||||
className: 'date',
|
className: 'date',
|
||||||
children: [
|
children: [
|
||||||
Label({
|
Icon({
|
||||||
label: ' ',
|
icon: 'x-office-calendar-symbolic',
|
||||||
}),
|
}),
|
||||||
Label({
|
|
||||||
connections: [
|
Label({
|
||||||
[1000, label => execAsync(['date', '+%a %d, %B %H:%M'])
|
connections: [
|
||||||
.then(date => label.label = date).catch(console.error)],
|
[1000, label => execAsync(['date', '+%a %d, %B %H:%M'])
|
||||||
],
|
.then(date => label.label = ' ' + date).catch(console.error)],
|
||||||
}),
|
],
|
||||||
],
|
}),
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const Left = (monitor) => Box({
|
const Left = (monitor) => Box({
|
||||||
children: [
|
children: [
|
||||||
Workspaces(monitor),
|
Workspaces(monitor),
|
||||||
WindowTitle(),
|
WindowTitle(),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const Center = () => Box({
|
const Center = () => Box({
|
||||||
children: [
|
children: [
|
||||||
Media(),
|
Volume(),
|
||||||
],
|
Media(),
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const Right = () => Box({
|
const Right = () => Box({
|
||||||
halign: 'end',
|
halign: 'end',
|
||||||
children: [
|
children: [
|
||||||
Clock(),
|
Clock(),
|
||||||
SysTray(),
|
SysTray(),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const Bar = ({ monitor } = {}) => Window({
|
const Bar = ({ monitor } = {}) => Window({
|
||||||
name: `bar-${monitor}`, // name has to be unique
|
name: `bar-${monitor}`, // name has to be unique
|
||||||
className: 'bar',
|
className: 'bar',
|
||||||
monitor,
|
monitor,
|
||||||
anchor: ['top', 'left', 'right'],
|
anchor: ['top', 'left', 'right'],
|
||||||
exclusive: true,
|
exclusive: true,
|
||||||
child: CenterBox({
|
child: CenterBox({
|
||||||
startWidget: Left(`${monitor}`),
|
startWidget: Left(`${monitor}`),
|
||||||
centerWidget: Center(),
|
centerWidget: Center(),
|
||||||
endWidget: Right(),
|
endWidget: Right(),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
const scss = ags.App.configDir + '/style.scss';
|
const scss = ags.App.configDir + '/style.scss';
|
||||||
|
@ -116,9 +185,9 @@ const css = '/tmp/style-ags.css';
|
||||||
ags.Utils.exec(`sassc ${scss} ${css}`);
|
ags.Utils.exec(`sassc ${scss} ${css}`);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
style: css,
|
style: css,
|
||||||
windows: [
|
windows: [
|
||||||
Bar({monitor: 0}),
|
Bar({monitor: 0}),
|
||||||
Bar({monitor: 1}),
|
Bar({monitor: 1}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,8 +33,16 @@ $box-bg: rgb(80,73,69);
|
||||||
}
|
}
|
||||||
|
|
||||||
.workspaces button.focused {
|
.workspaces button.focused {
|
||||||
background-color: $activewsbg;
|
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
|
background-color: $activewsbg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces button:first-child {
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces button:last-child {
|
||||||
|
border-radius: 0px 10px 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.windowTitle {
|
.windowTitle {
|
||||||
|
@ -44,6 +52,13 @@ $box-bg: rgb(80,73,69);
|
||||||
margin: 5px 0px 5px 10px;
|
margin: 5px 0px 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.volume {
|
||||||
|
background-color: $box-bg;
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
margin: 5px 5px 5px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.media {
|
.media {
|
||||||
background-color: $box-bg;
|
background-color: $box-bg;
|
||||||
border-radius: 0px 10px 10px 0px;
|
border-radius: 0px 10px 10px 0px;
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
pavucontrol
|
pavucontrol
|
||||||
playerctl
|
playerctl
|
||||||
protontricks
|
protontricks
|
||||||
|
pulsemixer
|
||||||
qbittorrent
|
qbittorrent
|
||||||
qt5ct
|
qt5ct
|
||||||
samba
|
samba
|
||||||
|
|
Reference in New Issue