From 2402a04c36cad1a52d55a8472271c41ecd3c6f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 21 Oct 2023 13:02:00 +0200 Subject: [PATCH 1/7] Set the compose key --- .config/hypr/hyprland.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 5754a2a..ee63a8c 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -26,8 +26,8 @@ input { kb_layout = us kb_variant = kb_model = - kb_options = - kb_rules = + #kb_rules = + kb_options = compose:rwin follow_mouse = 1 From 8325e2d0f8ee1e049175c18e8c102427a2f41dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 21 Oct 2023 16:27:26 +0200 Subject: [PATCH 2/7] Configure the wallpaper --- .config/hypr/hyprland.conf | 1 + .config/hypr/hyprpaper.conf | 4 ---- .gitignore | 3 +++ bin/set_wallpaper | 20 +++++++++++--------- 4 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 .config/hypr/hyprpaper.conf diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index ee63a8c..cc12d76 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -12,6 +12,7 @@ monitor=eDP-1,1920x1080@60,0x0,1 # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox +exec-once = ~/.local/bin/set_wallpaper exec-once = hyprpaper exec-once = waybar diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf deleted file mode 100644 index f58c33d..0000000 --- a/.config/hypr/hyprpaper.conf +++ /dev/null @@ -1,4 +0,0 @@ -preload = /home/rodolphe/pictures/wallpapers/2018-06-03_Komona-sunset_by-David-Revoy.jpg - -wallpaper = monitor1,/home/rodolphe/pictures/wallpapers/2018-06-03_Komona-sunset_by-David-Revoy.jpg -wallpaper = eDP-1,/home/rodolphe/pictures/wallpapers/2018-06-03_Komona-sunset_by-David-Revoy.jpg diff --git a/.gitignore b/.gitignore index 9230d78..300d96d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ __pycache__/ # Emacs .emacs.d/auto-save-list/ + +# Auto-generated hyprpaper configuration file +.config/hypr/hyprpaper.conf diff --git a/bin/set_wallpaper b/bin/set_wallpaper index 7502ece..687a1f8 100755 --- a/bin/set_wallpaper +++ b/bin/set_wallpaper @@ -4,13 +4,15 @@ set -euo pipefail IFS=$'\n\t' WALLPAPER_DIRECTORY="$HOME/pictures/wallpapers/enabled" -WALLPAPER_FILE="$(find "$WALLPAPER_DIRECTORY" -type l -print | shuf | head -n 1)" +HYPRPAPER_CNF="$HOME/.config/hypr/hyprpaper.conf" -case "$1" in - sway) - swaymsg --quiet output "*" bg "$WALLPAPER_FILE" fill - ;; - *) - hash feh 2>/dev/null && feh --bg-scale "$WALLPAPER_FILE" - ;; -esac +if [ -d "$WALLPAPER_DIRECTORY" ]; then + WALLPAPER_FILE="$(find "$WALLPAPER_DIRECTORY" -type l -print | shuf | head -n 1)" + if [ -L "$WALLPAPER_FILE" ]; then + WALLPAPER_FILE="$(readlink -f "$WALLPAPER_FILE")" + fi + cat >"$HYPRPAPER_CNF" << EOF +preload = $WALLPAPER_FILE +wallpaper = ,$WALLPAPER_FILE +EOF +fi From 9e17f389655df02bf883f42736475907b8185736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 21 Oct 2023 16:28:00 +0200 Subject: [PATCH 3/7] Add spaces for clarity --- .config/hypr/hyprland.conf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index cc12d76..b0e6a1c 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -166,12 +166,12 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Media keys -binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ -bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindl=, XF86AudioPlay, exec, playerctl --player rhythmbox play-pause -bindl=, XF86AudioPrev, exec, playerctl --player rhythmbox previous -bindl=, XF86AudioNext, exec, playerctl --player rhythmbox next -bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% -bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- -bindl=, Print, exec, grim +binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ +bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindl = , XF86AudioPlay, exec, playerctl --player rhythmbox play-pause +bindl = , XF86AudioPrev, exec, playerctl --player rhythmbox previous +bindl = , XF86AudioNext, exec, playerctl --player rhythmbox next +bindl = , XF86MonBrightnessUp, exec, brightnessctl set +5% +bindl = , XF86MonBrightnessDown, exec, brightnessctl set 5%- +bindl = , Print, exec, grim From 6a24720a3a9c6091c3507218771ee51bee32bae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 21 Oct 2023 16:29:24 +0200 Subject: [PATCH 4/7] Refactor the monitor config --- .config/hypr/hyprland.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index b0e6a1c..b62cd4e 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -5,8 +5,12 @@ # # See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,preferred,auto,auto -monitor=eDP-1,1920x1080@60,0x0,1 +# List monitors: +# $ hyprctl monitors +monitor = ,highres,auto,1 +# Enable or disable eDP-1 depending on the lid switch +bindl = ,switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1,highres,auto,1" +bindl = ,switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" # See https://wiki.hyprland.org/Configuring/Keywords/ for more From f2db1896e6c29164e5e553e62e75e4cb116c7bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 21 Oct 2023 16:33:04 +0200 Subject: [PATCH 5/7] Remove compose key files --- .config/hypr/hyprland.conf | 1 + compose/menu | 1 - compose/ralt | 1 - compose/rwin | 1 - 4 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 compose/menu delete mode 100644 compose/ralt delete mode 100644 compose/rwin diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index b62cd4e..67e221d 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -32,6 +32,7 @@ input { kb_variant = kb_model = #kb_rules = + # Example compose keys: menu, ralt, rwin kb_options = compose:rwin follow_mouse = 1 diff --git a/compose/menu b/compose/menu deleted file mode 100644 index e4a6a56..0000000 --- a/compose/menu +++ /dev/null @@ -1 +0,0 @@ -menu \ No newline at end of file diff --git a/compose/ralt b/compose/ralt deleted file mode 100644 index b5159b5..0000000 --- a/compose/ralt +++ /dev/null @@ -1 +0,0 @@ -ralt \ No newline at end of file diff --git a/compose/rwin b/compose/rwin deleted file mode 100644 index 2618a89..0000000 --- a/compose/rwin +++ /dev/null @@ -1 +0,0 @@ -rwin \ No newline at end of file From 376badc6702ea89f0ca0c76cc63a03d5b1f2f1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 21 Oct 2023 16:38:18 +0200 Subject: [PATCH 6/7] Remove X.org related files --- .Xresources | 21 ---- .xinitrc | 32 ------ .xprofile | 8 -- .xscreensaver | 272 -------------------------------------------------- bin/lock | 12 --- 5 files changed, 345 deletions(-) delete mode 100644 .Xresources delete mode 100755 .xinitrc delete mode 100644 .xprofile delete mode 100644 .xscreensaver delete mode 100755 bin/lock diff --git a/.Xresources b/.Xresources deleted file mode 100644 index d1bf60c..0000000 --- a/.Xresources +++ /dev/null @@ -1,21 +0,0 @@ -xterm*background: #000000 -xterm*foreground: #ffffff - -URxvt*.depth: 32 -URxvt*.background: [95]#000000 -URxvt*.foreground: #ffffff -URxvt*.scrollBar: false -URxvt*.perl-ext-common: default,clipboard,url-select,keyboard-select -URxvt*.url-select.launcher: firefox -URxvt*.url-select.underline: true -URxvt*.keysym.M-u: perl:url-select:select_next -URxvt*.keysym.M-Escape: perl:keyboard-select:activate -URxvt*.keysym.M-s: perl:keyboard-select:search -URxvt*.font: xft:inconsolata:size=9 -URxvt*.letterSpace: -1 - -Xft.dpi: 96 -Xft.antialias: true -Xft.rgba: rgb -Xft.hinting: true -Xft.hintstyle: hintslight diff --git a/.xinitrc b/.xinitrc deleted file mode 100755 index bdeeaa0..0000000 --- a/.xinitrc +++ /dev/null @@ -1,32 +0,0 @@ -[ -f ~/.xprofile ] && . ~/.xprofile - -AUTHORISED_WM="qtile i3" -AVAILABLE_WM="" -REQUESTED_WM="$1" - -for wm in $AUTHORISED_WM; do - if hash "$wm" 2>/dev/null; then - if [ "$AVAILABLE_WM" ]; then - AVAILABLE_WM="$AVAILABLE_WM $wm" - else - AVAILABLE_WM="$wm" - fi - fi -done -if [ ! "$AVAILABLE_WM" ]; then - >&2 echo "Error: No window manager found. Please install one of the following:" - >&2 echo "$AUTHORISED_WM" - exit 1 -fi - -WM=$(echo "$AVAILABLE_WM" | tr ' ' '\n' | head -n1) -if [ "$REQUESTED_WM" ]; then - found=$(echo "$AVAILABLE_WM" | tr ' ' '\n' | grep -w "$REQUESTED_WM") - if [ "$found" ]; then - WM="$found" - else - >&2 echo "Warning: $REQUESTED_WM not found, starting the default window manager." - fi -fi - -exec "$WM" 2>/tmp/xinit.err.log diff --git a/.xprofile b/.xprofile deleted file mode 100644 index 54cd048..0000000 --- a/.xprofile +++ /dev/null @@ -1,8 +0,0 @@ -[ -f /etc/xprofile ] && . /etc/xprofile -[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources -[ -f "$MY_CONFIG/.set_compose_key.sh" ] && . "$MY_CONFIG/.set_compose_key.sh" - -hash xcompmgr 2>/dev/null && xcompmgr & -hash xscreensaver 2>/dev/null && xscreensaver -no-splash & -hash gpg-agent 2>/dev/null && eval $(gpg-agent --daemon --enable-ssh-support) -hash set_wallpaper 2>/dev/null && set_wallpaper feh diff --git a/.xscreensaver b/.xscreensaver deleted file mode 100644 index eb93d0c..0000000 --- a/.xscreensaver +++ /dev/null @@ -1,272 +0,0 @@ -# XScreenSaver Preferences File -# Written by xscreensaver-demo 5.33 for rodolphe on Wed Aug 12 16:37:20 2015. -# http://www.jwz.org/xscreensaver/ - -timeout: 0:10:00 -cycle: 0:10:00 -lock: True -lockTimeout: 0:00:00 -passwdTimeout: 0:00:30 -visualID: default -installColormap: True -verbose: False -timestamp: True -splash: True -splashDuration: 0:00:05 -demoCommand: xscreensaver-demo -prefsCommand: xscreensaver-demo -prefs -nice: 10 -memoryLimit: 0 -fade: True -unfade: False -fadeSeconds: 0:00:03 -fadeTicks: 20 -captureStderr: True -ignoreUninstalledPrograms:False -font: *-medium-r-*-140-*-m-* -dpmsEnabled: False -dpmsQuickOff: False -dpmsStandby: 2:00:00 -dpmsSuspend: 2:00:00 -dpmsOff: 4:00:00 -grabDesktopImages: True -grabVideoFrames: False -chooseRandomImages: False -imageDirectory: - -mode: blank -selected: 146 - -textMode: file -textLiteral: XScreenSaver -textFile: -textProgram: fortune -textURL: http://twitter.com/statuses/public_timeline.atom - -programs: \ - maze -root \n\ - GL: superquadrics -root \n\ - attraction -root \n\ - blitspin -root \n\ - greynetic -root \n\ - helix -root \n\ - hopalong -root \n\ - imsmap -root \n\ -- noseguy -root \n\ -- pyro -root \n\ - qix -root \n\ -- rocks -root \n\ - rorschach -root \n\ - decayscreen -root \n\ - flame -root \n\ - halo -root \n\ - slidescreen -root \n\ - pedal -root \n\ - bouboule -root \n\ -- braid -root \n\ - coral -root \n\ - deco -root \n\ - drift -root \n\ -- fadeplot -root \n\ - galaxy -root \n\ - goop -root \n\ - grav -root \n\ - ifs -root \n\ - GL: jigsaw -root \n\ - julia -root \n\ -- kaleidescope -root \n\ - GL: moebius -root \n\ - moire -root \n\ - GL: morph3d -root \n\ - mountain -root \n\ - munch -root \n\ - penrose -root \n\ - GL: pipes -root \n\ - rd-bomb -root \n\ - GL: rubik -root \n\ -- sierpinski -root \n\ - slip -root \n\ - GL: sproingies -root \n\ - starfish -root \n\ - strange -root \n\ - swirl -root \n\ - triangle -root \n\ - xjack -root \n\ - xlyap -root \n\ - GL: atlantis -root \n\ - bsod -root \n\ - GL: bubble3d -root \n\ - GL: cage -root \n\ -- crystal -root \n\ - cynosure -root \n\ - discrete -root \n\ - distort -root \n\ - epicycle -root \n\ - flow -root \n\ -- GL: glplanet -root \n\ - interference -root \n\ - kumppa -root \n\ - GL: lament -root \n\ - moire2 -root \n\ - GL: sonar -root \n\ - GL: stairs -root \n\ - truchet -root \n\ -- vidwhacker -root \n\ - blaster -root \n\ - bumps -root \n\ - ccurve -root \n\ - compass -root \n\ - deluxe -root \n\ -- demon -root \n\ -- GL: extrusion -root \n\ -- loop -root \n\ - penetrate -root \n\ - petri -root \n\ - phosphor -root \n\ - GL: pulsar -root \n\ - ripples -root \n\ - shadebobs -root \n\ - GL: sierpinski3d -root \n\ - spotlight -root \n\ - squiral -root \n\ - wander -root \n\ -- webcollage -root \n\ - xflame -root \n\ - xmatrix -root \n\ - GL: gflux -root \n\ -- nerverot -root \n\ - xrayswarm -root \n\ - xspirograph -root \n\ - GL: circuit -root \n\ - GL: dangerball -root \n\ -- GL: dnalogo -root \n\ - GL: engine -root \n\ - GL: flipscreen3d -root \n\ - GL: gltext -root \n\ - GL: menger -root \n\ - GL: molecule -root \n\ - rotzoomer -root \n\ - speedmine -root \n\ - GL: starwars -root \n\ - GL: stonerview -root \n\ - vermiculate -root \n\ - whirlwindwarp -root \n\ - zoom -root \n\ - anemone -root \n\ - apollonian -root \n\ - GL: boxed -root \n\ - GL: cubenetic -root \n\ - GL: endgame -root \n\ - euler2d -root \n\ - fluidballs -root \n\ - GL: flurry -root \n\ -- GL: glblur -root \n\ - GL: glsnake -root \n\ - halftone -root \n\ - GL: juggler3d -root \n\ - GL: lavalite -root \n\ -- polyominoes -root \n\ - GL: queens -root \n\ -- GL: sballs -root \n\ - GL: spheremonics -root \n\ -- thornbird -root \n\ - twang -root \n\ -- GL: antspotlight -root \n\ - apple2 -root \n\ - GL: atunnel -root \n\ - barcode -root \n\ - GL: blinkbox -root \n\ - GL: blocktube -root \n\ - GL: bouncingcow -root \n\ - cloudlife -root \n\ - GL: cubestorm -root \n\ - eruption -root \n\ - GL: flipflop -root \n\ - GL: flyingtoasters -root \n\ - fontglide -root \n\ - GL: gleidescope -root \n\ - GL: glknots -root \n\ - GL: glmatrix -root \n\ -- GL: glslideshow -root \n\ - GL: hypertorus -root \n\ -- GL: jigglypuff -root \n\ - metaballs -root \n\ - GL: mirrorblob -root \n\ - piecewise -root \n\ - GL: polytopes -root \n\ - pong -root \n\ - popsquares -root \n\ - GL: surfaces -root \n\ - xanalogtv -root \n\ -- abstractile -root \n\ - anemotaxis -root \n\ -- GL: antinspect -root \n\ - fireworkx -root \n\ - fuzzyflakes -root \n\ - interaggregate -root \n\ - intermomentary -root \n\ - memscroller -root \n\ - GL: noof -root \n\ - pacman -root \n\ - GL: pinion -root \n\ - GL: polyhedra -root \n\ -- GL: providence -root \n\ - substrate -root \n\ - wormhole -root \n\ -- GL: antmaze -root \n\ - GL: boing -root \n\ - boxfit -root \n\ - GL: carousel -root \n\ - celtic -root \n\ - GL: crackberg -root \n\ - GL: cube21 -root \n\ - fiberlamp -root \n\ - GL: fliptext -root \n\ - GL: glhanoi -root \n\ - GL: tangram -root \n\ - GL: timetunnel -root \n\ - GL: glschool -root \n\ - GL: topblock -root \n\ - GL: cubicgrid -root \n\ - cwaves -root \n\ - GL: gears -root \n\ - GL: glcells -root \n\ - GL: lockward -root \n\ - m6502 -root \n\ - GL: moebiusgears -root \n\ - GL: voronoi -root \n\ - GL: hypnowheel -root \n\ - GL: klein -root \n\ -- lcdscrub -root \n\ - GL: photopile -root \n\ - GL: skytentacles -root \n\ - GL: rubikblocks -root \n\ - GL: companioncube -root \n\ - GL: hilbert -root \n\ - GL: tronbit -root \n\ - electricsheep --root 1 \n\ - GL: geodesic -root \n\ - hexadrop -root \n\ - GL: kaleidocycle -root \n\ - GL: quasicrystal -root \n\ - GL: unknownpleasures -root \n\ - binaryring -root \n\ - GL: cityflow -root \n\ - GL: geodesicgears -root \n\ - GL: projectiveplane -root \n\ - GL: romanboy -root \n\ - tessellimage -root \n\ - GL: winduprobot -root \n\ - GL: splitflap -root \n\ - - -pointerPollTime: 0:00:05 -pointerHysteresis: 10 -windowCreationTimeout:0:00:30 -initialDelay: 0:00:00 -GetViewPortIsFullOfLies:False -procInterrupts: True -xinputExtensionDev: False -overlayStderr: True -authWarningSlack: 20 - diff --git a/bin/lock b/bin/lock deleted file mode 100755 index f9bcbc6..0000000 --- a/bin/lock +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -IFS=$'\n\t' - -LOCK_BG_FILE="/tmp/lock_screen.png" - -rm -f "$LOCK_BG_FILE" -scrot "$LOCK_BG_FILE" -mogrify -filter Gaussian -resize 50% -define filter:sigma=2.5 -resize 200% "$LOCK_BG_FILE" -mogrify -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 30 -gravity South -annotate +0+200 "Screen locked" "$LOCK_BG_FILE" -i3lock -e -i "$LOCK_BG_FILE" From a9c5fd211aeb3831f7464ef54da2c1170f43991a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 21 Oct 2023 16:41:20 +0200 Subject: [PATCH 7/7] Remove obsolete stuff --- bin/sway | 13 ------------- bin/vid2twitter | 22 ---------------------- bin/xplorer | 11 ----------- 3 files changed, 46 deletions(-) delete mode 100755 bin/sway delete mode 100755 bin/vid2twitter delete mode 100755 bin/xplorer diff --git a/bin/sway b/bin/sway deleted file mode 100755 index 891262c..0000000 --- a/bin/sway +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -IFS=$'\n\t' - -COMPOSE_KEY_FILE="$HOME/.compose_key" - -if [ -f "$COMPOSE_KEY_FILE" ]; then - COMPOSE_KEY=$(cat "$COMPOSE_KEY_FILE") - export XKB_DEFAULT_OPTIONS="compose:$COMPOSE_KEY" -fi - -/usr/bin/sway "$@" diff --git a/bin/vid2twitter b/bin/vid2twitter deleted file mode 100755 index 0a001bb..0000000 --- a/bin/vid2twitter +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -INPUT="$1" -OUTPUT="${INPUT%.*}.mp4" - -if [ $# -ne 1 ]; then - echo "Usage: vid2twitter [source_video_file]" >&2 - exit 1 -fi - -if [ -f "$OUTPUT" ]; then - echo -n "$OUTPUT: file exists, overwrite? (y|N) " - read -r overwrite - case "${overwrite,,}" in - "y" | "yes") ;; - *) - exit 0 - ;; - esac -fi - -ffmpeg -i "$INPUT" -vcodec libx264 -pix_fmt yuv420p -strict -2 -acodec aac "$OUTPUT" diff --git a/bin/xplorer b/bin/xplorer deleted file mode 100755 index 8ed2920..0000000 --- a/bin/xplorer +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -IFS=$'\n\t' - -for name in 'pcmanfm' 'thunar'; do - if hash "$name" 2>/dev/null; then - "$name" - break - fi -done