Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
074dff48ca |
@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
FILE=/sys/class/backlight/amdgpu_bl1/brightness
|
|
||||||
if ! ( test -w "$FILE" ); then
|
|
||||||
xterm +cm -cr RED -bg BLACK -selbg WHITE -selfg BLACK -fg WHITE -fa Monospace -fs 14 -e "sudo chmod 777 $FILE"
|
|
||||||
fi
|
|
||||||
new=$(cat $FILE)
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" = "up" ]; then
|
|
||||||
new=$((new + 13))
|
|
||||||
elif [ "$1" = "down" ];then
|
|
||||||
new=$((new - 13))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $new -gt 255 ]; then
|
|
||||||
new=255
|
|
||||||
elif [ $new -lt 0 ]; then
|
|
||||||
new=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $new > $FILE
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
unison /home/tom/Desktop ssh://tom@tmoron.fr:1880//home/tom/Desktop_sync/Desktop $@
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
xtrlock&
|
|
||||||
systemctl hibernate
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
if [ "$1" = "up" ]; then
|
|
||||||
asusctl -n
|
|
||||||
elif [ "$1" = "down" ];then
|
|
||||||
asusctl -p
|
|
||||||
fi
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
until sudo iwctl station wlan0 show | grep iPhone > /dev/null;do
|
|
||||||
sudo iwctl station wlan0 scan 2>&1 > /dev/null
|
|
||||||
done
|
|
@ -6,7 +6,7 @@
|
|||||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
|
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
|
||||||
# Updated: 2025/09/05 19:55:21 by tomoron ### ########.fr #
|
# Updated: 2025/09/17 18:18:51 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -72,8 +72,8 @@
|
|||||||
vi = "nvim";
|
vi = "nvim";
|
||||||
hl = "Hyprland";
|
hl = "Hyprland";
|
||||||
clr = "clear";
|
clr = "clear";
|
||||||
tagueule = "asusctl profile -P Quiet";
|
# tagueule = "asusctl profile -P Quiet";
|
||||||
parle = "asusctl profile -P performance";
|
# parle = "asusctl profile -P performance";
|
||||||
noidle = "systemctl --user stop hypridle";
|
noidle = "systemctl --user stop hypridle";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -98,7 +98,6 @@
|
|||||||
ref = "master";
|
ref = "master";
|
||||||
}}/themes";
|
}}/themes";
|
||||||
|
|
||||||
# ".local/bin/desk_sync".source = dotfiles/local/bin/desk_sync;
|
|
||||||
};
|
};
|
||||||
services.dunst.enable = true;
|
services.dunst.enable = true;
|
||||||
|
|
||||||
|
@ -41,5 +41,77 @@
|
|||||||
localsend
|
localsend
|
||||||
];
|
];
|
||||||
|
|
||||||
#mods.sync.syncedAdditions = ["VirtualBox VMs"];
|
# programs.superfile = {
|
||||||
|
# enable = true;
|
||||||
|
# hotkeys = {
|
||||||
|
# # global
|
||||||
|
# confirm = ["enter" ""];
|
||||||
|
# quit = ["ctrl+c" ""];
|
||||||
|
#
|
||||||
|
# # movement
|
||||||
|
# list_up = ["k" ""];
|
||||||
|
# list_down = ["j" ""];
|
||||||
|
# page_up = ["pgup"""];
|
||||||
|
# page_down = ["pgdown"""];
|
||||||
|
#
|
||||||
|
# # file panel control
|
||||||
|
# create_new_file_panel = ["n" ""];
|
||||||
|
# close_file_panel = ["q" ""];
|
||||||
|
# next_file_panel = ["tab" ""];
|
||||||
|
# previous_file_panel = ["shift+tab" ""];
|
||||||
|
# toggle_file_preview_panel = ["f" ""];
|
||||||
|
# open_sort_options_menu = ["o" ""];
|
||||||
|
# toggle_reverse_sort = ["R" ""];
|
||||||
|
#
|
||||||
|
# # change focus
|
||||||
|
# focus_on_process_bar = ["ctrl+p" ""];
|
||||||
|
# focus_on_sidebar = ["ctrl+s" ""];
|
||||||
|
# focus_on_metadata = ["ctrl+d" ""];
|
||||||
|
#
|
||||||
|
# # create file/directory and rename
|
||||||
|
# file_panel_item_create = ["a" ""];
|
||||||
|
# file_panel_item_rename = ["r" ""];
|
||||||
|
#
|
||||||
|
# # file operations
|
||||||
|
# copy_items = ["y" ""];
|
||||||
|
# cut_items = ["x" ""];
|
||||||
|
# paste_items = ["p" ""];
|
||||||
|
# delete_items = ["d" ""];
|
||||||
|
#
|
||||||
|
# # compress and extract
|
||||||
|
# extract_file = ["ctrl+e" ""];
|
||||||
|
# compress_file = ["ctrl+a" ""];
|
||||||
|
#
|
||||||
|
# # editor
|
||||||
|
# open_file_with_editor = ["e" ""];
|
||||||
|
# open_current_directory_with_editor = ["E" ""];
|
||||||
|
#
|
||||||
|
# # other
|
||||||
|
# pinned_directory = ["P" ""];
|
||||||
|
# toggle_dot_file = ["." ""];
|
||||||
|
# change_panel_mode = ["m" ""];
|
||||||
|
# open_help_menu = ["?" ""];
|
||||||
|
# open_command_line = [":" ""];
|
||||||
|
# copy_path = ["Y" ""];
|
||||||
|
# copy_present_working_directory = ["c" ""];
|
||||||
|
# toggle_footer = ["ctrl+f" ""];
|
||||||
|
#
|
||||||
|
# # Typing hotkeys (can conflict with all hotkeys)
|
||||||
|
# confirm_typing = ["enter" ""];
|
||||||
|
# cancel_typing = ["esc" ""];
|
||||||
|
#
|
||||||
|
# # =================================================================================================
|
||||||
|
# # Normal mode hotkeys (can conflict with other modes cannot conflict with global hotkeys)
|
||||||
|
# parent_directory = ["-" ""];
|
||||||
|
# search_bar = ["/" ""];
|
||||||
|
#
|
||||||
|
# # =================================================================================================
|
||||||
|
# # Select mode hotkeys (can conflict with other modes cannot conflict with global hotkeys)
|
||||||
|
# file_panel_select_mode_items_select_down = ["J" ""];
|
||||||
|
# file_panel_select_mode_items_select_up = ["K" ""];
|
||||||
|
# file_panel_select_all_items = ["A" ""];
|
||||||
|
#
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.mods.hyprland.enable {
|
config = lib.mkIf config.mods.hyprland.enable {
|
||||||
|
wayland.windowManager.hyprland.systemd.variables = [ "--all" ];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.enable = true;
|
wayland.windowManager.hyprland.enable = true;
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
@ -144,12 +145,12 @@
|
|||||||
color = "rgba(1a1a1aee)";
|
color = "rgba(1a1a1aee)";
|
||||||
};
|
};
|
||||||
|
|
||||||
blur = {
|
#blur = {
|
||||||
enabled = true;
|
# enabled = true;
|
||||||
size = 3;
|
# size = 3;
|
||||||
passes = 1;
|
# passes = 1;
|
||||||
vibrancy = 0.1696;
|
# vibrancy = 0.1696;
|
||||||
};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2025/09/06 00:56:57 by tomoron #+# #+# #
|
# Created: 2025/09/06 00:56:57 by tomoron #+# #+# #
|
||||||
# Updated: 2025/09/06 01:11:42 by tomoron ### ########.fr #
|
# Updated: 2025/09/17 18:46:28 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
boot.blacklistedKernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" ]; #speeds up startup
|
boot.blacklistedKernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" ]; #speeds up startup
|
||||||
|
|
||||||
mods.displayManager.enable = true;
|
mods.displayManager.enable = true;
|
||||||
mods.virtualHost.enable = false;
|
mods.virtualHost.enable = true;
|
||||||
mods.yubikey.pam.enable = true;
|
mods.yubikey.pam.enable = true;
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
@ -80,6 +80,15 @@
|
|||||||
mods.touchpad.enable = true;
|
mods.touchpad.enable = true;
|
||||||
|
|
||||||
mods.powerSave.enable = true;
|
mods.powerSave.enable = true;
|
||||||
|
mods.powerSave.powahCommandAdditions = [
|
||||||
|
"supergfxctl -m Hybrid"
|
||||||
|
"if asusctl profile -p | grep Balanced ; then asusctl profile -P Performance; fi"
|
||||||
|
"if asusctl profile -p | grep Quiet ; then asusctl profile -P Balanced; fi"
|
||||||
|
];
|
||||||
|
mods.powerSave.tagueuleCommandAdditions = [
|
||||||
|
"echo \"can't safely turn off the GPU\""
|
||||||
|
"asusctl profile -P Quiet"
|
||||||
|
];
|
||||||
|
|
||||||
services.asusd = {
|
services.asusd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -105,6 +114,7 @@
|
|||||||
mods.nvidia.enable = true;
|
mods.nvidia.enable = true;
|
||||||
mods.nvidia.prime = true;
|
mods.nvidia.prime = true;
|
||||||
|
|
||||||
|
|
||||||
# services.usbmuxd.enable = true; #hangs when shutting down
|
# services.usbmuxd.enable = true; #hangs when shutting down
|
||||||
|
|
||||||
# boot.plymouth = {
|
# boot.plymouth = {
|
||||||
@ -114,4 +124,6 @@
|
|||||||
# inputs.plymouth-theme-ycontre-glow.defaultPackage.x86_64-linux
|
# inputs.plymouth-theme-ycontre-glow.defaultPackage.x86_64-linux
|
||||||
# ];
|
# ];
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2025/09/06 00:45:04 by tomoron #+# #+# #
|
# Created: 2025/09/06 00:45:04 by tomoron #+# #+# #
|
||||||
# Updated: 2025/09/06 01:02:29 by tomoron ### ########.fr #
|
# Updated: 2025/09/17 18:47:27 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.mods.powerSave = {
|
options.mods.powerSave = {
|
||||||
@ -19,12 +19,66 @@
|
|||||||
default = false;
|
default = false;
|
||||||
description = "enable services and settings to save power";
|
description = "enable services and settings to save power";
|
||||||
};
|
};
|
||||||
|
powahCommandAdditions = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [];
|
||||||
|
description = "commands the `powah` script runs";
|
||||||
|
};
|
||||||
|
tagueuleCommandAdditions = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [];
|
||||||
|
description = "commands the `tagueule` script runs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf config.mods.powerSave.enable {
|
config = lib.mkIf config.mods.powerSave.enable {
|
||||||
services.tlp.enable = true;
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
TLP_DEFAULT_MODE = "BAT";
|
||||||
|
TLP_PERSISTENT_DEFAULT = 1;
|
||||||
|
|
||||||
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
|
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||||
|
|
||||||
|
CPU_MIN_PERF_ON_AC = 0;
|
||||||
|
CPU_MAX_PERF_ON_AC = 100;
|
||||||
|
CPU_MIN_PERF_ON_BAT = 0;
|
||||||
|
CPU_MAX_PERF_ON_BAT = 20;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "powah";
|
||||||
|
runtimeInputs = with pkgs; [ tlp ];
|
||||||
|
text = ''
|
||||||
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
tlp ac
|
||||||
|
'' + lib.concatStringsSep "\n" config.mods.powerSave.powahCommandAdditions;
|
||||||
|
})
|
||||||
|
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "tagueule";
|
||||||
|
runtimeInputs = with pkgs; [ tlp ];
|
||||||
|
text = ''
|
||||||
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
tlp bat
|
||||||
|
'' + lib.concatStringsSep "\n" config.mods.powerSave.tagueuleCommandAdditions;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
mods.nvidia.prime = true;
|
mods.nvidia.prime = true;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user