From accc96333d8fcfb1f7511a4a8f8bf0b86e1c7d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Tue, 2 Aug 2022 15:01:09 +0200 Subject: [PATCH] Update 15.04.23 --- Xresources | 6 ++--- config/i3/config | 22 +++++----------- config/i3/i3status.conf | 13 ++++----- config/keepassxc/keepassxc.ini | 7 +---- config/rofi/applets/menu/powermenu.sh | 7 +++++ config/rofi/config.rasi | 1 + gitconfig | 3 +-- services/lynepad/lynepad.py | 38 +++++++++++++++++++++++++++ xinitrc | 9 ++++--- xprofile | 5 ++++ 10 files changed, 76 insertions(+), 35 deletions(-) create mode 100644 services/lynepad/lynepad.py diff --git a/Xresources b/Xresources index c56b681..5d76fa2 100644 --- a/Xresources +++ b/Xresources @@ -52,8 +52,8 @@ URxvt.perl-ext-common: default,matcher,resize-font URxvt.iso14755: false URxvt.iso14755_52: false -!URxvt*font: xft:DejaVuSansMono:size=8:style=dzForPowerline -URxvt*font: xft:Courier New:size=12 +!URxvt*font: xft:DejaVuSansMono:size=12:style=dzForPowerline +URxvt*font: xft:Courier New:size=12:style=dzForPowerline URxvt.letterSpace: -1 !URxvt.keysym.Alt-Up: resize-font:bigger !URxvt.keysym.Alt-Down: resize-font:smaller @@ -71,7 +71,7 @@ URxvt*scrollColor: #aaaaaa URxvt.perl-ext: default,url-select URxvt.keysym.M-u: perl:url-select:select_next -URxvt.url-select.launcher: /usr/bin/chromium -new-tab +URxvt.url-select.launcher: firefox URxvt.url-select.underline: true URxvt.saveLines: 200000 diff --git a/config/i3/config b/config/i3/config index 112e1cf..b47050c 100644 --- a/config/i3/config +++ b/config/i3/config @@ -85,7 +85,8 @@ bindsym $mod+w kill # start dmenu (a program launcher) #bindsym $mod+r exec dmenu_run -bindsym $mod+r exec --no-startup-id ~/.config/rofi/bin/menu_powermenu +#bindsym $mod+r exec --no-startup-id ~/.config/rofi/bin/menu_powermenu +bindsym $mod+r exec --no-startup-id ~/rofi/files/powermenu/type-2/powermenu.sh # start rofi bindsym $mod+p exec rofi -show run # switch rofi @@ -97,7 +98,7 @@ bindsym $mod+c exec --no-startup-id ~/.config/rofi/bin/menu_time bindsym $mod+o exec ~/lock.sh #bindsym $mod+o exec slimlock # ristretto -bindsym $mod+e exec thunar +bindsym $mod+e exec nemo # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that @@ -288,16 +289,7 @@ assign [class="MineTime"] 7 # bindsym $mod+r mode "resize" # Workspace config -workspace 1 output eDP1 -workspace 2 output eDP1 -workspace 3 output HDMI2 eDP1 -workspace 4 output HDMI2 eDP1 -workspace 5 output HDMI2 eDP1 -workspace 6 output HDMI2 eDP1 -workspace 7 output eDP1 -workspace 8 output eDP1 -workspace 9 output eDP1 -workspace 10 output HDMI2 eDP1 +#workspace 1 output DisplayPort-2 # i3 bar configuration # ---------------------------------------------------------------------------- @@ -309,7 +301,7 @@ bar { status_command py3status position top - tray_output primary + tray_output DisplayPort-2 colors { background #000000 @@ -325,9 +317,9 @@ bar { binding_mode #2f343a #900000 #ffffff } - # separator_symbol "ʃ" + separator_symbol "ʃ" #separator_symbol "❰" - separator_symbol " ❱ " + #separator_symbol " ❱ " #separator_symbol " ▷ " #separator_symbol " ∠ " #separator_symbol "|" diff --git a/config/i3/i3status.conf b/config/i3/i3status.conf index 34d8405..5566100 100644 --- a/config/i3/i3status.conf +++ b/config/i3/i3status.conf @@ -1,5 +1,5 @@ -order += nvidia_smi -# order += bluetooth +# order += nvidia_smi + order += bluetooth order += keyboard_layout order += arch_updates order += "whatismyip" @@ -8,8 +8,8 @@ order += "ipv6" order += "wireless _first_" order += "ethernet _first_" order += net_rate -#order += net_iplist -order += "battery all" +# order += net_iplist +# order += "battery all" order += "disk /" order += "disk /home" order += sysdata @@ -43,6 +43,7 @@ wireless _first_ { ethernet _first_ { format_up = " %ip (%speed)" format_down = "" + on_click 1 = "exec sh /home/legrems/.screenlayout/swide.sh" } net_iplist { @@ -59,13 +60,13 @@ net_rate { disk "/" { # format = "%percentage_used (%used / %free / %total)" format = "/ %percentage_used %free" - on_click 1 = "exec thunar /" + on_click 1 = "exec nemo /" } disk "/home" { # format = "%percentage_used (%used / %free / %total)" format = "/home %percentage_used %free" - on_click 1 = "exec thunar /home/legrems/Documents/Arcanite" + on_click 1 = "exec nemo /home/legrems/Documents" } tztime local { diff --git a/config/keepassxc/keepassxc.ini b/config/keepassxc/keepassxc.ini index 505e714..ca020d0 100644 --- a/config/keepassxc/keepassxc.ini +++ b/config/keepassxc/keepassxc.ini @@ -9,15 +9,10 @@ Enabled=true ApplicationTheme=dark TrayIconAppearance=monochrome-light -[KeeShare] -Active="\n\n \n\n" -Foreign="\n\n \n\n" -Own="\n\n \n \n\n" -QuietSuccess=true - [PasswordGenerator] AdditionalChars= ExcludedChars= +Length=32 [Security] LockDatabaseScreenLock=false diff --git a/config/rofi/applets/menu/powermenu.sh b/config/rofi/applets/menu/powermenu.sh index 8e07fab..4f63271 100755 --- a/config/rofi/applets/menu/powermenu.sh +++ b/config/rofi/applets/menu/powermenu.sh @@ -21,6 +21,13 @@ lock="" suspend="" logout="" +shutdown="\u23fc" +reboot="\ufc07" +lock="\uf023" +lock="\U0001f512" +suspend="\uf9b1" +logout="\uf842" + # Confirmation confirm_exit() { rofi -dmenu\ diff --git a/config/rofi/config.rasi b/config/rofi/config.rasi index 4bbac22..7cc45a4 100644 --- a/config/rofi/config.rasi +++ b/config/rofi/config.rasi @@ -5,3 +5,4 @@ configuration { font: "Courier New 12"; icon-theme: "Papirus"; } +@theme "/usr/share/rofi/themes/gruvbox-dark-hard.rasi" diff --git a/gitconfig b/gitconfig index 97c75de..92bac10 100644 --- a/gitconfig +++ b/gitconfig @@ -1,10 +1,9 @@ [user] - email = loic.gremaud@arcanite.ch + email = flamelegrems@gmail.com name = Loïc Gremaud ;signingkey = 8B2741BF148B1059065A71EEE81E8B180465D116 ;540 signingkey = BAE2CD06F0A3753A0F8D0A21D4620E6DF3E0121D ;539 ;signingkey = 4F78275C96E34F56920CF7B5CACB2A128E557EFD ;W - token = REPLACE HERE TOKEN [commit] gpgSign = true [gpg] diff --git a/services/lynepad/lynepad.py b/services/lynepad/lynepad.py new file mode 100644 index 0000000..a3a16d3 --- /dev/null +++ b/services/lynepad/lynepad.py @@ -0,0 +1,38 @@ +from pynput import keyboard +import signal +import datetime + + +def handler(signum, frame): + if input("Ctrl-c was pressed. Do you really want to exit? y/N") != "n": + exit(1) + + +signal.signal(signal.SIGINT, handler) + +FROM_LYNEPAD = False +THE_LYNEPAD_KEY_VK = 269025200 +def on_press(key): + global FROM_LYNEPAD + + if hasattr(key, "vk"): + print(key, FROM_LYNEPAD) + if key.vk == THE_LYNEPAD_KEY_VK: + FROM_LYNEPAD = True + + elif FROM_LYNEPAD: + with open("keys.logs", "a") as file: + file.write(f"{datetime.datetime.now().isoformat()}:{key.vk}:{key.char}\n") + + +def on_release(key): + global FROM_LYNEPAD + + if hasattr(key, "vk"): + if key.vk == THE_LYNEPAD_KEY_VK: + FROM_LYNEPAD = False + print("released") + +listener = keyboard.Listener(on_press=on_press, on_release=on_release) +listener.start() +listener.join() diff --git a/xinitrc b/xinitrc index 7650150..fb9f134 100644 --- a/xinitrc +++ b/xinitrc @@ -45,13 +45,16 @@ xrandr --auto $HOME/.config/xrandr-magic.sh $MONITOR $HOME/.config/manipulate_monitors.sh $MONITOR rtl +xinput --set-prop "pointer:Razer Razer DeathAdder V2" 'libinput Accel Speed' -0.1 + # Swap caps + escape setxkbmap -option caps:swapescape +#~/.screenlayout/wide.sh +~/.screenlayout/swide.sh + # Set background -#feh --bg-fill ~/Downloads/atlantis-nexus-nebula-black-background-digital-render-3840x2400-3704.jpg -#feh --bg-fill ~/Downloads/digital-abstract-3d-render-pattern-minimal-art-black-3840x2160-7124.jpg -feh --bg-fill ~/Downloads/wp2618248-blackarch-wallpaper.png +feh --bg-fill ~/Downloads/wp4473722-5120x1440-wallpapers.jpg # Launch i3 exec i3 diff --git a/xprofile b/xprofile index 516628e..9698ec6 100644 --- a/xprofile +++ b/xprofile @@ -19,3 +19,8 @@ xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & nm-applet & #autocutsel -fork & #autocutsel -selection PRIMARY -fork & + +flameshot & +discord & +firefox & +spotify &