diff --git a/.bashrc b/.bashrc index 8dada92..0dc4336 100644 --- a/.bashrc +++ b/.bashrc @@ -46,7 +46,8 @@ alias ml4w='~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage' alias ml4w-settings='~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage' alias ml4w-sidebar='~/dotfiles/eww/ml4w-sidebar/launch.sh' alias ml4w-hyprland='~/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage' -alias ml4w-diagnosis='~/dotfiles/scripts/diagnosis.sh' +alias ml4w-hyprland-diagnosis='~/dotfiles/hypr/scripts/diagnosis.sh' +alias ml4w-qtile-diagnosis='~/dotfiles/qtile/scripts/diagnosis.sh' # ----------------------------------------------------- # Window Managers diff --git a/.install/packages/general-packages.sh b/.install/packages/general-packages.sh index 45d83d1..51f0e0c 100644 --- a/.install/packages/general-packages.sh +++ b/.install/packages/general-packages.sh @@ -11,7 +11,8 @@ packagesPacman=( "dunst" "starship" "mpv" - "thunar" + "thunar" + "nautilus" "mousepad" "noto-fonts" "otf-font-awesome" diff --git a/.settings/filemanager.sh b/.settings/filemanager.sh index af8fd0e..9f0175d 100755 --- a/.settings/filemanager.sh +++ b/.settings/filemanager.sh @@ -1 +1 @@ -thunar \ No newline at end of file +nautilus \ No newline at end of file diff --git a/.settings/hyprshade.sh b/.settings/hyprshade.sh index 4992ae0..93d10c7 100644 --- a/.settings/hyprshade.sh +++ b/.settings/hyprshade.sh @@ -3,4 +3,4 @@ # - vibrance # - off # get available filters with hyprshade ls -hyprshade_filter="blue-light-filter" \ No newline at end of file +hyprshade_filter="grayscale" \ No newline at end of file diff --git a/.version/name b/.version/name index d8cb76b..7b5cc6d 100644 --- a/.version/name +++ b/.version/name @@ -1 +1 @@ -2.9.1BETA2 \ No newline at end of file +2.9.1BETA3 \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG index 40731b5..fca4507 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,8 +6,14 @@ https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9 - Directory for wallpapers can be customized with new .settings/wallpaper-folder.sh - Added hyprpicker and Keybinding SUPER+CTRL+P - Replaced blueman with overskride to manage bluetooth devices +<<<<<<< HEAD - Screen shading possible with hyprshade. SUPER+SHIFT+S to toggle hyprshade. The filter can be defined in ~/dotfiles/.settings/hyprshade.sh For auto-activation at a dedicated time please set the filter to off and follow the instructions here https://github.com/loqusion/hyprshade +======= +- Screen shading possible with hyprshade. SUPER+SHIFT+S to toggle the hyprshade. The shader can be selected in the new Shader module in Waybar. +For individual customization and auto-activation at a dedicated time please set the filter to off and follow the instructions here https://github.com/loqusion/hyprshade +- Nautilus defined as new default file manager. Thunar available in addition. +>>>>>>> e633c2b (Updates) Version 2.9 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9 diff --git a/README.md b/README.md index 66c594a..73164fb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ML4W Dotfiles 2.9.1 BETA2 +# ML4W Dotfiles 2.9.1 BETA3 An advanced configuration of Hyprland and Qtile for Arch Linux based distributions. This package includes an installation script to install and setup the required components. diff --git a/apps/ML4W_Welcome-x86_64.AppImage b/apps/ML4W_Welcome-x86_64.AppImage index 551af96..eb1188e 100755 Binary files a/apps/ML4W_Welcome-x86_64.AppImage and b/apps/ML4W_Welcome-x86_64.AppImage differ diff --git a/scripts/diagnosis.sh b/hypr/scripts/diagnosis.sh similarity index 100% rename from scripts/diagnosis.sh rename to hypr/scripts/diagnosis.sh diff --git a/hypr/scripts/hyprshade.sh b/hypr/scripts/hyprshade.sh index 2f8b895..1860ecd 100755 --- a/hypr/scripts/hyprshade.sh +++ b/hypr/scripts/hyprshade.sh @@ -1,21 +1,59 @@ #!/bin/bash -hyprshade_filter="blue-light-filter" -if [ -f ~/dotfiles/.settings/hyprshade.sh ] ;then - source ~/dotfiles/.settings/hyprshade.sh -fi -if [ "$hyprshade_filter" != "off" ] ;then - if [ -z $(hyprshade current) ] ;then - echo ":: hyprshade is not running" - hyprshade on $hyprshade_filter - echo ":: hyprshade started with $(hyprshade current)" - else - echo ":: Current hyprshade $(hyprshade current)" - echo ":: Switching hyprshade off" - hyprshade off +# _ _ _ _ +# | | | |_ _ _ __ _ __ ___| |__ __ _ __| | ___ +# | |_| | | | | '_ \| '__/ __| '_ \ / _` |/ _` |/ _ \ +# | _ | |_| | |_) | | \__ \ | | | (_| | (_| | __/ +# |_| |_|\__, | .__/|_| |___/_| |_|\__,_|\__,_|\___| +# |___/|_| +# + +if [[ "$1" == "rofi" ]]; then + + # Open rofi to select the Hyprshade filter for toggle + + # List all available shaders + option1="blue-light-filter" + option2="vibrance" + option3="invert-colors" + option4="off" + + options="$option1\n" + options="$options$option2\n" + options="$options$option3\n$option4" + + # Open rofi + choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-hyprshade.rasi -i -no-show-icons -l 4 -width 30 -p "Hyprshade") + if [ ! -z $choice ] ;then + echo "hyprshade_filter=\"$choice\"" > ~/dotfiles/.settings/hyprshade.sh + dunstify "Changing Hyprshade to $choice" "Toggle shader with SUPER+SHIFT+S" fi + else - if [ -z $(hyprshade current) ] ;then - hyprshade off + + # Toggle Hyprshade based on the selected filter + hyprshade_filter="blue-light-filter" + + # Check if hyprshade.sh settings file exists and load + if [ -f ~/dotfiles/.settings/hyprshade.sh ] ;then + source ~/dotfiles/.settings/hyprshade.sh fi - echo ":: hyprshade turned off" + + # Toggle Hyprshade + if [ "$hyprshade_filter" != "off" ] ;then + if [ -z $(hyprshade current) ] ;then + echo ":: hyprshade is not running" + hyprshade on $hyprshade_filter + echo ":: hyprshade started with $(hyprshade current)" + else + echo ":: Current hyprshade $(hyprshade current)" + echo ":: Switching hyprshade off" + hyprshade off + fi + else + if [ -z $(hyprshade current) ] ;then + hyprshade off + fi + echo ":: hyprshade turned off" + fi + fi diff --git a/hypr/shaders/invert-colors.glsl b/hypr/shaders/invert-colors.glsl new file mode 100644 index 0000000..a504901 --- /dev/null +++ b/hypr/shaders/invert-colors.glsl @@ -0,0 +1,8 @@ +precision highp float; +varying vec2 v_texcoord; +uniform sampler2D tex; + +void main() { + vec4 pixColor = texture2D(tex, v_texcoord); + gl_FragColor = vec4(1.0 - pixColor.r, 1.0 - pixColor.g, 1.0 - pixColor.b, pixColor.a); +} diff --git a/qtile/scripts/diagnosis.sh b/qtile/scripts/diagnosis.sh new file mode 100755 index 0000000..65f5ec7 --- /dev/null +++ b/qtile/scripts/diagnosis.sh @@ -0,0 +1,37 @@ +#!/bin/bash +clear +sleep 0.5 +figlet "Diagnosis" +echo +echo "This script will check that essential packages and " +echo "execution commands are available on your system." +echo + +_commandExists() { + package="$1"; + if ! type $package > /dev/null 2>&1; then + echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2" + else + echo ":: OK: $package found." + fi +} + +_folderExists() { + folder="$1"; + if [ ! -d $folder ]; then + echo ":: ERROR: $folder doesn't exists." + else + echo ":: OK: $folder found." + fi +} + +_commandExists "rofi" "rofi-wayland" +_commandExists "dunst" "dunst" +_commandExists "wal" "python-pywal" +_commandExists "gum" "gum" +_commandExists "magick" "imagemagick" +_commandExists "figlet" "figlet" + +echo +echo "Press return to exit" +read \ No newline at end of file diff --git a/qtile/scripts/powermenu.sh b/qtile/scripts/powermenu.sh index ca23ffb..dcfcf07 100755 --- a/qtile/scripts/powermenu.sh +++ b/qtile/scripts/powermenu.sh @@ -9,11 +9,7 @@ # by Stephan Raabe (2023) # ----------------------------------------------------- echo $XDG_SESSION_TYPE -if [ $XDG_SESSION_TYPE == "wayland" ]; then - lockapp=swaylock -else - lockapp=slock -fi +lockapp=slock echo "Using $lockapp to lock the screen." option1=" lock" diff --git a/rofi/config-compact.rasi b/rofi/config-compact.rasi index 9bd9557..a5cddeb 100644 --- a/rofi/config-compact.rasi +++ b/rofi/config-compact.rasi @@ -19,7 +19,8 @@ configuration { display-run: "RUN"; display-filebrowser: "FILES"; display-window: "WINDOW"; - hover-select: true; + hover-select: false; + scroll-method: 1; me-select-entry: ""; me-accept-entry: "MousePrimary"; drun-display-format: "{name}"; @@ -149,8 +150,8 @@ listview { enabled: true; columns: 1; lines: 8; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: false; layout: vertical; reverse: false; diff --git a/rofi/config-hyprshade.rasi b/rofi/config-hyprshade.rasi new file mode 100644 index 0000000..8a617c4 --- /dev/null +++ b/rofi/config-hyprshade.rasi @@ -0,0 +1,262 @@ +/* +# ____ __ _ +# | _ \ ___ / _(_) +# | |_) / _ \| |_| | +# | _ < (_) | _| | +# |_| \_\___/|_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +*/ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "Fira Sans 11"; + show-icons: false; + icon-theme: "kora"; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + hover-select: true; + me-select-entry: ""; + me-accept-entry: "MousePrimary"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; + +} + +/* ---- Load font ---- */ +@import "~/dotfiles/.settings/rofi-font.rasi" + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.cache/wal/colors-rofi-pywal" + +/* ---- Load wallpaper ---- */ +@import "~/.cache/current_wallpaper.rasi" + +/* ---- Load border width ---- */ +@import "~/dotfiles/.settings/rofi-border.rasi" + +/* ---- Window ---- */ +window { + width: 400px; + x-offset: -14px; + y-offset: 65px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: #FFFFFF; + border: @border-width; + border-color: #FFFFFF; + cursor: "default"; + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: transparent; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: @background; + background-image: @current-image; + children: ["listbox"]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "listview" ]; +} + +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 0px; + border-color: @foreground; + background-color: @background; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + padding: 0px 5px 0px 0px; + str: ""; + background-color: transparent; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @color11; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 2; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + background-color: @background; + border:0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 10px; + margin: 5px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: @border-width; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @color11; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/rofi/config-themes.rasi b/rofi/config-themes.rasi index f999c1c..adb5500 100644 --- a/rofi/config-themes.rasi +++ b/rofi/config-themes.rasi @@ -19,12 +19,12 @@ configuration { display-run: "RUN"; display-filebrowser: "FILES"; display-window: "WINDOW"; - hover-select: true; + hover-select: false; me-select-entry: ""; me-accept-entry: "MousePrimary"; drun-display-format: "{name}"; window-format: "{w} · {c} · {t}"; - + scroll-method: 1; } /* ---- Load font ---- */ @@ -149,8 +149,8 @@ listview { enabled: true; columns: 1; lines: 8; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: false; layout: vertical; reverse: false; diff --git a/rofi/config-wallpaper.rasi b/rofi/config-wallpaper.rasi index 62f7f50..cde9500 100644 --- a/rofi/config-wallpaper.rasi +++ b/rofi/config-wallpaper.rasi @@ -14,12 +14,12 @@ configuration { modi: "drun,run"; font: "Fira Sans 11"; show-icons: true; - hover-select: true; + hover-select: false; me-select-entry: ""; me-accept-entry: "MousePrimary"; drun-display-format: "{name}"; window-format: "{w} · {c} · {t}"; - + scroll-method: 1; } /* ---- Load font ---- */ @@ -143,8 +143,8 @@ listview { enabled: true; columns: 6; lines: 3; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: true; layout: vertical; reverse: false; diff --git a/rofi/config.rasi b/rofi/config.rasi index 0618872..6a02b0e 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -20,7 +20,8 @@ configuration { display-filebrowser: "FILES"; display-window: "WINDOW"; drun-display-format: "{name}"; - hover-select: true; + hover-select: false; + scroll-method: 1; me-select-entry: ""; me-accept-entry: "MousePrimary"; window-format: "{w} · {c} · {t}"; @@ -149,8 +150,8 @@ listview { enabled: true; columns: 1; lines: 8; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: false; layout: vertical; reverse: false; diff --git a/waybar/modules.json b/waybar/modules.json index d11826e..142ae93 100644 --- a/waybar/modules.json +++ b/waybar/modules.json @@ -196,6 +196,14 @@ "tooltip": false }, + // Hyprshade + "custom/hyprshade": { + "format": "", + "on-click": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh", + "on-click-right": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh rofi", + "tooltip": false + }, + // Keyboard State "keyboard-state": { "numlock": true, diff --git a/waybar/themes/ml4w-blur/config b/waybar/themes/ml4w-blur/config index fc5269e..2d1c73f 100644 --- a/waybar/themes/ml4w-blur/config +++ b/waybar/themes/ml4w-blur/config @@ -47,6 +47,7 @@ "group/hardware", "custom/cliphist", "idle_inhibitor", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/ml4w-blur/style.css b/waybar/themes/ml4w-blur/style.css index 33f4f5a..26f9688 100644 --- a/waybar/themes/ml4w-blur/style.css +++ b/waybar/themes/ml4w-blur/style.css @@ -163,6 +163,7 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, #custom-waybarthemes { margin-right: 23px; font-size: 20px; @@ -170,7 +171,12 @@ window#waybar.empty #window { opacity: 0.8; color: @iconcolor; } - + +#custom-hyprshade { + margin-left:4px; + margin-right:12px; +} + #custom-system { margin-right:15px; } diff --git a/waybar/themes/ml4w-minimal/config b/waybar/themes/ml4w-minimal/config index 5bdde98..6c36883 100644 --- a/waybar/themes/ml4w-minimal/config +++ b/waybar/themes/ml4w-minimal/config @@ -45,6 +45,7 @@ "group/hardware", "custom/cliphist", "idle_inhibitor", + "custom/hyprshade", "custom/exit", "clock", "tray", diff --git a/waybar/themes/ml4w-minimal/style.css b/waybar/themes/ml4w-minimal/style.css index be802f2..229be2e 100644 --- a/waybar/themes/ml4w-minimal/style.css +++ b/waybar/themes/ml4w-minimal/style.css @@ -134,6 +134,7 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, #custom-waybarthemes { margin-right: 23px; font-size: 14px; @@ -141,6 +142,11 @@ window#waybar.empty #window { color: @iconcolor; } +#custom-hyprshade { + margin-left:4px; + margin-right:12px; +} + #custom-settings { margin-right: 15px; } diff --git a/waybar/themes/ml4w/config b/waybar/themes/ml4w/config index 4e40db2..3a53b5d 100644 --- a/waybar/themes/ml4w/config +++ b/waybar/themes/ml4w/config @@ -47,6 +47,7 @@ "group/hardware", "custom/cliphist", "idle_inhibitor", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/ml4w/style.css b/waybar/themes/ml4w/style.css index 035cad2..22c1044 100644 --- a/waybar/themes/ml4w/style.css +++ b/waybar/themes/ml4w/style.css @@ -164,6 +164,7 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, #custom-waybarthemes { margin-right: 23px; font-size: 20px; @@ -172,6 +173,11 @@ window#waybar.empty #window { color: @iconcolor; } +#custom-hyprshade { + margin-left:4px; + margin-right:12px; +} + #custom-system { margin-right:15px; } diff --git a/waybar/themes/starter/config b/waybar/themes/starter/config index 0506cad..b971c91 100644 --- a/waybar/themes/starter/config +++ b/waybar/themes/starter/config @@ -55,6 +55,7 @@ "group/hardware", "custom/cliphist", "idle_inhibitor", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/starter/modules.json b/waybar/themes/starter/modules.json index 02a132f..ab88008 100644 --- a/waybar/themes/starter/modules.json +++ b/waybar/themes/starter/modules.json @@ -65,6 +65,14 @@ "tooltip": false }, + // Hyprshade + "custom/hyprshade": { + "format": "", + "on-click": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh", + "on-click-right": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh rofi", + "tooltip": false + }, + // Updates Count "custom/updates": { "format": " {}", diff --git a/waybar/themes/starter/style.css b/waybar/themes/starter/style.css index 4224494..941d77e 100644 --- a/waybar/themes/starter/style.css +++ b/waybar/themes/starter/style.css @@ -164,6 +164,7 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, #custom-waybarthemes { margin-right: 23px; font-size: 20px; @@ -171,12 +172,16 @@ window#waybar.empty #window { color: @iconcolor; } - #custom-waybarthemes,#custom-system { +#custom-hyprshade { + margin-left:4px; + margin-right:12px; +} + +#custom-waybarthemes,#custom-system { margin-right:15px; - } +} - - #custom-ml4w-welcome { +#custom-ml4w-welcome { margin-right: 15px; background-image: url("../assets/ml4w-icon.png"); background-repeat: no-repeat; @@ -396,7 +401,7 @@ window#waybar.empty #window { * ----------------------------------------------------- */ #tray { - background-color: #2980b9; + margin:0px 10px 0px 0px; } #tray > .passive {