diff --git a/homeConfigs/dotfiles/local/bin/brightness b/homeConfigs/dotfiles/local/bin/brightness deleted file mode 100755 index 3b2e732..0000000 --- a/homeConfigs/dotfiles/local/bin/brightness +++ /dev/null @@ -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 diff --git a/homeConfigs/dotfiles/local/bin/desk_sync b/homeConfigs/dotfiles/local/bin/desk_sync deleted file mode 100755 index 143f009..0000000 --- a/homeConfigs/dotfiles/local/bin/desk_sync +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -unison /home/tom/Desktop ssh://tom@tmoron.fr:1880//home/tom/Desktop_sync/Desktop $@ - diff --git a/homeConfigs/dotfiles/local/bin/hibernate b/homeConfigs/dotfiles/local/bin/hibernate deleted file mode 100755 index 1708622..0000000 --- a/homeConfigs/dotfiles/local/bin/hibernate +++ /dev/null @@ -1,2 +0,0 @@ -xtrlock& -systemctl hibernate diff --git a/homeConfigs/dotfiles/local/bin/kbd_brightness b/homeConfigs/dotfiles/local/bin/kbd_brightness deleted file mode 100755 index 3353fc6..0000000 --- a/homeConfigs/dotfiles/local/bin/kbd_brightness +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -if [ "$1" = "up" ]; then - asusctl -n -elif [ "$1" = "down" ];then - asusctl -p -fi diff --git a/homeConfigs/dotfiles/local/bin/scan b/homeConfigs/dotfiles/local/bin/scan deleted file mode 100755 index 620e707..0000000 --- a/homeConfigs/dotfiles/local/bin/scan +++ /dev/null @@ -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 diff --git a/homeConfigs/home.nix b/homeConfigs/home.nix index 6888eba..10b9cdb 100644 --- a/homeConfigs/home.nix +++ b/homeConfigs/home.nix @@ -6,7 +6,7 @@ # 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"; hl = "Hyprland"; clr = "clear"; - tagueule = "asusctl profile -P Quiet"; - parle = "asusctl profile -P performance"; +# tagueule = "asusctl profile -P Quiet"; +# parle = "asusctl profile -P performance"; noidle = "systemctl --user stop hypridle"; }; @@ -98,7 +98,6 @@ ref = "master"; }}/themes"; -# ".local/bin/desk_sync".source = dotfiles/local/bin/desk_sync; }; services.dunst.enable = true; diff --git a/homeConfigs/hosts/laptop.nix b/homeConfigs/hosts/laptop.nix index 7e64f21..1a753d2 100644 --- a/homeConfigs/hosts/laptop.nix +++ b/homeConfigs/hosts/laptop.nix @@ -41,5 +41,77 @@ 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" ""]; +# +# }; +# }; + } diff --git a/homeConfigs/modules/wayland/hyprland.nix b/homeConfigs/modules/wayland/hyprland.nix index a551202..9a70eaf 100644 --- a/homeConfigs/modules/wayland/hyprland.nix +++ b/homeConfigs/modules/wayland/hyprland.nix @@ -8,6 +8,7 @@ }; config = lib.mkIf config.mods.hyprland.enable { + wayland.windowManager.hyprland.systemd.variables = [ "--all" ]; wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.settings = { @@ -144,12 +145,12 @@ color = "rgba(1a1a1aee)"; }; - blur = { - enabled = true; - size = 3; - passes = 1; - vibrancy = 0.1696; - }; + #blur = { + # enabled = true; + # size = 3; + # passes = 1; + # vibrancy = 0.1696; + #}; }; general = { diff --git a/osConfigs/hosts/laptop.nix b/osConfigs/hosts/laptop.nix index f7af43b..8f93b76 100644 --- a/osConfigs/hosts/laptop.nix +++ b/osConfigs/hosts/laptop.nix @@ -6,7 +6,7 @@ # 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 mods.displayManager.enable = true; - mods.virtualHost.enable = false; + mods.virtualHost.enable = true; mods.yubikey.pam.enable = true; networking.firewall.enable = false; @@ -80,6 +80,15 @@ mods.touchpad.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 = { enable = true; @@ -105,6 +114,7 @@ mods.nvidia.enable = true; mods.nvidia.prime = true; + # services.usbmuxd.enable = true; #hangs when shutting down # boot.plymouth = { @@ -114,4 +124,6 @@ # inputs.plymouth-theme-ycontre-glow.defaultPackage.x86_64-linux # ]; # }; + + services.flatpak.enable = true; } diff --git a/osConfigs/modules/powerSave.nix b/osConfigs/modules/powerSave.nix index 7a4bef1..4c1bd78 100644 --- a/osConfigs/modules/powerSave.nix +++ b/osConfigs/modules/powerSave.nix @@ -6,11 +6,11 @@ # 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 = { @@ -19,12 +19,66 @@ default = false; 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 { - 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.cpuFreqGovernor = "powersave"; services.upower.enable = true; mods.nvidia.prime = true; };