Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
development:linux:misc_commands [2020/05/27 18:11]
kalenpw
development:linux:misc_commands [2023/04/12 19:58] (current)
kalenpw
Line 9: Line 9:
 # mac # mac
 find . -type f -name "*.txt" -print0 | xargs -0 sed -i "" -E 's!<color (#([[:digit:]]|[A-Fa-f])+)>(.*)</color>!<font inherit/inherit;;\1;;inherit>\3</font>!g' find . -type f -name "*.txt" -print0 | xargs -0 sed -i "" -E 's!<color (#([[:digit:]]|[A-Fa-f])+)>(.*)</color>!<font inherit/inherit;;\1;;inherit>\3</font>!g'
- 
 # linux # linux
 find . -type f -name "*.txt" -print0 | xargs -0 sed -i -E 's!<color (#([[:digit:]]|[A-Fa-f])+)>(.*)</color>!<font inherit/inherit;;\1;;inherit>\3</font>!g' find . -type f -name "*.txt" -print0 | xargs -0 sed -i -E 's!<color (#([[:digit:]]|[A-Fa-f])+)>(.*)</color>!<font inherit/inherit;;\1;;inherit>\3</font>!g'
Line 34: Line 33:
 synclient PalmDetect=1 synclient PalmDetect=1
  
-</code>+# replace text in filename with other text 
 +for i in *.png; do mv "$i" "`echo $i | sed 's/to replace/new text/'`"; done
  
-You can't do it with just a setkxbmap option, as no default option does what you want.+# see what goes into your boottime 
 +systemd-analyze critical-chain
  
-But you can do it by defining key behaviour at lower level.+# if you can't format drive and partition table was messed up 
 +sudo dd if=/dev/zero of=/dev/sdX bs=2048 count=32
  
-The page http://madduck.net/docs/extending-xkbhelped me to understand and find a way to do it.+# Symlink so you can put .desktop files in ~/Applications 
 +ln -s $HOME/Applications $HOME/.local/share/applications
  
-Create a file ~/.xkb/keymap/mykbd where you put the output of setxkbmap, it will be your base keyboard definition; eg:+# Reset sound drivers Fedora 
 +systemctl --user restart pipewire pipewire-pulse wireplumber 
 +# Reset sound drivers Mac 
 +sudo pkill coreaudiod
  
-setxkbmap -print > ~/.xkb/keymap/mykbd +</code
-then we will create a ~/.xkb/types/mytypes file and put the following in: +----
- +
-partial +
-xkb_types "super_level2"+
-    Virtual_modifiers Super; +
-    type "SUPER_LEVEL2"+
-        modifiers= Super; +
-        map[Super]= Level2; +
-        level_name[Level1]= "Base"; +
-        level_name[Level2]= "Super"; +
-    }; +
-}; +
-it defines a type SUPER_LEVEL2 that will allow to easily define symbols sent when a key is pressed with Super. +
- +
-then, in the ~/.xkb/symbols/mysymbols put the following lines: +
- +
-partial modifier_keys +
-xkb_symbols "super_arrows_home_end"+
-    key <LEFT { +
-        type[Group1] = "SUPER_LEVEL2", +
-        symbols[Group1] = [    Left,   Home      ] +
-    }; +
-    key <RGHT> +
-        type[Group1] = "SUPER_LEVEL2", +
-        symbols[Group1] = [    Right,  End       ] +
-    }; +
-}; +
-(note the use of the "SUPER_LEVEL2 type we defined, it means that the second (level 2) symbol on the symbols line is triggered when pressing Super key (instead of Shift key). +
- +
-Finally, edit the ~/.xkb/keymap/mykbd file to load the snippets we wrote: +
- +
-in the xkb_types line add +mytypes(super_level2) inside the quotes +
-in the xkb_symbols line add +mysymbols(super_arrows_home_end) in the quotes. +
-Now you can load it with +
- +
-xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykbd $DISPLAY +
-Test your left/right keys, they should work as you wanted.+