LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2022, 12:36 PM   #1
Faki
Member
 
Registered: Oct 2021
Posts: 574

Rep: Reputation: Disabled
Option to use either `linge-xmodmap` or `camswap-xmodmap` in .bashrc


Have my .bashrc file and want to have the option to use either
`linge-xmodmap` or `camswap-xmodmap` for remapping keys on my keyboard.

What can I do?

Code:
 
if (( exec_rc == 1 )); then
  xmodmap ${linge_trk}/linge-xmodmap    # re-maps Ctrl, Meta, Super
  xmodmap ${linge_trk}/camswap-xmodmap  # re-maps Ctrl, Meta, Super
fi
 
Old 03-13-2022, 03:51 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Faki View Post
Have my .bashrc file and want to have the option to use either
`linge-xmodmap` or `camswap-xmodmap` for remapping keys on my keyboard.

What can I do?

Code:
 
if (( exec_rc == 1 )); then
  xmodmap ${linge_trk}/linge-xmodmap    # re-maps Ctrl, Meta, Super
  xmodmap ${linge_trk}/camswap-xmodmap  # re-maps Ctrl, Meta, Super
fi
There's nothing wrong with the output you posted.
Is there a problem?

BTW, you need to apply xmodmap settings only once per graphical session, so the lines might be better suited to e.g. ~/.xinitrc, or an autostart script.
 
Old 03-13-2022, 10:00 AM   #3
Faki
Member
 
Registered: Oct 2021
Posts: 574

Original Poster
Rep: Reputation: Disabled
Have done as follows

Code:
   # Re-map keys (Ctrl, Meta, Super)
   if (( xmodmap_variant == 0 )); then
     xmodmap ${linge_trk}/linge-xmodmap
   elif (( xmodmap_variant == 1 )); then
     xmodmap ${linge_trk}/camswap-xmodmap
   else
     echo "Not using xmodmap"
   fi
 
  


Reply

Tags
bashrc, xmodmap



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /etc/bashrc ,dircolors and /root/.bash_profile ,/.bashrc not exist in LFS-7.5(sec9.3) jaassi Linux From Scratch 2 09-20-2014 05:04 PM
~/.bashrc, /etc/bash.bashrc files not read? Tachtory Slackware 3 01-04-2014 12:25 AM
[SOLVED] How to use my /home/kangjoo/.bashrc rather than root/.bashrc kangjoo.lee Linux - Newbie 2 11-05-2012 03:38 PM
.bashrc / .bash_profile /etc/profile /etc/bashrc deadeyes Red Hat 2 02-13-2010 11:22 AM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration